1 2019-11-20 Luis Machado <luis.machado@linaro.org>
3 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4 instead of register count.
5 * tdesc.c (tdesc_contains_feature): New function.
6 * tdesc.h (tdesc_contains_feature): New prototype.
8 2019-11-15 Christian Biesinger <cbiesinger@google.com>
10 * Makefile.in: Add safe-strerror.c.
11 * configure: Regenerate.
12 * configure.ac: Don't source common.host.
14 2019-11-15 Christian Biesinger <cbiesinger@google.com>
16 * config.in: Regenerate.
17 * configure: Regenerate.
19 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
21 * ax.c (ax_printf): Handle size_t_arg.
23 2019-11-06 Christian Biesinger <cbiesinger@google.com>
25 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
26 * mi/mi-main.c (output_cores): Likewise.
27 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
28 (linux_xfer_osdata_modules): Likewise.
29 * remote.c (register_remote_support_xml): Likewise.
30 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
31 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
33 2019-11-01 Christian Biesinger <cbiesinger@google.com>
35 * configure: Regenerate.
36 * configure.ac: Remove check for strerror_r.
38 2019-10-31 Christian Biesinger <cbiesinger@google.com>
40 * config.in: Regenerate.
41 * configure: Regenerate.
42 * configure.ac: Also check for strerror_r.
44 2019-10-31 Christian Biesinger <cbiesinger@google.com>
46 * ax.h (debug_agent): Remove duplicate declaration.
48 2019-10-26 Tom de Vries <tdevries@suse.de>
50 * linux-aarch64-low.c: Fix typos in comments.
51 * linux-arm-low.c: Same.
53 * linux-ppc-low.c: Same.
54 * proc-service.c: Same.
60 2019-10-25 Tom Tromey <tromey@adacore.com>
62 * utils.c (xstrdup): Remove.
64 2019-10-23 Tom Tromey <tom@tromey.com>
66 * configure, config.in: Rebuild.
68 2019-10-23 Tom Tromey <tom@tromey.com>
71 * acinclude.m4: Use m4_include, not sinclude.
73 2019-10-17 Tom Tromey <tromey@adacore.com>
76 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
77 in AC_CONFIG_FILES invocation.
78 * Makefile.in (stamp-h, Makefile): Use new-style config.status
81 2019-10-16 Christian Biesinger <cbiesinger@google.com>
83 * server.c: Include xml-builtin.h.
84 (get_xml_features): Don't declare xml_builtins here.
86 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
88 * Makefile.in: Remove references to vec-ipa.o.
90 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
92 * Makefile.in: Remove references to vec.c.
94 2019-10-02 Christian Biesinger <cbiesinger@google.com>
96 * server.c (server_waiting): Change to bool.
97 (extended_protocol): Likewise.
98 (response_needed): Likewise.
99 (exit_requested): Likewise.
100 (run_once): Likewise.
101 (report_no_resumed): Likewise.
102 (non_stop): Likewise.
103 (disable_packet_vCont): Likewise.
104 (disable_packet_Tthread): Likewise.
105 (disable_packet_qC): Likewise.
106 (disable_packet_qfThreadInfo): Likewise.
107 (handle_general_set): Update.
108 (handle_detach): Update.
109 (handle_monitor_command): Update.
110 (handle_query): Update.
111 (captured_main): Update.
112 (process_serial_event): Update.
113 * server.h (server_waiting): Change to bool.
114 (disable_packet_vCont): Likewise.
115 (disable_packet_Tthread): Likewise.
116 (disable_packet_qC): Likewise.
117 (disable_packet_qfThreadInfo): Likewise.
118 (run_once): Likewise.
119 (non_stop): Likewise.
120 * target.c (target_stop_and_wait): Update.
122 2019-10-02 Tom Tromey <tromey@adacore.com>
124 * Makefile.in (SFILES): Add common-inferior.c.
125 (OBS): Add common-inferior.o.
126 * server.c (startup_with_shell): Don't define.
128 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
130 * linux-low.c (linux_low_read_btrace): Update for change to
133 2019-09-20 Christian Biesinger <cbiesinger@google.com>
135 * debug.c (debug_threads): Remove comment in favor of the header.
136 * debug.h (using_threads): Add declaration.
137 (debug_threads): Add comment.
138 * linux-aarch64-low.c: Include debug.h and remove declaration of
140 * nto-low.c: Likewise.
141 * remote-utils.c: Likewise.
142 * thread-db.c: Likewise.
144 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
146 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
147 and powerpc-cell64l-ipa.o.
148 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
149 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
150 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
153 * spu-low.c: Remove file.
155 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
156 (parse_spufs_run): Remove.
157 (ppc_get_pc): Remove Cell/B.E. support.
158 (ppc_set_pc): Likewise.
159 (ppc_breakpoint_at): Likewise.
160 (ppc_arch_setup): Likewise.
161 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
162 tdesc_powerpc_cell32l.
163 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
164 or init_registers_powerpc_cell32l.
165 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
166 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
167 or init_registers_powerpc_cell32l.
168 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
169 (init_registers_powerpc_cell32l): Remove prototype.
170 (init_registers_powerpc_cell64l): Likewise.
172 * target.h (struct target_ops): Remove qxfer_spu member.
173 * server.c (handle_qxfer_spu): Remove.
174 (qxfer_packets): Remove entry for "spu".
175 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
176 * linux-low.c (SPUFS_MAGIC): Remove.
177 (spu_enumerate_spu_ids): Remove.
178 (linux_qxfer_spu): Remove.
179 (linux_target_ops): Remove qxfer_spu member.
180 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
181 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
182 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
184 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
186 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
187 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
188 * config.in: Regenerate.
189 * configure: Regenerate.
191 2019-08-15 Tom Tromey <tromey@adacore.com>
193 * target.c (target_write_memory): Use gdb::byte_vector.
195 2019-08-15 Tom Tromey <tromey@adacore.com>
197 * tracepoint.c (write_inferior_data_pointer)
198 (write_inferior_integer, write_inferior_int8)
199 (write_inferior_uinteger, m_tracepoint_action_download)
200 (r_tracepoint_action_download, x_tracepoint_action_download)
201 (l_tracepoint_action_download, clear_inferior_trace_buffer)
202 (download_agent_expr, download_tracepoint_1)
203 (download_trace_state_variables, upload_fast_traceframes): Update.
204 * server.c (gdb_write_memory): Update.
205 * remote-utils.c (relocate_instruction): Update.
206 * proc-service.c (ps_pdwrite): Update.
207 * mem-break.c (remove_memory_breakpoint)
208 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
209 (uninsert_fast_tracepoint_jumps_at)
210 (reinsert_fast_tracepoint_jumps_at): Update.
211 * linux-x86-low.c (append_insns)
212 (i386_install_fast_tracepoint_jump_pad)
213 (amd64_write_goto_address, i386_write_goto_address): Update.
214 * linux-s390-low.c (append_insns, s390_write_goto_address):
216 * linux-ppc-low.c (ppc_relocate_instruction)
217 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
218 (ppc_write_goto_address): Update.
219 * linux-aarch64-low.c (append_insns): Update.
220 * target.h (struct target_ops): Update.
221 (write_inferior_memory): Don't declare.
222 * target.c (target_write_memory): Rename from
223 write_inferior_memory. Remove old target_write_memory.
225 2019-08-15 Tom Tromey <tromey@adacore.com>
227 * target.c (write_inferior_memory): Use std::vector.
229 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
232 * configure.ac: Drop enable-libmcheck support.
233 * configure, config.in: Rebuild.
234 * acinclude.m4: Don't include it.
236 2019-07-19 Alan Hayward <alan.hayward@arm.com>
238 * configure.srv: Remove Arm xml files.
240 2019-07-19 Alan Hayward <alan.hayward@arm.com>
242 * configure.srv: Add new files. Remove xml generated files.
243 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
245 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
246 * linux-aarch32-tdesc.c: New file.
247 * linux-aarch32-tdesc.h: New file.
248 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
249 * linux-arm-low.c (init_registers_arm, tdesc_arm)
250 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
251 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
252 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
253 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
254 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
255 (arm_read_description): Call arm_linux_read_description.
256 (initialize_low_arch): Don't init registers.
257 * linux-arm-tdesc.c: New file.
258 * linux-arm-tdesc.h: New file.
260 2019-07-10 Alan Hayward <alan.hayward@arm.com>
262 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
263 Move counter inside for.
264 (arm_read_description): Check ptrace earlier.
265 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
267 2019-07-09 Tom Tromey <tom@tromey.com>
269 * configure: Rebuild.
270 * configure.ac: Change common to gdbsupport.
271 * acinclude.m4: Change common to gdbsupport.
272 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
273 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
274 common to gdbsupport.
275 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
276 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
277 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
278 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
279 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
280 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
281 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
282 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
283 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
284 common to gdbsupport.
286 2019-07-04 Alan Hayward <alan.hayward@arm.com>
288 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
290 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
292 2019-07-04 Alan Hayward <alan.hayward@arm.com>
294 * configure.srv: Remove legacy xml.
295 * linux-aarch64-low.c (initialize_low_arch): Remove
296 initialize_low_tdesc call.
297 * linux-aarch64-tdesc-selftest.c: Remove file.
298 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
299 * linux-x86-low.c (initialize_low_arch): Remove
300 initialize_low_tdesc call.
301 * linux-x86-tdesc-selftest.c: Remove file.
302 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
304 2019-06-20 Tom de Vries <tdevries@suse.de>
306 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
307 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
309 2019-06-19 Tom de Vries <tdevries@suse.de>
311 * debug.h (debug_write): Change return type to ssize_t.
312 * debug.c (debug_write): Same.
314 2019-06-14 Tom Tromey <tom@tromey.com>
316 * configure.ac: Use new path to gnulib.
317 * configure: Rebuild.
318 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
321 2019-06-11 Tom Tromey <tom@tromey.com>
323 * Makefile.in (SFILES): Add alloc.c.
325 (IPA_OBJS): Add alloc-ipa.o.
326 (alloc-ipa.o): New target.
327 (%.o: ../%.c): New pattern rule.
329 2019-06-10 Tom Tromey <tromey@adacore.com>
331 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
332 end warning with a newline.
333 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
335 * thread-db.c (attach_thread): Don't end warning with a newline.
336 (thread_db_notice_clone): Likewise.
337 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
339 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
340 end warning with a newline.
342 2019-06-04 Pedro Alves <palves@redhat.com>
344 * server.c (captured_main): Use make_unique_xstrdup.
346 2019-06-02 Tom Tromey <tom@tromey.com>
348 * gdbreplay.c (fromhex): Remove.
349 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
351 2019-05-29 Tom Tromey <tromey@adacore.com>
353 * configure: Rebuild.
355 2019-05-06 Kevin Buettner <kevinb@redhat.com>
357 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
358 sign extension code on 32-bit builds.
360 2019-05-03 Eli Zaretskii <eliz@gnu.org>
363 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
365 2019-04-19 Tom Tromey <tom@tromey.com>
367 * server.c (struct vstop_notif): Derive from notif_event.
369 (queue_stop_reply): Update.
370 (remove_all_on_match_ptid): Change type. Rewrite.
371 (discard_queued_stop_replies): Rewrite.
372 (in_queued_stop_replies_ptid): Change type.
373 (in_queued_stop_replies): Rewrite.
374 (notif_stop): Update.
375 (queue_stop_reply_callback): Update.
376 (captured_main): Don't call initialize_notif.
377 (push_stop_notification): Update.
378 * notif.c (notif_write_event, handle_notif_ack)
379 (notif_event_enque, notif_push): Update.
380 (notif_event_xfree, initialize_notif): Remove.
381 * notif.h (struct notif_event): Include <list>, not
383 (struct notif_server) <queue>: Now a std::list.
384 (notif_event_p): Remove typedef.
385 (initialize_notif): Don't declare.
386 (struct notif_event): Add virtual destructor.
388 2019-04-17 Alan Hayward <alan.hayward@arm.com>
390 * ax.c (ax_vdebug): Call debug_printf.
391 * debug.c (debug_write): New function.
392 * debug.h (debug_write): New declaration.
393 * linux-low.c (sigchld_handler): Call debug_write.
395 2019-04-17 Alan Hayward <alan.hayward@arm.com>
397 * debug.c (debug_set_output): New function.
398 (debug_vprintf): Send output to debug_file.
399 (debug_flush): Likewise.
400 * debug.h (debug_set_output): New declaration.
401 * server.c (handle_monitor_command): Add debug-file option.
402 (captured_main): Likewise.
404 2019-04-17 Alan Hayward <alan.hayward@arm.com>
406 * debug.c (remote_debug): Add definition.
407 * debug.h (remote_debug): Add declaration.
408 * hostio.c (remote_debug): Remove declaration.
409 * remote-utils.c (struct ui_file): Likewise.
410 (remote_debug): Likewise.
411 * remote-utils.h (remote_debug): Likewise,
412 * server.c (remote_debug): Remove definition.
414 2019-04-10 Kevin Buettner <kevinb@redhat.com>
416 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
417 when using a 64-bit gdbserver.
419 2019-04-09 Tom Tromey <tromey@adacore.com>
421 * linux-low.c (select_event_lwp): Use find_thread_in_random.
423 2019-04-08 Tom Tromey <tom@tromey.com>
425 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
427 (linux_resume_one_lwp): Likewise.
429 2019-04-08 Tom Tromey <tom@tromey.com>
431 * gdbreplay.c: Update.
432 * linux-low.c: Update.
435 2019-04-08 Tom Tromey <tom@tromey.com>
437 * server.c: Use C++ exception handling.
438 * linux-low.c: Use C++ exception handling.
439 * gdbreplay.c: Use C++ exception handling.
441 2019-04-08 Tom Tromey <tom@tromey.com>
443 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
444 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
445 (captured_main, main): Update.
446 * gdbreplay.c (main): Update.
448 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
450 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
451 value in argument pointer, return 1 if the entry is found and 0
452 otherwise. Move comment.
453 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
454 * linux-low.h (linux_get_auxv): Declare.
455 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
457 2019-04-05 Tom Tromey <tromey@adacore.com>
459 * server.c (gdbserver_usage): Use upper-case for metasyntactic
462 2019-03-28 Alan Hayward <alan.hayward@arm.com>
464 * linux-low.c (AT_HWCAP2): Add define if not already included.
466 2019-03-26 Alan Hayward <alan.hayward@arm.com>
468 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
469 (aarch64_arch_setup): Call linux_get_hwcap.
470 * linux-arm-low.c (arm_get_hwcap): Remove function.
471 (arm_read_description): Call linux_get_hwcap.
472 * linux-low.c (linux_get_auxv): New function.
473 (linux_get_hwcap): Likewise.
474 (linux_get_hwcap2): Likewise.
475 * linux-low.h (linux_get_hwcap): New declaration.
476 (linux_get_hwcap2): Likewise.
477 * linux-ppc-low.c (ppc_get_auxv): Remove function.
478 (ppc_arch_setup): Call linux_get_hwcap.
479 * linux-s390-low.c (s390_get_hwcap): Remove function.
480 (s390_arch_setup): Call linux_get_hwcap.
482 2019-03-22 Alan Hayward <alan.hayward@arm.com>
483 Jiong Wang <jiong.wang@arm.com>
485 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
486 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
488 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
490 2019-03-22 Alan Hayward <alan.hayward@arm.com>
491 Jiong Wang <jiong.wang@arm.com>
493 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
494 (aarch64_get_hwcap): New function.
495 (aarch64_arch_setup): Read APIA hwcap.
497 2019-03-22 Alan Hayward <alan.hayward@arm.com>
498 Jiong Wang <jiong.wang@arm.com>
500 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
501 (initialize_low_tracepoint): Likewise.
502 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
503 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
504 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
505 (aarch64_linux_read_description): Likewise.
506 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
508 2019-03-12 John Baldwin <jhb@FreeBSD.org>
510 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
511 i386_create_target_description for 'segments' parameter.
512 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
513 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
514 * win32-i386-low.c (i386_arch_setup): Likewise.
516 2019-03-12 Tom Tromey <tromey@adacore.com>
518 * linux-low.c (iterate_over_lwps): Update.
520 2019-03-06 Tom Tromey <tom@tromey.com>
522 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
523 (captured_main): Use SCOPE_EXIT.
525 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
527 * configure.srv: Use '$enable_unittest' instead of '$development'
528 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
531 2019-02-27 Tom Tromey <tromey@adacore.com>
533 * gdbreplay.c (logchar): Handle \r\n.
535 2019-02-07 Alan Hayward <alan.hayward@arm.com>
537 * linux-low.c (linux_attach): Add process before lwp.
538 * server.c (attach_inferior): Check if already attached.
540 2019-02-07 Tom Tromey <tom@tromey.com>
542 * x86-tdesc.h: Rename include guard.
543 * x86-low.h: Add include guard.
544 * wincecompat.h: Rename include guard.
545 * win32-low.h: Add include guard.
546 * utils.h: Rename include guard.
547 * tracepoint.h: Rename include guard.
548 * tdesc.h: Rename include guard.
549 * target.h: Rename include guard.
550 * server.h: Rename include guard.
551 * remote-utils.h: Rename include guard.
552 * regcache.h: Rename include guard.
553 * nto-low.h: Rename include guard.
554 * notif.h: Add include guard.
555 * mem-break.h: Rename include guard.
556 * lynx-low.h: Add include guard.
557 * linux-x86-tdesc.h: Add include guard.
558 * linux-s390-tdesc.h: Add include guard.
559 * linux-ppc-tdesc-init.h: Add include guard.
560 * linux-low.h: Add include guard.
561 * linux-aarch64-tdesc.h: Add include guard.
562 * linux-aarch32-low.h: Add include guard.
563 * inferiors.h: Rename include guard.
564 * i387-fp.h: Rename include guard.
565 * hostio.h: Rename include guard.
566 * gdbthread.h: Rename include guard.
567 * gdb_proc_service.h: Rename include guard.
568 * event-loop.h: Rename include guard.
569 * dll.h: Rename include guard.
570 * debug.h: Rename include guard.
571 * ax.h: Rename include guard.
573 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
576 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
577 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
579 2019-01-25 Tom Tromey <tom@tromey.com>
581 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
583 2019-01-25 Tom Tromey <tom@tromey.com>
585 * win32-low.c: Fix common/ includes.
586 * win32-i386-low.c: Fix common/ includes.
587 * tracepoint.c: Fix common/ includes.
588 * thread-db.c: Fix common/ includes.
589 * target.h: Fix common/ includes.
590 * symbol.c: Fix common/ includes.
591 * spu-low.c: Fix common/ includes.
592 * server.h: Fix common/ includes.
593 * server.c: Fix common/ includes.
594 * remote-utils.c: Fix common/ includes.
595 * regcache.h: Fix common/ includes.
596 * regcache.c: Fix common/ includes.
597 * nto-x86-low.c: Fix common/ includes.
598 * notif.h: Fix common/ includes.
599 * mem-break.h: Fix common/ includes.
600 * lynx-low.c: Fix common/ includes.
601 * lynx-i386-low.c: Fix common/ includes.
602 * linux-x86-tdesc-selftest.c: Fix common/ includes.
603 * linux-x86-low.c: Fix common/ includes.
604 * linux-low.c: Fix common/ includes.
605 * inferiors.h: Fix common/ includes.
606 * i387-fp.c: Fix common/ includes.
607 * hostio.c: Fix common/ includes.
608 * hostio-errno.c: Fix common/ includes.
609 * gdbthread.h: Fix common/ includes.
610 * gdbreplay.c: Fix common/ includes.
611 * fork-child.c: Fix common/ includes.
612 * event-loop.c: Fix common/ includes.
614 (enum gdb_agent_op): Fix common/ includes.
616 2019-01-21 Tom Tromey <tom@tromey.com>
618 * tracepoint.c: Fix includes.
619 * remote-utils.c: Fix includes.
620 * linux-x86-low.c: Fix includes.
622 2019-01-01 Joel Brobecker <brobecker@adacore.com>
624 * gdbreplay.c (gdbreplay_version): Update copyright year in
626 * server.c (gdbserver_version): Likewise.
628 2018-12-05 Alan Hayward <alan.hayward@arm.com>
630 * linux-low.c (add_lwp): Switch ordering.
632 2018-11-29 Tom Tromey <tom@tromey.com>
634 * win32-low.c (win32_join): Take pid, not process.
635 * target.h (struct target_ops) <join>: Change argument type.
636 (join_inferior): Change argument name.
637 * spu-low.c (spu_join): Take pid, not process.
638 * server.c (handle_detach): Preserve pid before destroying
640 * lynx-low.c (lynx_join): Take pid, not process.
641 * linux-low.c (linux_join): Take pid, not process.
643 2018-11-23 Alan Hayward <alan.hayward@arm.com>
645 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
646 (aarch64_cannot_fetch_register): Likewise.
647 (struct linux_target_ops): Update references.
649 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
651 * linux-ppc-low.c: Include nat/linux-ptrace.h.
653 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
655 * configure.srv (ipa_ppc_linux_regobj): Add
656 powerpc-isa207-htm-vsx32l-ipa.o and
657 powerpc-isa207-htm-vsx64l-ipa.o.
658 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
659 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
660 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
661 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
662 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
663 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
664 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
665 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
666 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
667 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
668 (init_registers_powerpc_isa207_htm_vsx32l)
669 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
670 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
671 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
672 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
673 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
674 (ppc_store_tm_ctarregset): New functions.
675 (ppc_regsets): Add entries for HTM regsets.
676 (ppc_arch_setup): Set htm in features struct when needed. Set
677 sizes for the HTM regsets.
678 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
679 (initialize_low_arch): Call
680 init_registers_powerpc_isa207_htm_vsx32l and
681 init_registers_powerpc_isa207_htm_vsx64l.
682 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
683 PPC_TDESC_ISA207_HTM_VSX.
684 (initialize_low_tracepoint): Call
685 init_registers_powerpc_isa207_htm_vsx32l and
686 init_registers_powerpc_isa207_htm_vsx64l.
688 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
690 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
691 rs6000/power-linux-pmu.xml to srv_xmlfiles.
692 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
693 (ppc_store_pmuregset): New functions.
694 (ppc_regsets): Add entries for ebb and pmu regsets.
695 (ppc_arch_setup): Set isa207 in features struct if the ebb and
696 pmu regsets are available. Set sizes for these regsets.
698 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
700 * configure.srv (ipa_ppc_linux_regobj): Add
701 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
702 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
703 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
704 rs6000/powerpc-isa207-vsx32l.xml, and
705 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
706 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
707 <PPC_TDESC_ISA207_VSX>: New enum value.
708 (init_registers_powerpc_isa207_vsx32l): Declare.
709 (init_registers_powerpc_isa207_vsx64l): Declare.
710 * linux-ppc-low.c (ppc_fill_tarregset): New function.
711 (ppc_store_tarregset): New function.
712 (ppc_regsets): Add entry for the TAR regset.
713 (ppc_arch_setup): Set isa207 in features struct when needed. Set
714 size for the TAR regsets.
715 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
716 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
717 and init_registers_powerpc_isa207_vsx64l.
718 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
719 (initialize_low_tracepoint): Call
720 init_registers_powerpc_isa207_vsx32l and
721 init_registers_powerpc_isa207_vsx64l.
723 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
724 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
726 * configure.srv (ipa_ppc_linux_regobj): Add
727 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
728 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
729 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
730 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
731 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
732 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
733 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
734 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
735 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
736 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
737 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
738 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
739 (ppc_hwcap): Add comment.
740 (ppc_hwcap2): New global.
741 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
742 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
743 (ppc_regsets): Add entries for the DSCR and PPR regsets.
744 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
745 when needed. Set sizes for the the DSCR and PPR regsets.
746 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
747 (initialize_low_arch): Call
748 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
749 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
750 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
751 PPC_TDESC_ISA205_PPR_DSCR_VSX.
752 (initialize_low_tracepoint): Call
753 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
754 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
756 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
758 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
760 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
761 Simon Marchi <simark@simark.ca>
763 * acinclude.m4: Include "../selftest.m4".
764 * configure: Regenerate.
765 * configure.ac: Use "GDB_AC_SELFTEST".
766 * configure.srv: Use "$enable_unittests" instead of
767 "$development" when checking whether unit tests have been
769 * server.c (captured_main): Update message informing that
770 selftests have been disabled.
772 2018-10-04 Tom Tromey <tom@tromey.com>
774 * configure: Rebuild.
776 2018-10-04 Tom Tromey <tom@tromey.com>
778 * server.c (handle_status): Rename inner "thread".
779 (process_serial_event): Declare "res" in 'm' case.
780 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
781 (iterate_over_lwps): Rename inner "thread".
782 (linux_qxfer_libraries_svr4): Rename inner "len".
783 * gdbthread.h (find_thread_in_random): Rename inner "thread".
785 2018-10-01 Gary Benson <gbenson@redhat.com>
787 * gdb_proc_service.h: Moved common code to
788 common/gdb_proc_service.h.
790 2018-10-01 Gary Benson <gbenson@redhat.com>
792 * gdb_proc_service.h: Synchronize comments and whitespace with
793 GDB's version of this file.
795 2018-09-25 Tom Tromey <tom@tromey.com>
797 * configure: Rebuild.
798 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
800 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
802 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
803 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
804 ($(IPA_LIB)): Sort IPA_OBJS.
806 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
808 * Makefile.in: Remove references to $(ADD_DEPS).
810 2018-09-16 Tom Tromey <tom@tromey.com>
812 * remote-utils.c (remote_open): Use GNU style for metasyntactic
814 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
817 2018-09-05 Tom Tromey <tom@tromey.com>
819 * configure: Rebuild.
821 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
824 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
826 2018-08-27 Tom Tromey <tom@tromey.com>
829 * configure: Rebuild.
831 2018-08-27 Tom Tromey <tom@tromey.com>
833 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
834 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
835 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
836 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
837 (s390x_emit_stack_adjust): Add casts to unsigned char.
839 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
843 * server.h (struct client_state) <disable_randomization>:
846 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
848 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
850 (mips_supply_ptrace_register): Likewise.
852 2018-07-22 Tom Tromey <tom@tromey.com>
854 * configure: Rebuild.
856 2018-07-22 Tom Tromey <tom@tromey.com>
858 * win32-low.c (win32_create_inferior): Remove unused variables.
859 * gdbreplay.c (remote_open): Remove unused variable.
860 * remote-utils.c (remote_prepare): Remove unused variable.
861 * x86-tdesc.h (X86_TDESC_H): Define.
862 (amd64_expedite_regs): Define conditionally.
863 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
864 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
865 * remote-utils.c (readchar): Remove unused variable.
867 2018-07-13 Pedro Alves <palves@redhat.com>
869 * linux-low.c (linux_kill): Change parameter to process_info
870 pointer instead of pid. Adjust.
871 * lynx-low.c (lynx_kill): Likewise.
872 * nto-low.c (nto_kill): Likewise.
873 * spu-low.c (spu_kill): Likewise.
874 * win32-low.c (win32_kill): Likewise.
875 * server.c (handle_v_kill, kill_inferior_callback)
876 (detach_or_kill_for_exit): Adjust.
877 * target.c (kill_inferior): Change parameter to process_info
878 pointer instead of pid. Adjust.
879 * target.h (struct target_ops) <kill>: Change parameter to
880 process_info pointer instead of pid. Adjust all implementations
882 (kill_inferior): Likewise.
884 2018-07-13 Pedro Alves <palves@redhat.com>
886 * linux-low.c (linux_detach, linux_join): Change parameter to
887 process_info pointer instead of pid. Adjust.
888 * lynx-low.c (lynx_detach, lynx_join): Likewise.
889 * nto-low.c (nto_detach): Likewise.
890 * spu-low.c (spu_detach, spu_join): Likewise.
891 * win32-low.c (win32_detach, win32_join): Likewise.
892 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
893 * target.h (struct target_ops) <detach, join>: Change parameter to
894 process_info pointer instead of pid. Adjust all implementations
896 (detach_inferior, join_inferior): Rename 'pid' parameter to
899 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
900 Jan Kratochvil <jan.kratochvil@redhat.com>
901 Paul Fertser <fercerpav@gmail.com>
902 Tsutomu Seki <sekiriki@gmail.com>
904 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
905 (OBS): Add 'common/netstuff.o'.
906 (GDBREPLAY_OBS): Likewise.
907 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
908 (remote_open): Implement support for IPv6
910 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
912 (handle_accept_event): Accept connections from IPv6 sources.
913 (remote_prepare): Handle IPv6-style hostnames; implement
914 support for IPv6 connections.
915 (remote_open): Implement support for printing connections from
918 2018-07-11 Pedro Alves <palves@redhat.com>
921 * mem-break.c (any_persistent_commands): Add process_info
922 parameter and use it instead of relying on the current process.
923 Change return type to bool.
924 * mem-break.h (any_persistent_commands): Add process_info
925 parameter and change return type to bool.
926 * server.c (handle_detach): Remove require_running_or_return call.
927 Look up the process_info for the process we're about to detach.
928 If not found, return back error to GDB. Adjust
929 any_persistent_commands call to pass down a process pointer.
931 2018-07-11 Pedro Alves <palves@redhat.com>
933 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
934 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
935 instead of collect_register_by_name.
936 * regcache.c (regcache_raw_get_unsigned_by_name): New.
937 * regcache.h (regcache_raw_get_unsigned_by_name): New.
939 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
940 Pedro Alves <palves@redhat.com>
942 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
944 2018-07-03 Tom Tromey <tom@tromey.com>
946 * linux-low.c: Update.
947 * lynx-low.c: Update.
948 * mem-break.c: Update.
950 * remote-utils.c: Update.
954 * win32-low.c: Update.
956 2018-07-03 Tom Tromey <tom@tromey.com>
960 2018-07-03 Tom Tromey <tom@tromey.com>
962 * linux-low.c: Update.
964 2018-07-03 Tom Tromey <tom@tromey.com>
968 2018-07-03 Tom Tromey <tom@tromey.com>
970 * linux-low.c: Update.
971 * linux-mips-low.c: Update.
972 * lynx-low.c: Update.
974 * remote-utils.c: Update.
978 * thread-db.c: Update.
980 2018-07-03 Tom Tromey <tom@tromey.com>
982 * linux-low.c: Update.
983 * linux-mips-low.c: Update.
984 * lynx-low.c: Update.
985 * mem-break.c: Update.
987 * remote-utils.c: Update.
991 * tracepoint.c: Update.
993 2018-07-03 Tom Tromey <tom@tromey.com>
995 * linux-low.c: Update.
996 * linux-ppc-low.c: Update.
997 * linux-x86-low.c: Update.
998 * proc-service.c: Update.
1000 * spu-low.c: Update.
1001 * thread-db.c: Update.
1002 * win32-low.c: Update.
1004 2018-07-03 Tom Tromey <tom@tromey.com>
1006 * linux-low.c: Update.
1007 * lynx-low.c: Update.
1008 * nto-low.c: Update.
1009 * remote-utils.c: Update.
1010 * spu-low.c: Update.
1011 * thread-db.c: Update.
1012 * win32-low.c: Update.
1014 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1016 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1017 parameter in call to 'amd64_create_target_description'.
1019 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1021 * x86-tdesc.h: Remove executable permission flag.
1023 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1025 * configure.ac: Remove AC_PREREQ, add missing quoting.
1026 * configure: Re-generate.
1027 * config.in: Re-generate.
1028 * aclocal.m4: Re-generate.
1030 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1032 * tracepoint.h (current_traceframe): Remove declaration.
1034 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1036 * linux-aarch64-low.c (is_sve_tdesc): New function.
1037 (aarch64_sve_regs_copy_to_regcache): Likewise.
1038 (aarch64_sve_regs_copy_from_regcache): Likewise.
1039 (aarch64_regs_info): Add SVE checks.
1040 (initialize_low_arch): Initialize SVE.
1042 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1044 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1046 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1048 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1049 (initialize_low_tracepoint): Likewise
1050 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1051 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1053 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1055 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1057 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1059 * server.h (PBUFSIZ): Increase size
1061 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1063 * regcache.c (regcache::raw_compare): New function.
1064 * regcache.h (regcache::raw_compare): New declaration.
1066 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1068 * regcache.c (new_register_cache): Use new.
1069 (free_register_cache): Use delete.
1070 (register_data): Use const.
1071 (supply_register): Move body inside regcache.
1072 (regcache::raw_supply): New override function.
1073 (collect_register): Move body inside regcache.
1074 (regcache::raw_collect): New override function.
1075 (regcache::get_register_status): New override function.
1076 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1078 2018-06-09 Tom Tromey <tom@tromey.com>
1080 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1082 (event_queue): Use std::queue.
1083 (gdb_event_xfree): Remove.
1084 (initialize_event_loop, process_event, wait_for_event): Update.
1086 2018-06-08 Stan Cox <scox@redhat.com>
1088 * win32-low.c (win32_create_inferior): last_ptid and last_status
1089 moved to client_state.
1091 2018-06-08 Pedro Alves <palves@redhat.com>
1093 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1094 common/common-exceptions.o, common/common-utils.o,
1095 common/errors.o, common/print-utils.o and utils.o.
1096 * gdbreplay.c: Include "common-defs.h" instead of the two
1097 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1098 string.h or alloca.h.
1099 (perror_with_name): Delete.
1100 (remote_open): Use xstrdup instead of strdup.
1101 (main): Rename to ...
1102 (captured_main): ... this.
1105 2018-06-08 Tom Tromey <tom@tromey.com>
1107 * linux-low.c (linux_low_read_btrace): Update.
1109 2018-06-04 Stan Cox <scox@redhat.com>
1111 * server.h (struct client_state): New.
1112 * server.c (cont_thread, general_thread, multi_process)
1113 (report_fork_events, report_vfork_events, report_exec_events)
1114 (report_thread_events, swbreak_feature, hwbreak_feature)
1115 (vCont_supported, disable_randomization, pass_signals)
1116 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1117 Moved to client_state.
1118 * remote-utils.c (remote_debug, noack_mode)
1119 (transport_is_reliable): Moved to client_state.
1120 * tracepoint.c (current_traceframe): Moved to client_state.
1123 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1124 linux-low.c, remote-utils.h, target.c: Use client_state.
1126 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1128 * configure.srv: Add new c/h file.
1130 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1132 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1135 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1137 * gdb.arch/mips-fpregset-core.exp: New test.
1138 * gdb.arch/mips-fpregset-core.c: New test source.
1140 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1143 * hostio.c (require_int): Do not report overflow for integers
1144 between 0xfffffff and 0x7fffffff.
1146 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1148 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1149 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1150 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1152 (the_low_target): Wire them.
1154 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1156 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1157 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1158 mode. Call collect_register_by_name with vscr using
1159 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1160 (ppc_store_vrregset): Add and set vscr_offset variable as in
1161 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1164 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1166 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1167 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1168 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1170 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1172 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1173 (ppc_store_vsxregset): Likewise.
1174 (ppc_fill_vrregset): Likewise.
1175 (ppc_store_vrregset): Likewise.
1176 (ppc_fill_evrregset): Likewise.
1177 (ppc_store_evrregset): Likewise.
1178 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1179 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1182 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1184 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1185 wordsize of the inferior. Call ppc_linux_target_wordsize.
1187 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1189 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1190 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1191 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1192 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1193 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1194 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1195 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1196 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1197 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1198 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1199 (tdesc_powerpc_e500l): Remove.
1200 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1201 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1202 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1203 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1205 (ppc_arch_setup): Remove target description matching code. Fill a
1206 ppc_linux_features struct and call ppc_linux_match_description
1209 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1211 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1212 width of the requested register exceeds the width of the
1214 (mips_cannot_store_register): Likewise.
1216 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1218 * linux-mips-low.c (mips_fetch_register): New function. Update
1220 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1221 (the_low_target): Wire `mips_fetch_register'.
1223 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1225 * lynx-i386-low.c (LYNXOS_178): New macro.
1226 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1227 the layout on LynxOS-178.
1228 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1229 handle floating point registers that are not supported by
1232 2018-05-10 Tom Tromey <tom@tromey.com>
1234 * configure: Rebuild.
1236 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1239 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1240 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1241 Use it to set the expedite_regs field in the given tdesc.
1242 * x86-tdesc.h: New file.
1243 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1244 Adjust following the addition of the new expedite_regs parameter
1245 to init_target_desc.
1246 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1247 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1248 (i386_linux_read_description, amd64_linux_read_description):
1249 Adjust following the addition of the new expedite_regs parameter
1250 to init_target_desc.
1251 * lynx-i386-low.c: #include "x86-tdesc.h".
1252 (lynx_i386_arch_setup): Adjust following the addition of the new
1253 expedite_regs parameter to init_target_desc.
1254 * nto-x86-low.c: #include "x86-tdesc.h".
1255 (nto_x86_arch_setup): Adjust following the addition of the new
1256 expedite_regs parameter to init_target_desc.
1257 * win32-i386-low.c: #include "x86-tdesc.h".
1258 (i386_arch_setup): Adjust following the addition of the new
1259 expedite_regs parameter to init_target_desc.
1261 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1264 * win32-low.c (win32_create_inferior): Add call to my_wait
1265 setting last_status global.
1267 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1270 * win32-low.c (create_process): Only call gdb_tilde_expand if
1271 inferior_cwd is not NULL.
1273 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1275 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1276 registers to the cache if their values have changed.
1277 (i387_xsave_to_cache): Provide default values for x87 control
1278 registers when these features are available, but disabled.
1279 * regcache.c (supply_register_by_name_zeroed): New function.
1280 * regcache.h (supply_register_by_name_zeroed): Declare new
1283 2018-05-07 Tom Tromey <tom@tromey.com>
1285 * configure: Rebuild.
1287 2018-05-04 Tom Tromey <tom@tromey.com>
1289 * configure: Rebuild.
1291 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1292 Pedro Alves <palves@redhat.com>
1294 * linux-aarch64-low.c (aarch64_stopped_data_address):
1297 2018-04-27 Tom Tromey <tom@tromey.com>
1299 * configure: Rebuild.
1301 2018-04-23 Tom Tromey <tom@tromey.com>
1303 * configure: Rebuild.
1305 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1307 * Makefile.in (depcomp): Add "..".
1308 (all_deps_files): New and use it.
1310 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1312 * configure.srv (aarch64*-*-linux*): Don't include xml.
1313 (i[34567]86-*-cygwin*): Likewise.
1314 (i[34567]86-*-linux*): Likewise.
1315 (i[34567]86-*-lynxos*): Likewise.
1316 (i[34567]86-*-mingw32ce*): Likewise.
1317 (i[34567]86-*-mingw*): Likewise.
1318 (i[34567]86-*-nto*): Likewise.
1319 (tic6x-*-uclinux): Likewise.
1320 (x86_64-*-linux*): Likewise.
1321 (x86_64-*-mingw*): Likewise.
1322 (x86_64-*-cygwin*): Likewise.
1324 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1326 * tdesc.c: Remove xml parameter.
1328 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1330 * server.c (get_features_xml): Remove cast.
1331 * tdesc.c (void target_desc::accept): Fill in function.
1332 (tdesc_get_features_xml): Remove old xml creation.
1333 (print_xml_feature::visit_pre): Add xml vistor.
1334 * tdesc.h (struct target_desc): Make xmltarget mutable.
1335 (tdesc_get_features_xml): Remove declaration.
1337 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1339 * tdesc.c (tdesc_architecture_name): Add new function.
1340 (tdesc_osabi_name): Likewise.
1341 (tdesc_get_features_xml): Use new functions.
1343 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1345 * tdesc.c (tdesc_create_flags): Remove.
1346 (tdesc_add_flag): Likewise.
1347 (tdesc_named_type): Likewise.
1348 (tdesc_create_union): Likewise.
1349 (tdesc_create_struct): Likewise.
1350 (tdesc_create_vector): Likewise.
1351 (tdesc_add_bitfield): Likewise.
1352 (tdesc_add_field): Likewise.
1353 (tdesc_set_struct_size): Likewise.
1355 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1357 * tdesc.c (~target_desc): Remove implictly deleted items.
1358 (init_target_desc): Iterate all features.
1359 (tdesc_get_features_xml): Use vector.
1360 (tdesc_create_feature): Create feature.
1361 * tdesc.h (tdesc_feature) Remove
1362 (target_desc): Add features.
1364 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1366 * Makefile.in: Add common/tdesc.c
1367 * tdesc.c (init_target_desc): init all reg_defs from register
1369 (tdesc_create_reg): Create tdesc_reg.
1370 * tdesc.h (tdesc_feature): Add register vector.
1372 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1374 * tdesc.h (struct target_desc) <features>: Change type to
1375 std::vector<std::string>.
1376 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1378 (tdesc_get_features_xml): Likewise.
1379 (tdesc_create_feature): Likewise.
1381 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1383 * regcache.c (find_register_by_number): Return a ref.
1384 (find_regno): Use references.
1385 (register_size): Likewise.
1386 (register_data): Likewise.
1387 * tdesc.c (target_desc::~target_desc): Remove free calls.
1388 (target_desc::operator==): Use std::vector compare.
1389 (init_target_desc): Use reference.
1390 (tdesc_create_reg): Use reg constructors.
1391 * tdesc.h (struct target_desc): Replace pointer with object.
1393 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1395 * regcache.c (find_register_by_number): Make static.
1396 (find_regno): Use find_register_by_number
1397 * regcache.h (struct reg): Remove declaration.
1399 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1401 * tdesc.c (target_desc::~target_desc): Move to here.
1402 (target_desc::operator==): Likewise.
1403 * tdesc.h (target_desc::~target_desc): Move from here.
1404 (target_desc::operator==): Likewise.
1406 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1408 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1410 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1412 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1414 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1415 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1416 and init_registers_s390_gs_linux64.
1418 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1420 * linux-s390-low.c (s390_fill_gs): Remove function.
1421 (s390_fill_gsbc): Remove function.
1422 (s390_regsets): Set fill functions for the guarded storage regsets
1425 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1427 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1428 the word size. Add comment.
1429 (s390_get_wordsize): New function.
1430 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1431 pswm with it. Instead, use s390_get_wordsize to determine the
1432 word size first and derive the correct tdesc from that directly.
1434 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1436 * Makefile.in: Include silent-rules.mk.
1437 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1438 (COMPILE): Add ECHO_CXX.
1439 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1440 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1441 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1442 (version-generated.c): Add ECHO_GEN.
1443 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1444 (IPAGENT_COMPILE): Add ECHO_CXX.
1445 (%-generated.c): Add ECHO_REGDAT.
1447 2018-03-14 Tom Tromey <tom@tromey.com>
1450 * ax.c (ax_printf): Special case for NULL.
1452 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1454 * linux-low.c (linux_qxfer_libraries_svr4): Use
1455 xml_escape_text_append.
1457 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1459 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1461 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1463 * server.c (handle_general_set): Remove unnecessary xstrdup.
1465 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1467 * server.c (parse_debug_format_options): Adjust to
1468 delim_string_to_char_ptr_vec changes.
1469 * thread-db.c (thread_db_load_search): Adjust to
1470 dirnames_to_char_ptr_vec changes.
1472 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1474 * target.h (target_enable_btrace, target_disable_btrace)
1475 (target_read_btrace, target_read_btrace_conf): Turn macro into
1476 inline function. Throw error if target method is not defined.
1477 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1478 check for btrace target method. Be prepared to handle exceptions
1479 from btrace target methods.
1481 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1483 * server.c (captured_main): Change order of error message printed
1484 when the current working directory cannot be found.
1486 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1488 * server.c: Include "filenames.h" and "pathstuff.h".
1489 (program_name): Delete variable.
1490 (program_path): New anonymous class.
1491 (get_exec_wrapper): Use "program_path" instead of
1493 (handle_v_run): Likewise.
1494 (captured_main): Likewise.
1495 (process_serial_event): Likewise.
1497 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1499 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1500 (OBJS): Add "pathstuff.o".
1501 * server.c (current_directory): New global variable.
1502 (captured_main): Initialize "current_directory".
1504 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1506 * tdesc.c: Use common/tdesc.h.
1507 * tdesc.h: Likewise.
1509 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1510 Simon Marchi <simon.marchi@ericsson.com>
1512 * Makefile.in: Switch order of make rules.
1514 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1516 * Makefile.in: Add common directory in build.
1517 * configure.ac: Add common reference.
1518 * configure: Regenerate.
1520 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1522 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1523 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1524 * spu-low.c (spu_target_ops): Likewise.
1525 * win32-low.c (win32_target_ops): Likewise.
1526 * server.c (supported_btrace_packets): Report packets unconditionally.
1527 * target.h (target_ops) <supports_btrace>: Remove.
1528 (target_supports_btrace): Remove.
1530 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1532 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1533 (handle_btrace_disable): Change return type to void. Use exceptions
1535 (handle_btrace_general_set): Catch exception and copy message to
1538 2018-02-08 Tom Tromey <tom@tromey.com>
1540 * linux-low.c (install_software_single_step_breakpoints): Use
1541 make_scoped_restore.
1542 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1543 (do_restore_current_thread_cleanup): Remove.
1544 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1547 2018-02-08 Tom Tromey <tom@tromey.com>
1549 * mem-break.c (set_raw_breakpoint_at): Use
1550 gdb::unique_xmalloc_ptr.
1552 2018-01-30 Pedro Alves <palves@redhat.com>
1555 * target.c (target_terminal::terminal_state): Rename to ...
1556 (target_terminal::m_terminal_state): ... this.
1558 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1560 * linux-low.c (handle_extended_wait): Surround call to
1561 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1563 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1565 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1566 linux_ptrace_attach_fail_reason_string now returning an
1568 (linux_attach): Likewise.
1569 * thread-db.c (attach_thread): Likewise.
1571 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1574 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1575 checking for fs_base/gs_base fields in struct user_regs_struct.
1576 * configure: Regenerate.
1578 2018-01-16 Yao Qi <yao.qi@linaro.org>
1581 * linux-low.c (fetch_register): Call supply_register instead of
1584 2018-01-08 Yao Qi <yao.qi@linaro.org>
1585 Simon Marchi <simon.marchi@ericsson.com>
1587 * Makefile.in (OBS): Remove selftest.o.
1588 * configure.ac: Set srv_selftest_objs if $development is true.
1589 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1590 * configure: Re-generated.
1591 * server.c (captured_main): Wrap variable selftest_filter with
1594 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1596 * server.c (parse_debug_format_options): Return std::string.
1597 (handle_monitor_command, captured_main): Adjust.
1599 2018-01-05 Pedro Alves <palves@redhat.com>
1602 * server.c (captured_main): Pass quiet=false to
1603 save_original_signals_state.
1605 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1607 * gdbreplay.c (gdbreplay_version): Update copyright year in
1609 * server.c (gdbserver_version): Likewise.
1611 2017-12-08 Tom Tromey <tom@tromey.com>
1613 * ax.c (ax_printf): Update.
1615 2017-12-07 Yao Qi <yao.qi@linaro.org>
1617 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1618 aarch64_linux_read_description.
1619 * linux-amd64-ipa.c (idx2mask): New array.
1620 (get_ipa_tdesc): Move idx2mask out.
1621 (initialize_low_tracepoint): Initialize target descriptions.
1622 * linux-i386-ipa.c (idx2mask): New array.
1623 (get_ipa_tdesc): Move idx2mask out.
1624 (initialize_low_tracepoint): Initialize target descriptions.
1626 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1628 * tdesc.c (struct tdesc_type): Change return type.
1629 (tdesc_add_flag): Change parameter type.
1630 (tdesc_add_bitfield): Likewise.
1631 (tdesc_add_field): Likewise.
1632 (tdesc_set_struct_size): Likewise.
1634 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1636 * regcache.c (registers_to_string): Remove unused variable.
1638 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1640 * inferiors.c (for_each_inferior_with_data): Remove.
1641 * inferiors.h (for_each_inferior_with_data): Remove.
1642 * server.c (handle_qxfer_threads_worker): Change parameter type.
1643 (handle_qxfer_threads_proper): Use for_each_thread.
1645 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1647 * inferiors.c (for_each_inferior): Remove.
1648 (clear_inferiors): Use for_each_thread.
1649 * inferiors.h (for_each_inferior): Remove.
1650 * linux-low.c (linux_wait_for_event_filtered): Use
1652 (linux_stabilize_threads): Likewise.
1653 * regcache.c (regcache_release): Likewise.
1654 * server.c (gdb_wants_all_threads_stopped): Likewise.
1655 (clear_pending_status_callback): Remove.
1656 (handle_status): Use for_each_thread.
1657 (captured_main): Likewise.
1658 * win32-low.c (child_init_thread_list): Likewise.
1659 (win32_clear_inferiors): Likewise.
1660 (fake_breakpoint_event): Likewise.
1662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1664 * inferiors.h (find_inferior): Remove.
1665 * inferiors.c (find_inferior): Remove.
1667 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1669 * linux-low.c (resume_status_pending_p): Update comment.
1670 (need_step_over_p): Update comment.
1672 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1674 * linux-low.c (proceed_one_lwp): Return void, change parameter
1676 (unsuspend_and_proceed_one_lwp): Likewise.
1677 (proceed_all_lwps): Use for_each_thread.
1678 (unstop_all_lwps): Likewise.
1680 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1682 * linux-low.c (linux_resume_one_thread): Return void, take
1684 (linux_resume): Use for_each_thread.
1686 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1688 * linux-low.c (send_sigstop_callback): Return void, change
1689 parameter type. Rename to...
1690 (send_sigstop): ... this.
1691 (suspend_and_send_sigstop_callback): Return void, change parameter
1693 (suspend_and_send_sigstop): ... this.
1694 (stop_all_lwps): Use for_each_thread.
1696 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1698 * linux-low.c (lwp_running): Return bool, remove unused
1700 (linux_stabilize_threads): Use find_thread.
1702 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1704 * linux-low.c (select_singlestep_lwp_callback): Remove.
1705 (count_events_callback): Remove.
1706 (select_event_lwp_callback): Remove.
1707 (select_event_lwp): Use find_thread/for_each_thread.
1709 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711 * linux-low.c (not_stopped_callback): Return bool, take filter
1713 (linux_wait_for_event_filtered): Use find_thread.
1714 (linux_wait_1): Likewise.
1716 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1718 * linux-low.c (same_lwp): Remove.
1719 (find_lwp_pid): Use find_thread.
1721 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1723 * linux-low.c (delete_lwp_callback): Remove.
1724 (linux_mourn): Use for_each_thread.
1726 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1728 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1729 args parameter, don't check for pid.
1730 (linux_detach): Use for_each_thread.
1732 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1734 * linux-low.c (struct counter): Remove.
1735 (second_thread_of_pid_p): Remove.
1736 (last_thread_of_process_p): Use find_thread.
1738 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1740 * inferiors.c (find_inferior_in_random): Remove.
1741 * inferiors.h (find_inferior_in_random): Remove.
1742 * linux-low.c (status_pending_p_callback): Return bool, accept
1743 parameter ptid directly.
1744 (linux_wait_for_event_filtered): Use find_thread_in_random.
1745 (linux_wait_1): Likewise.
1747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1749 * inferiors.c (find_inferior_id): Remove.
1750 (find_thread_ptid): Move implemention from find_inferior_id to
1752 * inferiors.h (find_inferior_id): Remove.
1753 * server.c (handle_status): Use find_thread_ptid.
1754 (process_serial_event): Likewise.
1755 * thread-db.c (find_one_thread): Likewise.
1756 (thread_db_thread_handle): Likewise.
1757 * win32-low.c (thread_rec): Likewise.
1758 (child_delete_thread): Likewise.
1759 (win32_thread_alive): Likewise.
1760 (get_child_debug_event): Likewise.
1762 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1764 * linux-mips-low.c (update_watch_registers_callback): Return
1765 void, remove pid_p parameter, don't check for pid.
1766 (mips_insert_point, mips_remove_point): Use for_each_thread.
1768 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1770 * lynx.low (lynx_delete_thread_callback): Remove.
1771 (lynx_mourn): Use for_each_thread.
1773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1775 * regcache.c (regcache_invalidate_one): Remove.
1776 (regcache_invalidate_pid): use for_each_thread.
1778 2017-11-26 Tom Tromey <tom@tromey.com>
1780 * linux-low.c (linux_create_inferior): Update.
1782 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1784 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1786 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1788 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1789 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1790 * linux-aarch64-tdesc-selftest.c: New file.
1791 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1793 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1795 * configure.srv: Add new file.
1796 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1797 * linux-aarch64-tdesc-selftest.c: New file.
1798 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1800 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1802 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1803 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1804 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1806 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1808 * configure.srv: Add new files.
1809 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1810 aarch64_linux_read_description.
1811 * linux-aarch64-low.c (aarch64_linux_read_description):
1812 Merge with aarch64_arch_setup.
1813 (aarch64_arch_setup): Call aarch64_linux_read_description.
1814 * linux-aarch64-tdesc.c: New file.
1815 * linux-aarch64-tdesc.h: New file.
1817 2017-11-24 Yao Qi <yao.qi@linaro.org>
1819 * configure.srv: Set $srv_regobj for tic6x-linux.
1820 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1821 (tic6x_read_description): Move some code to tic6x_arch_setup.
1822 (tic6x_tdesc_test): New function.
1823 (initialize_low_arch): Call selftests::register_test.
1825 2017-11-22 Yao Qi <yao.qi@linaro.org>
1827 * remote-utils.c (prepare_resume_reply): Use memcpy.
1829 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1831 * linux-low.c (kill_one_lwp_callback): Return void, take
1832 argument directly, don't filter on pid.
1833 (linux_kill): Use for_each_thread.
1835 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1837 * linux-low.c (need_step_over_p): Return bool, remove dummy
1839 (linux_resume, proceed_all_lwps): Use find_thread.
1841 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1843 * linux-low.c (resume_status_pending_p): Return bool, remove
1845 (linux_resume): Use find_thread.
1847 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1849 * linux-low.c (struct thread_resume_array): Remove.
1850 (linux_set_resume_request): Return void, take arguments
1852 (linux_resume): Use for_each_thread.
1854 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1856 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1857 return bool, remove data argument.
1858 (linux_stabilize_threads): Use find_thread.
1860 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1862 * linux-low.c (unsuspend_one_lwp): Remove.
1863 (unsuspend_all_lwps): Use for_each_thread, inline code from
1866 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1868 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1869 * linux-low.c (struct iterate_over_lwps_args): Remove.
1870 (iterate_over_lwps_filter): Remove.
1871 (iterate_over_lwps): Use find_thread.
1873 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1875 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1876 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1877 code from reset_lwp_ptrace_options_callback.
1879 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1881 * linux-arm-low.c (struct update_registers_data): Remove.
1882 (update_registers_callback): Return void, take arguments
1883 directly, don't check thread's pid.
1884 (arm_insert_point, arm_remove_point): Use for_each_thread.
1886 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1888 * win32-low.c (continue_one_thread): Return void, take argument
1890 (child_continue): Use for_each_thread.
1892 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1894 * win32-i386-low.c (update_debug_registers_callback): Rename
1896 (update_debug_registers): ... this, return void, remove pid_p arg.
1897 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1899 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1901 * inferiors.h (struct process_info): Add constructor, initialize
1903 <syscalls_to_catch>: Change type to std::vector<int>.
1904 * inferiors.c (add_process): Allocate process_info with new.
1905 (remove_process): Free process_info with delete.
1906 * linux-low.c (handle_extended_wait): Adjust.
1907 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1908 * server.c (handle_general_set): Adjust.
1910 2017-11-16 Pedro Alves <palves@redhat.com>
1912 * remote-utils.c (remote_close): Block SIGIO signals instead of
1913 uninstalling the SIGIO handler.
1915 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1917 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1919 2017-11-16 Yao Qi <yao.qi@linaro.org>
1921 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1922 (tic6x_store_gregset): Likewise.
1923 (tic6x_usrregs_info): Move it up.
1925 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1927 * Makefile.in: Update arch rules.
1928 * configure.srv: Explicitly mark arch/ files.
1930 2017-11-13 Andreas Schwab <schwab@suse.de>
1932 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1934 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1936 2017-11-06 Pedro Alves <palves@redhat.com>
1938 * config.in, configure: Regenerate.
1940 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1942 * target.c (struct thread_search): Remove.
1943 (thread_search_callback): Remove.
1944 (prepare_to_access_memory): Use for_each_thread instead of
1945 find_inferior. Inline code from thread_search_callback.
1947 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1949 * server.c (struct visit_actioned_threads_data): Remove.
1950 (visit_actioned_threads): Change prototype to take arguments
1952 (resume): Use find_thread instead of find_inferior.
1954 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1956 * server.c (queue_stop_reply_callback): Change prototype, return
1958 (find_status_pending_thread_callback): Remove.
1959 (handle_status): Replace find_inferior with find_thread and
1962 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1964 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1966 (aarch64_store_gregset): Likewise.
1967 (aarch64_fill_fpregset): Likewise.
1968 (aarch64_store_fpregset): Likewise.
1970 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1972 * gdbthread.h (find_thread, for_each_thread): New functions.
1973 * inferiors.c (thread_of_pid): Remove.
1974 (find_any_thread_of_pid): Use find_thread.
1975 * linux-low.c (num_lwps): Use for_each_thread.
1977 2017-10-17 Yao Qi <yao.qi@linaro.org>
1979 * Makefile.in: Remove one rule.
1980 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1982 2017-10-17 Yao Qi <yao.qi@linaro.org>
1984 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1985 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1987 2017-10-17 Yao Qi <yao.qi@linaro.org>
1989 * configure.srv: Rename arm.o with arch/arm.o.
1991 2017-10-17 Yao Qi <yao.qi@linaro.org>
1993 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1994 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1995 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1996 (arch-i386.o, arch-amd64.o): Remove rules.
1997 (arch/%.o): New rule.
1998 Update POSTCOMPILE and COMPILE.pre.
1999 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2000 * configure: Re-generated.
2001 * configure.srv: Replace arch-i386.o with arch/i386.o.
2002 Replace arch-amd64.o with arch/amd64.o.
2004 2017-10-16 Yao Qi <yao.qi@linaro.org>
2006 * configure: Regenerated.
2008 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2010 * inferiors.h: (struct inferior_list): Remove.
2011 (struct inferior_list_entry); Remove.
2012 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2013 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2014 get_first_inferior): Remove.
2015 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2016 find_inferior_id, find_inferior_in_random): Change signature.
2017 * inferiors.c (all_threads): Change type to
2018 std::list<thread_info *>.
2019 (get_thread): Remove macro.
2020 (find_inferior, find_inferior_id): Change signature, implement
2022 (find_inferior_in_random): Change signature, implement using
2023 find_thread_in_random.
2024 (for_each_inferior, for_each_inferior_with_data): Change
2025 signature, implement using for_each_thread.
2026 (add_inferior_to_list, remove_inferior): Remove.
2027 (add_thread, get_first_thread, thread_of_pid,
2028 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2029 (get_first_inferior, one_inferior_p, clear_inferior_list):
2031 (clear_inferiors, get_thread_process): Update.
2032 * gdbthread.h: Include <list>.
2033 (struct thread_info) <entry>: Remove field.
2035 (all_threads): Change type to std::list<thread_info *>.
2036 (get_first_inferior): Add doc.
2037 (find_thread, for_each_thread, find_thread_in_random): New
2039 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2040 * linux-arm-low.c (update_registers_callback): Update.
2041 * linux-low.c (second_thread_of_pid_p): Update.
2042 (kill_one_lwp_callback, linux_detach_lwp_callback,
2043 delete_lwp_callback, status_pending_p_callback, same_lwp,
2044 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2045 iterate_over_lwps, not_stopped_callback,
2046 resume_stopped_resumed_lwps, count_events_callback,
2047 select_singlestep_lwp_callback, select_event_lwp_callback,
2048 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2049 suspend_and_send_sigstop_callback, wait_for_sigstop,
2050 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2051 lwp_running, linux_set_resume_request, resume_status_pending_p,
2052 need_step_over_p, start_step_over, linux_resume_one_thread,
2053 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2054 reset_lwp_ptrace_options_callback): Update.
2055 * linux-mips-low.c (update_watch_registers_callback): Update.
2056 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2058 (free_register_cache_thread_one): Remove.
2059 (regcache_release): Update.
2060 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2061 handle_qxfer_threads_worker): Update.
2062 (handle_query): Update, use list iterator.
2063 (visit_actioned_threads, handle_pending_status,
2064 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2065 clear_pending_status_callback, set_pending_status_callback,
2066 find_status_pending_thread_callback, handle_status,
2067 process_serial_event): Update.
2068 * target.c (thread_search_callback): Update.
2069 * thread-db.c (thread_db_get_tls_address): Update.
2070 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2072 * win32-i386-low.c (update_debug_registers_callback): Update.
2073 * win32-low.c (delete_thread_info, child_delete_thread,
2074 continue_one_thread, suspend_one_thread,
2075 get_child_debug_event): Adjust.
2077 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2079 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2080 * inferiors.h: Include <list>.
2081 (struct process_info) <entry>: Remove field.
2083 (pid_of): Change macro to function.
2084 (ptid_of, lwpid_of): Remove macro.
2085 (all_processes): Change type to std::list<process_info *>.
2086 (ALL_PROCESSES): Remove macro.
2087 (for_each_process, find_process): New function.
2088 * inferiors.c (all_processes): Change type to
2089 std::list<process_info *>.
2090 (find_thread_process): Adjust.
2091 (add_process): Likewise.
2092 (remove_process): Likewise.
2093 (find_process_pid): Likewise.
2094 (get_first_process): Likewise.
2095 (started_inferior_callback): Remove.
2096 (have_started_inferiors_p): Adjust.
2097 (attached_inferior_callback): Remove.
2098 (have_attached_inferiors_p): Adjust.
2099 * linux-low.c (check_zombie_leaders): Likewise.
2100 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2101 (x86_linux_update_xmltarget): Adjust.
2102 * server.c (handle_query): Likewise.
2103 (gdb_reattached_process): Remove.
2104 (handle_status): Adjust.
2105 (kill_inferior_callback): Likewise.
2106 (detach_or_kill_inferior): Remove.
2107 (print_started_pid): Likewise.
2108 (print_attached_pid): Likewise.
2109 (detach_or_kill_for_exit): Update.
2110 (process_serial_event): Likewise.
2111 * linux-arm-low.c (arm_new_fork): Likewise.
2113 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2115 * dll.h: Include <list>.
2116 (struct dll_info): Add constructor.
2117 <entry>: Remove field.
2118 (all_dlls): Change type to std::list<dll_info>.
2119 * dll.c: Include <algorithm>.
2120 (get_dll): Remove macro.
2121 (all_dlls): Change type to std::list<dll_info *>.
2122 (free_one_dll): Remove.
2123 (match_dll): Likewise.
2124 (loaded_dll): Adjust.
2125 (unloaded_dll): Adjust to all_dlls type change, use
2126 std::find_if. Inline code from match_dll.
2127 (clear_dlls): Adjust to all_dlls type change.
2128 * server.c (emit_dll_description): Remove.
2129 (handle_qxfer_libraries): Adjust to all_dlls type change,
2130 integrate emit_dll_description's functionality.
2132 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2134 * linux-low.h (struct linux_target_ops) <delete_process>: New
2136 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2137 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2138 (struct linux_target_ops): Add delete_process callback.
2139 * linux-arm-low.c (arm_delete_process): New.
2140 (struct linux_target_ops): Add delete_process callback.
2141 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2142 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2143 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2144 * linux-mips-low.c (mips_linux_delete_process): New.
2145 (struct linux_target_ops): Add delete_process callback.
2146 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2147 * linux-s390-low.c (struct linux_target_ops): Likewise.
2148 * linux-sh-low.c (struct linux_target_ops): Likewise.
2149 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2150 * linux-tile-low.c (struct linux_target_ops): Likewise.
2151 * linux-x86-low.c (x86_linux_delete_process): New.
2152 (struct linux_target_ops): Add delete_process callback.
2153 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2155 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2157 * linux-aarch64-low.c (the_low_target): Add thread delete
2159 * linux-arm-low.c (arm_delete_thread): New function.
2160 (the_low_target): Add thread delete callback.
2161 * linux-bfin-low.c (the_low_target): Likewise.
2162 * linux-crisv32-low.c (the_low_target): Likewise.
2163 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2165 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2167 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2168 * linux-mips-low.c (mips_linux_delete_thread): New function.
2169 (the_low_target): Add thread delete callback.
2170 * linux-ppc-low.c (the_low_target): Likewise.
2171 * linux-s390-low.c (the_low_target): Likewise.
2172 * linux-sh-low.c (the_low_target): Likewise.
2173 * linux-tic6x-low.c (the_low_target): Likewise.
2174 * linux-tile-low.c (the_low_target): Likewise.
2175 * linux-x86-low.c (the_low_target): Likewise.
2176 * linux-xtensa-low.c (the_low_target): Likewise.
2178 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2180 * win32-low.c: Include "common-inferior.h".
2182 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2184 * inferiors.c (set_inferior_cwd): New function.
2185 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2186 (handle_query): Inform that QSetWorkingDir is supported.
2187 * win32-low.c (create_process): Pass the inferior's cwd to
2190 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2192 * inferiors.c (current_inferior_cwd): New global variable.
2193 (get_inferior_cwd): New function.
2194 * inferiors.h (struct process_info) <cwd>: New field.
2196 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2198 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2199 (OBS): Add gdb_tilde_expand.o.
2201 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2203 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2204 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2206 2017-09-29 Pedro Alves <palves@redhat.com>
2208 * ax.c (gdb_parse_agent_expr): Constify.
2209 * ax.h (gdb_parse_agent_expr): Constify.
2210 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2212 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2213 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2214 * remote-utils.h (read_ptid): Constify.
2215 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2216 (process_point_options, process_serial_event): Constify.
2217 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2218 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2219 (cmd_qtbuffer): Constify.
2221 2017-09-29 Pedro Alves <palves@redhat.com>
2223 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2226 2017-09-29 Pedro Alves <palves@redhat.com>
2228 * linux-low.c (handle_extended_wait): Pass parent thread instead
2229 of process to thread_db_notice_clone.
2230 * linux-low.h (thread_db_notice_clone): Replace parent process
2231 parameter with parent thread parameter.
2232 * thread-db.c (find_one_thread): Add comment.
2233 (thread_db_notice_clone): Replace parent process parameter with
2234 parent thread parameter. Temporarily switch to the parent thread.
2236 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2238 * gdbthread.h: Include "common-gdbthread.h".
2239 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2240 "if" when validating the ptid.
2241 * remote-utils.c: Include "gdbthread.h".
2242 (prepare_resume_reply): Use "switch_to_thread".
2243 * target.c (done_accessing_memory): Likewise.
2245 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2247 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2248 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2249 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2250 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2251 s390x-gs-linux64-ipa.o to ipa_obj.
2252 * linux-s390-low.c (HWCAP_S390_GS): New define.
2253 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2255 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2256 (s390_arch_setup): Check for guarded-storage support and choose
2258 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2259 init_registers_s390x_gs_linux64.
2260 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2262 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2263 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2265 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2267 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2269 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2271 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2272 (thread_db_thread_handle): Declare.
2273 * linux-low.c (linux_target_ops): Initialize thread_handle.
2274 * server.c (handle_qxfer_threads_worker): Add support for
2276 * target.h (struct target_ops): Add new function pointer,
2278 (target_thread_handle): Define.
2279 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2281 (thread_db_thread_handle): New function.
2283 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2285 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2286 * linux-low.h (thread_db_notice_clone): Declare.
2287 * thread-db.c (thread_db_notice_clone): New function.
2289 2017-09-21 Pedro Alves <palves@redhat.com>
2291 * server.c (gdb_read_memory, handle_status, process_serial_event)
2292 (handle_serial_event, handle_target_event): Adjust to
2293 set_desired_thread prototype change.
2294 * target.c (set_desired_thread): Remove 'use_general' parameter
2296 * target.h (set_desired_thread): Remove 'use_general' parameter.
2298 2017-09-20 Tom Tromey <tom@tromey.com>
2300 * target.c (target_terminal::terminal_state): Define.
2301 (target_terminal::init): Rename from target_terminal_init.
2302 (target_terminal::inferior): Rename from
2303 target_terminal_inferior.
2304 (target_terminal::ours): Rename from target_terminal_ours.
2305 (target_terminal::ours_for_output, target_terminal::info): New.
2307 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2309 * server.c (accumulate_file_name_length): Remove.
2310 (emit_dll_description): Adjust to std::string change.
2311 (handle_qxfer_libraries): Use std::string to hold document.
2313 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2315 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2316 return type of xml_escape_text.
2317 * server.c (emit_dll_description): Likewise.
2319 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2321 * server.c (captured_main): Accept argument for --selftest.
2322 Update run_tests call.
2323 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2324 when registering selftests.
2326 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2328 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2329 instead of "VEC" for "target_desc.reg_defs".
2330 (regcache_cpy): Likewise.
2331 (registers_to_string): Likewise.
2332 (registers_from_string): Likewise.
2333 (find_regno): Likewise.
2334 (supply_regblock): Likewise.
2335 (regcache_raw_read_unsigned): Likewise.
2336 * tdesc.c (init_target_desc): Likewise.
2337 (tdesc_create_reg): Likewise.
2338 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2339 (struct target_desc) <reg_defs>: Convert to "std::vector".
2340 (target_desc): Do not initialize "reg_defs".
2341 (~target_desc): Update code to use "std::vector" instead of "VEC"
2342 for "target_desc.reg_defs".
2343 (operator==): Likewise.
2345 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2347 * inferiors.h (thread_to_gdb_id): Remove.
2348 * inferiors.c (thread_to_gdb_id): Remove.
2349 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2350 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2351 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2353 * nto-low.c (nto_fetch_registers, nto_store_registers,
2354 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2356 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2358 * inferiors.h (gdb_id_to_thread_id): Remove.
2359 * inferiors.c (gdb_id_to_thread_id): Remove.
2360 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2361 removal. Move pid declaration closer to where it's used.
2363 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2365 * server.c (handle_detach): New function.
2366 (process_serial_event): Move code out, call handle_detach.
2368 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2370 * server.c (require_running): Rename to ...
2371 (require_running_or_return): ... this ...
2372 (require_running_or_break): ... and this.
2373 (handle_query, process_serial_event): Adjust.
2375 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2377 * linux-low.c (linux_set_resume_request): Remove unused
2380 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2382 * server.c (first_thread_of): Remove.
2383 (process_serial_event): Replace usage of first_thread_of with
2384 find_any_thread_of_pid.
2385 * tracepoint.c (same_process_p): Remove.
2386 (gdb_agent_about_to_close): Replace usage of same_process_p with
2387 find_any_thread_of_pid.
2388 * linux-x86-low.c (same_process_callback): Remove.
2389 (x86_arch_setup_process_callback): Replace usage of
2390 same_process_callback with find_any_thread_of_pid.
2391 * thread-db.c (any_thread_of): Remove.
2392 (switch_to_process): Replace usage of any_thread_of with
2393 find_any_thread_of_pid.
2394 * inferiors.c (thread_pid_matches_callback): Remove.
2395 (find_thread_process): Adjust to use find_any_thread_of_pid.
2397 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2399 * regcache.c (get_thread_regcache): Guard calls to "memset"
2402 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2404 * linux-low.c (handle_extended_wait): Use
2405 "allocate_target_description" instead of "XNEW".
2406 * linux-x86-low.c (initialize_low_arch): Likewise.
2408 2017-09-05 Yao Qi <yao.qi@linaro.org>
2410 * configure.srv (srv_i386_regobj): Remove.
2411 (srv_amd64_regobj): Remove.
2412 (srv_regobj): Set it to "" for x86 non-linux targets.
2413 * linux-x86-tdesc.c (i386_linux_read_description):
2414 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2415 (init_registers_i386): Remove the declaration.
2416 (tdesc_i386): Remove the declaration.
2417 (lynx_i386_arch_setup): Call i386_create_target_description.
2418 * nto-x86-low.c: Likewise.
2419 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2420 [!__x86_64__]: include arch/i386.h.
2421 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2423 2017-09-05 Yao Qi <yao.qi@linaro.org>
2425 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2426 i386/amd64-XXX-linux from it.
2428 2017-09-05 Yao Qi <yao.qi@linaro.org>
2430 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2432 (ipa_amd64_linux_regobj): Remove.
2433 (ipa_x32_linux_regobj): Remove.
2435 2017-09-05 Yao Qi <yao.qi@linaro.org>
2437 * Makefile.in (arch-amd64.o): New rule.
2438 * configure.srv: Append arch-amd64.o.
2439 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2440 (get_ipa_tdesc): Call amd64_linux_read_description.
2441 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2442 and init_registers_amd64_XXX.
2443 * linux-x86-low.c (x86_linux_read_description): Call
2444 amd64_linux_read_description.
2445 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2446 (initialize_low_arch): Don't call init_registers_x32_XXX and
2447 init_registers_amd64_XXX.
2448 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2449 and tdesc_amd64_XXX.
2450 [__x86_64__] (amd64_tdesc_test): New function.
2451 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2452 and init_registers_amd64_XXX.
2453 * linux-x86-tdesc.c: Include arch/amd64.h.
2454 (xcr0_to_tdesc_idx): New function.
2455 (i386_linux_read_description): New function.
2456 (amd64_get_ipa_tdesc_idx): New function.
2457 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2458 (amd64_get_ipa_tdesc): Declare.
2460 2017-09-05 Yao Qi <yao.qi@linaro.org>
2462 * configure.srv (srv_i386_linux_xmlfiles): Remove
2463 i386/i386-XXX-linux.xml from it.
2465 2017-09-05 Yao Qi <yao.qi@linaro.org>
2467 * configure.srv: Set srv_i386_linux_regobj empty if $development
2469 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2470 initialize_low_tdesc.
2471 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2472 with #if initialize_low_tdesc.
2473 * linux-x86-tdesc-selftest.c: New file.
2474 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2476 2017-09-05 Yao Qi <yao.qi@linaro.org>
2478 * Makefile.in (arch-i386.o): New rule.
2479 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2480 (x86_64-*-linux*): Likewise.
2481 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2482 include arch/i386.h.
2483 (i386_linux_read_description): Remove code and call
2484 i386_create_target_description.
2485 * tdesc.c (allocate_target_description): New function.
2486 * tdesc.h (set_tdesc_architecture): Remove declaration.
2487 (set_tdesc_osabi): Likewise.
2489 2017-09-05 Yao Qi <yao.qi@linaro.org>
2491 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2492 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2493 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2495 * server.c (get_features_xml): Call tdesc_get_features_xml.
2496 * tdesc.c (set_tdesc_architecture): New function.
2497 (set_tdesc_osabi): New function.
2498 (tdesc_get_features_xml): New function.
2499 (tdesc_create_feature): Add an argument.
2500 * tdesc.h (struct target_desc) <features>: New field.
2501 <arch, osabi>: New field.
2502 (~target_desc): xfree features, arch, and osabi.
2503 (target_desc::oerator==): Don't compare .xmltarget.
2504 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2505 (set_tdesc_osabi): Likewise.
2506 (tdesc_get_features_xml): Likewise.
2508 2017-09-05 Yao Qi <yao.qi@linaro.org>
2510 * linux-x86-tdesc.c: Include selftest.h.
2511 (i386_tdesc_test): New function.
2512 (initialize_low_tdesc): Call selftests::register_test.
2513 * tdesc.h: Include regdef.h.
2514 (target_desc): Override operator == and !=.
2516 2017-09-05 Yao Qi <yao.qi@linaro.org>
2518 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2519 (ipa_obj): Likewise.
2520 * linux-i386-ipa.c: Include common/x86-xstate.h
2521 (get_ipa_tdesc): Call i386_linux_read_description.
2522 (initialize_low_tracepoint): Don't call init_registers_XXX
2523 functions, call initialize_low_tdesc instead.
2524 * linux-x86-low.c (x86_linux_read_description): Call
2525 i386_linux_read_description.
2526 (initialize_low_arch): Don't call init_registers_i386_XXX
2527 functions, call initialize_low_tdesc.
2528 * linux-x86-tdesc.c: New file.
2529 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2530 (i386_get_ipa_tdesc_idx): Declare.
2531 (i386_get_ipa_tdesc): Declare.
2532 (initialize_low_tdesc): Declare.
2534 2017-09-05 Yao Qi <yao.qi@linaro.org>
2536 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2539 2017-09-05 Yao Qi <yao.qi@linaro.org>
2541 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2542 * regcache.c (get_thread_regcache): Use VEC_length.
2543 (init_register_cache): Likewise.
2544 (regcache_cpy): Likewise.
2545 (registers_to_string): Iterate reg_defs via VEC_iterate.
2546 (find_regno): Likewise.
2547 (find_register_by_number): Use VEC_index.
2548 (register_size): Call find_register_by_number.
2549 (register_data): Call find_register_by_number.
2550 (supply_regblock): Use VEC_length.
2551 (regcache_raw_read_unsigned): Likewise.
2552 * tdesc.c (init_target_desc): Iterate reg_defs via
2554 (default_description): Update initializer.
2555 (copy_target_description): Don't update field num_registers.
2556 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2557 <num_registers>: Remove.
2559 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2561 * Makefile.in (.SECONDARY): Define target.
2563 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2565 * linux-low.c (linux_wait_1): Adjust.
2566 * server.c (queue_stop_reply_callback): Adjust.
2568 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2570 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2571 QEnvironmentUnset and QEnvironmentReset packets.
2572 (handle_query): Inform remote that QEnvironmentHexEncoded,
2573 QEnvironmentUnset and QEnvironmentReset are supported.
2575 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2577 * inferiors.h (inferior_target_data): Rename to ...
2578 (thread_target_data): ... this.
2579 (inferior_regcache_data): Rename to ...
2580 (thread_regcache_data): ... this.
2581 (set_inferior_regcache_data): Rename to ...
2582 (set_thread_regcache_data): ... this.
2583 * inferiors.c (inferior_target_data): Rename to ...
2584 (thread_target_data): ... this.
2585 (inferior_regcache_data): Rename to ...
2586 (thread_regcache_data): ... this.
2587 (set_inferior_regcache_data): Rename to ...
2588 (set_thread_regcache_data): ... this.
2589 (free_one_thread): Update.
2590 * linux-low.h (get_thread_lwp): Update.
2591 * regcache.c (get_thread_regcache): Update.
2592 (regcache_invalidate_thread): Update.
2593 (free_register_cache_thread): Update.
2594 * win32-i386-low.c (update_debug_registers_callback): Update.
2595 (win32_get_current_dr): Update.
2596 * win32-low.c (thread_rec): Update.
2597 (delete_thread_info): Update.
2598 (continue_one_thread): Update.
2599 (suspend_one_thread): Update.
2601 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2603 * inferiors.c (set_inferior_target_data): Remove.
2604 * inferiors.h (set_inferior_target_data): Remove.
2606 2017-08-18 Yao Qi <yao.qi@linaro.org>
2608 * Makefile.in (OBS): Add selftest.o.
2609 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2610 * configure, config.in: Re-generated.
2611 * server.c: Include common/sefltest.h.
2612 (captured_main): Handle option --selftest.
2614 2017-08-09 Yao Qi <yao.qi@linaro.org>
2616 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2617 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2618 i386-avx-mpx.o and i386-mmx.o.
2619 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2620 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2621 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2622 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2623 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2624 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2625 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2626 i386/amd64-avx-mpx.xml.
2628 2017-08-09 Yao Qi <yao.qi@linaro.org>
2630 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2631 and x32-avx-avx512.o.
2632 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2633 i386/x32-avx-avx512.xml.
2635 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2637 * tracepoint.h (enum class fast_tpoint_collect_result): New
2639 (fast_tracepoint_collecting): Change return type to
2640 fast_tpoint_collect_result.
2641 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2642 * linux-low.h: Include tracepoint.h.
2643 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2644 fast_tpoint_collect_result.
2645 * linux-low.c (handle_tracepoints): Adjust.
2646 (linux_fast_tracepoint_collecting): Change return type to
2647 fast_tpoint_collect_result.
2648 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2649 linux_wait_1, stuck_in_jump_pad_callback,
2650 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2651 proceed_one_lwp): Adjust to type change.
2653 2017-07-10 Yao Qi <yao.qi@linaro.org>
2655 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2657 2017-06-29 Yao Qi <yao.qi@linaro.org>
2659 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2661 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2663 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2665 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2667 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2669 * linux-low.c (linux_create_inferior): Adjust code to access the
2670 environment information via 'gdb_environ' class.
2671 * lynx-low.c (lynx_create_inferior): Likewise.
2672 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2673 (get_environ): Return a pointer to 'our_environ'.
2674 (captured_main): Initialize 'our_environ'.
2675 * server.h (get_environ): Adjust prototype.
2676 * spu-low.c (spu_create_inferior): Adjust code to access the
2677 environment information via 'gdb_environ' class.
2679 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2681 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2682 usage of "register" keyword.
2684 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2686 * configure: Re-generate.
2688 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2690 * configure: Re-generate.
2692 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2694 * Makefile.in (COMPILE.pre): Add "-x c++".
2696 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2698 * fork-child.c: Conditionally include <signal.h>.
2700 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2702 * server.c (handle_general_set): Handle new packet
2703 "QStartupWithShell".
2704 (handle_query): Add "QStartupWithShell" to the list of supported
2706 (gdbserver_usage): Add help text explaining the
2707 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2709 (captured_main): Recognize and act upon the presence of the new
2712 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2713 Pedro Alves <palves@redhat.com>
2715 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2716 * configure: Regenerate.
2717 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2719 (i[34567]86-*-lynxos*): Likewise.
2720 (spu*-*-*): Likewise.
2721 * fork-child.c: New file.
2722 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2724 (linux_ptrace_fun): New function.
2725 (linux_create_inferior): Adjust function prototype to reflect
2726 change on "target.h". Adjust function code to use
2728 (linux_request_interrupt): Delete "signal_pid".
2729 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2730 (lynx_ptrace_fun): New function.
2731 (lynx_create_inferior): Adjust function prototype to reflect
2732 change on "target.h". Adjust function code to use
2734 * nto-low.c (nto_create_inferior): Adjust function prototype and
2735 code to reflect change on "target.h". Update comments.
2736 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2737 "common-terminal.h" and "environ.h".
2738 (terminal_fd): Moved to fork-child.c.
2739 (old_foreground_pgrp): Likewise.
2740 (restore_old_foreground_pgrp): Likewise.
2741 (last_status): Make it global.
2742 (last_ptid): Likewise.
2743 (our_environ): New variable.
2744 (startup_with_shell): Likewise.
2745 (program_name): Likewise.
2746 (program_argv): Rename to...
2747 (program_args): ...this.
2748 (wrapper_argv): New variable.
2749 (start_inferior): Delete function.
2750 (get_exec_wrapper): New function.
2751 (get_exec_file): Likewise.
2752 (get_environ): Likewise.
2753 (prefork_hook): Likewise.
2754 (post_fork_inferior): Likewise.
2755 (postfork_hook): Likewise.
2756 (postfork_child_hook): Likewise.
2757 (handle_v_run): Update code to deal with arguments coming from the
2758 remote host. Update calls from "start_inferior" to
2760 (captured_main): Likewise. Initialize environment variable. Call
2762 * server.h (post_fork_inferior): New prototype.
2763 (get_environ): Likewise.
2764 (last_status): Declare.
2765 (last_ptid): Likewise.
2766 (signal_pid): Likewise.
2767 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2768 (spu_ptrace_fun): New function.
2769 (spu_create_inferior): Adjust function prototype to reflect change
2770 on "target.h". Adjust function code to use "fork_inferior".
2771 * target.c (target_terminal_init): New function.
2772 (target_terminal_inferior): Likewise.
2773 (target_terminal_ours): Likewise.
2774 * target.h: Include <vector>.
2775 (struct target_ops) <create_inferior>: Update prototype.
2776 (create_inferior): Update macro.
2777 * utils.c (gdb_flush_out_err): New function.
2778 * win32-low.c (win32_create_inferior): Adjust function prototype
2779 and code to reflect change on "target.h".
2781 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2783 * inferiors.c (switch_to_thread): New function.
2785 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2787 * Makefile.in (SFILE): Add "common/job-control.c".
2788 (OBS): Add "job-control.o".
2790 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2792 * Makefile: Remove "@host_makefile_frag@".
2794 2017-05-05 Pedro Alves <palves@redhat.com>
2796 * configure: Regenerate.
2798 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2800 * configure: Regenerate.
2802 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2804 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2805 software_single_step change of return type to
2806 std::vector<CORE_ADDR>.
2807 * linux-low.c (install_software_single_step_breakpoints):
2809 * linux-low.h (install_software_single_step_breakpoints):
2812 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2814 * remote-utils.c: Include "gdb_termios.h" instead of
2816 * terminal.h: Delete file.
2818 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2820 * server.c: Include <vector>.
2821 <program_argv, wrapper_argv>: Convert to std::vector.
2822 (start_inferior): Rewrite function to use C++.
2823 (handle_v_run): Likewise. Update code that calculates the argv
2824 based on the vRun packet; use C++.
2825 (captured_main): Likewise.
2827 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2829 * server.c (handle_v_cont): Initialize thread_resume::thread
2832 2017-04-05 Pedro Alves <palves@redhat.com>
2834 * configure: Regenerate.
2836 2017-04-05 Pedro Alves <palves@redhat.com>
2838 * gdbreplay.c (sync_error): Constify.
2839 * linux-x86-low.c (push_opcode): Constify.
2841 2017-04-05 Pedro Alves <palves@redhat.com>
2843 * win32-low.c (get_child_debug_event)
2844 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2845 Report TARGET_WAITKIND_SPURIOUS instead.
2847 2017-04-05 Pedro Alves <palves@redhat.com>
2849 * remote-utils.c (remote_prepare, remote_open): Constify.
2850 * remote-utils.h (remote_prepare, remote_open): Constify.
2851 * server.c (captured_main): Constify 'port' handling.
2853 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2855 * Makefile.in (clean): Clear .deps.
2857 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2859 * .gitignore: Remove generated files, replace with wildcard.
2860 * (clean): Replace removal of generated files with wildcard.
2861 (version.c): Replace with...
2862 (version-generated.c): ...this.
2863 (xml-builtin.c): Replace with...
2864 (xml-builtin-generated.c): ...this.
2865 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2866 (%.c: *regformats*): Replace with...
2867 (%-generated.c: *regformats*): ...this.
2869 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2871 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2872 (xtensa_fill_gregset): Call collect_register_by_name for
2874 (xtensa_store_gregset): Call supply_register_by_name for
2877 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2879 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2880 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2881 (xtensa_store_gregset): Call supply_register for all registers in
2882 a0_regnum..a0_regnum + C0_NREGS range.
2884 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2886 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2887 (ax-ipa.o: ax.c): Remove.
2888 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2889 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2890 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2891 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2892 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2894 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2896 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2897 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2898 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2899 (errors-ipa.o: ../common/errors.c): Remove.
2900 (format-ipa.o: ../common/format.c): Remove.
2901 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2903 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2905 * Makefile.in (%-ipa.o: %.c): New rule.
2906 (tracepoint-ipa.o: tracepoint.c): Remove.
2907 (utils-ipa.o: utils.c): Remove.
2908 (remote-utils-ipa.o: remote-utils.c): Remove.
2909 (regcache-ipa.o: regcache.c): Remove.
2910 (i386-linux-ipa.o: i386-linux.c): Remove.
2911 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2912 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2913 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2914 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2915 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2916 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2917 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2918 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2919 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2920 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2921 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2922 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2923 (aarch64-ipa.o: aarch64.c): Remove.
2924 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2925 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2926 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2927 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2928 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2929 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2930 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2931 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2932 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2933 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2934 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2935 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2936 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2937 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2938 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2939 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2940 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2941 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2942 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2943 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2944 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2945 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2946 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2947 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2948 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2949 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2950 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2951 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2952 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2953 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2954 (tdesc-ipa.o: tdesc.c): Remove.
2955 (x32-linux-ipa.o: x32-linux.c): Remove.
2956 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2957 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2959 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2961 * Makefile.in (%.o: ../arch/%.c): New rule.
2962 (arm.o: ../arch/arm.c): Remove.
2963 (arm-linux.o: ../arch/arm-linux.c): Remove.
2964 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2965 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2967 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2969 * Makefile.in (%.o: ../nat/%.c): New rule.
2970 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2971 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2972 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2973 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2974 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2975 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2976 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2977 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2978 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2979 (linux-personality.o: ../nat/linux-personality.c): Remove.
2980 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2981 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2982 (x86-linux.o: ../nat/x86-linux.c): Remove.
2983 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2984 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2986 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2988 * Makefile.in (%.o: ../common/%.c): New rule.
2989 (signals.o: ../common/signals.c): Remove.
2990 (print-utils.o: ../common/print-utils.c): Remove.
2991 (rsp-low.o: ../common/rsp-low.c): Remove.
2992 (common-utils.o: ../common/common-utils.c): Remove.
2993 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2994 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2995 (vec.o: ../common/vec.c): Remove.
2996 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2997 (xml-utils.o: ../common/xml-utils.c): Remove.
2998 (ptid.o: ../common/ptid.c): Remove.
2999 (buffer.o: ../common/buffer.c): Remove.
3000 (format.o: ../common/format.c): Remove.
3001 (filestuff.o: ../common/filestuff.c): Remove.
3002 (agent.o: ../common/agent.c): Remove.
3003 (errors.o: ../common/errors.c): Remove.
3004 (environ.o: ../common/environ.c): Remove.
3005 (common-debug.o: ../common/common-debug.c): Remove.
3006 (cleanups.o: ../common/cleanups.c): Remove.
3007 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3008 (fileio.o: ../common/fileio.c): Remove.
3009 (common-regcache.o: ../common/common-regcache.c): Remove.
3010 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3011 (new-op.o: ../common/new-op.c): Remove.
3012 (btrace-common.o: ../common/btrace-common.c): Remove.
3014 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3016 * Makefile.in (%.o: ../target/%.c): New rule.
3017 (waitstatus.o: ../target/waitstatus.c): Remove.
3019 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3022 (%.c: ../regformats/%.dat,
3023 (%.c: ../regformats/arm/%.dat,
3024 (%.c: ../regformats/i386/%.dat,
3025 (%.c: ../regformats/rs6000/%.dat): New rules.
3026 (aarch64.c): Remove.
3027 (reg-arm.c): Remove.
3028 (arm-with-iwmmxt.c): Remove.
3029 (arm-with-vfpv2.c): Remove.
3030 (arm-with-vfpv3.c): Remove.
3031 (arm-with-neon.c): Remove.
3032 (reg-bfin.c): Remove.
3033 (reg-cris.c): Remove.
3034 (reg-crisv32.c): Remove.
3036 (i386-linux.c): Remove.
3037 (i386-avx.c): Remove.
3038 (i386-avx-linux.c): Remove.
3039 (i386-avx-avx512.c): Remove.
3040 (i386-avx-avx512-linux.c): Remove.
3041 (i386-mpx.c): Remove.
3042 (i386-mpx-linux.c): Remove.
3043 (i386-avx-mpx-avx512-pku.c): Remove.
3044 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3045 (i386-avx-mpx.c): Remove.
3046 (i386-avx-mpx-linux.c): Remove.
3047 (i386-mmx.c): Remove.
3048 (i386-mmx-linux.c): Remove.
3049 (reg-ia64.c): Remove.
3050 (reg-m32r.c): Remove.
3051 (reg-m68k.c): Remove.
3053 (mips-linux.c): Remove.
3054 (mips-dsp-linux.c): Remove.
3055 (mips64-linux.c): Remove.
3056 (mips64-dsp-linux.c): Remove.
3057 (nios2-linux.c): Remove.
3058 (powerpc-32.c): Remove.
3059 (powerpc-32l.c): Remove.
3060 (powerpc-altivec32l.c): Remove.
3061 (powerpc-cell32l.c): Remove.
3062 (powerpc-vsx32l.c): Remove.
3063 (powerpc-isa205-32l.c): Remove.
3064 (powerpc-isa205-altivec32l.c): Remove.
3065 (powerpc-isa205-vsx32l.c): Remove.
3066 (powerpc-e500l.c): Remove.
3067 (powerpc-64l.c): Remove.
3068 (powerpc-altivec64l.c): Remove.
3069 (powerpc-cell64l.c): Remove.
3070 (powerpc-vsx64l.c): Remove.
3071 (powerpc-isa205-64l.c): Remove.
3072 (powerpc-isa205-altivec64l.c): Remove.
3073 (powerpc-isa205-vsx64l.c): Remove.
3074 (s390-linux32.c): Remove.
3075 (s390-linux32v1.c): Remove.
3076 (s390-linux32v2.c): Remove.
3077 (s390-linux64.c): Remove.
3078 (s390-linux64v1.c): Remove.
3079 (s390-linux64v2.c): Remove.
3080 (s390-te-linux64.c): Remove.
3081 (s390-vx-linux64.c): Remove.
3082 (s390-tevx-linux64.c): Remove.
3083 (s390x-linux64.c): Remove.
3084 (s390x-linux64v1.c): Remove.
3085 (s390x-linux64v2.c): Remove.
3086 (s390x-te-linux64.c): Remove.
3087 (s390x-vx-linux64.c): Remove.
3088 (s390x-tevx-linux64.c): Remove.
3089 (tic6x-c64xp-linux.c): Remove.
3090 (tic6x-c64x-linux.c): Remove.
3091 (tic6x-c62x-linux.c): Remove.
3093 (reg-sparc64.c): Remove.
3094 (reg-spu.c): Remove.
3096 (amd64-linux.c): Remove.
3097 (amd64-avx.c): Remove.
3098 (amd64-avx-linux.c): Remove.
3099 (amd64-avx-avx512.c): Remove.
3100 (amd64-avx-avx512-linux.c): Remove.
3101 (amd64-mpx.c): Remove.
3102 (amd64-mpx-linux.c): Remove.
3103 (amd64-avx-mpx-avx512-pku.c): Remove.
3104 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3105 (amd64-avx-mpx.c): Remove.
3106 (amd64-avx-mpx-linux.c): Remove.
3108 (x32-linux.c): Remove.
3109 (x32-avx.c): Remove.
3110 (x32-avx-linux.c): Remove.
3111 (x32-avx-avx512.c): Remove.
3112 (x32-avx-avx512-linux.c): Remove.
3113 (reg-xtensa.c): Remove.
3114 (reg-tilegx.c): Remove.
3115 (reg-tilegx32.c): Remove.
3117 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3119 * Makefile.in (SFILES): Add "common/environ.c".
3120 (OBJS): Add "common/environ.h".
3122 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3124 * configure.ac: Check if the fs_base and gs_base members of
3125 `struct user_regs_struct' exist.
3126 * config.in: Regenerated.
3127 * configure: Likewise.
3129 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3131 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3133 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3134 (get_next_pcs_syscall_next_pc): Likewise.
3136 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3138 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3139 * nto-x86-low.c: Likewise.
3141 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3143 * Makefile.in: Include disable-implicit-rules.mk.
3145 2016-11-23 Pedro Alves <palves@redhat.com>
3147 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3148 (debug_vprintf): Use std::chrono::steady_clock instead of
3149 gettimeofday. Use '.' instead of ':'.
3150 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3151 (get_timestamp): Use std::chrono::steady_clock instead of
3154 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3156 * Makefile.in: Fix whitespace formatting.
3158 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3160 * Makefile.in (SFILES, OBS): Flatten list and order
3163 2016-11-23 Pedro Alves <palves@redhat.com>
3165 * event-loop.c (handle_file_event): Use warning.
3166 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3167 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3170 2016-11-23 Pedro Alves <palves@redhat.com>
3172 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3174 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3175 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3176 debug_printf and debug_flush for debug output.
3177 * server.c (handle_general_set): Likewise.
3178 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3181 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3183 * Makefile.in (.c.o): Replace rule with ...
3184 (%.o: %.c): ... this one.
3186 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3188 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3189 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3191 * configure.ac: Remove checks for the make program.
3192 * configure: Re-generate.
3194 2016-10-28 Pedro Alves <palves@redhat.com>
3196 * Makefile.in (CXX_DIALECT): Get from configure.
3197 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3198 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3199 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3200 * config.in: Regenerate.
3201 * configure: Regenerate.
3203 2016-10-27 Yao Qi <yao.qi@linaro.org>
3205 * linux-low.c (linux_supports_range_stepping): Return true if
3206 can_software_single_step return true.
3208 2016-10-27 Yao Qi <yao.qi@linaro.org>
3210 * inferiors.c (find_inferior_in_random): New function.
3211 * inferiors.h (find_inferior_in_random): Declare.
3212 * linux-low.c (linux_wait_for_event_filtered): Call
3213 find_inferior_in_random instead of find_inferior.
3215 2016-10-27 Yao Qi <yao.qi@linaro.org>
3217 * linux-low.c (linux_wait_1): If single-step breakpoints are
3218 inserted, remove them.
3220 2016-10-26 Pedro Alves <palves@redhat.com>
3222 * linux-low.c (handle_extended_wait): Link parent/child fork
3224 (linux_wait_1): Unlink them.
3225 (linux_set_resume_request): Ignore resume requests for
3226 already-resumed and unhandled fork child threads.
3227 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3228 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3230 (handle_v_requests) <vCont>: Don't call require_running.
3231 * server.h (in_queued_stop_replies): New declaration.
3233 2016-10-24 Yao Qi <yao.qi@linaro.org>
3236 * linux-aarch64-low.c (append_insns): Cast the return value to
3239 2016-10-10 Yao Qi <yao.qi@linaro.org>
3241 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3243 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3245 * target.c (target_supports_multi_process): New function, moved
3247 * target.h (target_supports_multi_process): ... here. Remove
3250 2016-10-05 Tom Tromey <tom@tromey.com>
3253 * tracepoint.c (handle_tracepoint_bkpts): Check
3254 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3256 2016-10-05 Yao Qi <yao.qi@linaro.org>
3258 * configure.srv: Update the path of arm-*.xml files.
3260 2016-10-05 Terry Guo <terry.guo@arm.com>
3261 Yao Qi <yao.qi@linaro.org>
3263 * Makefile.in: Adjust the path of rules.
3264 * configure.srv: Update the path of xml files.
3265 * regformats/arm-with-iwmmxt.dat: Regenerated.
3266 * regformats/arm-with-neon.dat: Likewise.
3267 * regformats/arm-with-vfpv2.dat: Likewise.
3268 * regformats/arm-with-vfpv3.dat Likewise.
3270 2016-09-30 Yao Qi <yao.qi@linaro.org>
3273 * target.c (target_stop_and_wait): Don't call
3274 target_continue_no_signal, use resume_stop instead.
3276 2016-09-26 Yao Qi <yao.qi@linaro.org>
3278 * linux-low.c (linux_wait_1): Call debug_exit.
3280 2016-09-23 Pedro Alves <palves@redhat.com>
3282 * Makefile.in (SFILES): Add common/new-op.c.
3283 (OBS): Add common/new-op.o.
3284 (new-op.o): New rule.
3286 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3288 * .gitinore: Ignore more files.
3290 2016-09-21 Yao Qi <yao.qi@linaro.org>
3292 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3295 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3297 * server.c (start_inferior): Call target_mourn_inferior instead of
3298 mourn_inferior; pass ptid_t argument to it.
3300 (handle_target_event): Likewise.
3301 * target.c (target_mourn_inferior): New function.
3302 * target.h (mourn_inferior): Delete macro.
3304 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3306 * linux-low.c (lwp_is_stepping): New function.
3308 2016-09-06 Carl Love <cel@us.ibm.com>
3310 * server.c (start_inferior): Fixed comment, requested comment change
3311 didn't get updated correctly. Removed reference to ptrace () call as
3312 it is only true on Linux systems.
3314 2016-09-06 Carl Love <cel@us.ibm.com>
3316 * server.c (start_inferior): Do not call
3317 function target_post_create_inferior () if the
3318 inferior process has already exited.
3320 2016-09-05 Pedro Alves <palves@redhat.com>
3322 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3323 (COMPILE.pre, CC_LD): Use CXX directly.
3324 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3325 * acinclude.m4: Don't include build-with-cxx.m4.
3326 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3327 * configure: Regenerate.
3329 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3332 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3333 call writing data to own_buf.
3335 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3337 * target.c (mywait): Call target_wait instead of
3339 (target_wait): New function.
3341 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3343 * server.c (start_inferior): New variable 'ptid'. Replace calls
3344 to the_target->resume by target_continue{,_no_signal}, depending
3346 * target.c (target_stop_and_wait): Call target_continue_no_signal
3347 instead of the_target->resume.
3348 (target_continue): New function.
3350 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3352 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3354 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3357 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3359 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3360 * linux-arm-low.c (ps_get_thread_area): Likewise.
3361 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3362 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3363 * linux-mips-low.c (ps_get_thread_area): Likewise.
3364 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3365 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3366 * linux-x86-low.c (ps_get_thread_area): Likewise.
3367 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3369 2016-08-19 Pedro Alves <palves@redhat.com>
3371 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3373 2016-08-19 Pedro Alves <palves@redhat.com>
3375 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3376 comment. Use memcpy instead of casting through unsigned long.
3378 2016-08-19 Pedro Alves <palves@redhat.com>
3380 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3381 allocating around 0x80000000.
3383 2016-08-19 Pedro Alves <palves@redhat.com>
3386 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3387 (x32-avx512-linux-ipa.o): New rules.
3388 * configure.ac (x86_64-*-linux*): New x32 check.
3389 * configure.srv (ipa_x32_linux_regobj): New.
3390 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3391 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3393 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3395 * configure: Regenerate.
3397 2016-08-09 Pedro Alves <palves@redhat.com>
3400 * Makefile.in (OBS): Add signals-state-save-restore.o.
3401 (signals-state-save-restore.o): New rule.
3402 * config.in: Regenerate.
3403 * configure: Regenerate.
3404 * linux-low.c: Include "signals-state-save-restore.h".
3405 (linux_create_inferior): Call
3406 restore_original_signals_state.
3407 * server.c: Include "dispositions-save-restore.h".
3408 (captured_main): Call save_original_signals_state.
3410 2016-08-05 Pedro Alves <palves@redhat.com>
3412 * configure: Regenerate.
3414 2016-08-04 Yao Qi <yao.qi@linaro.org>
3416 * linux-low.c (regsets_fetch_inferior_registers): Check
3417 errno is ESRCH or not.
3419 2016-08-02 Yao Qi <yao.qi@linaro.org>
3421 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3422 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3423 (thread_db_load_search): Update.
3424 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3425 td_ta_set_event and td_ta_event_getmsg.
3427 2016-07-26 Pedro Alves <palves@redhat.com>
3430 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3431 of unsigned long for 64-bit registers and use uint32_t instead of
3432 unsigned int for 32-bit registers.
3434 2016-07-26 Pedro Alves <palves@redhat.com>
3436 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3439 2016-07-21 Tom Tromey <tom@tromey.com>
3441 * configure: Rebuild.
3443 2016-07-21 Yao Qi <yao.qi@linaro.org>
3445 * mem-break.c (find_gdb_breakpoint): Cast bp to
3446 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3448 2016-07-21 Yao Qi <yao.qi@linaro.org>
3450 * server.c (handle_v_requests): Support s and S actions
3451 if target_supports_software_single_step return true.
3453 2016-07-21 Yao Qi <yao.qi@linaro.org>
3455 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3456 is resume_step, call maybe_hw_step.
3457 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3459 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3461 (proceed_one_lwp): If resume request is resume_step, install
3462 reinsert breakpoints and call maybe_hw_step.
3464 2016-07-21 Yao Qi <yao.qi@linaro.org>
3466 * linux-low.c (proceed_one_lwp): Declare.
3467 (linux_resume_one_thread): Remove local variable 'step'.
3468 Lift code enqueue signal. Call proceed_one_lwp instead of
3469 linux_resume_one_lwp.
3471 2016-07-21 Yao Qi <yao.qi@linaro.org>
3473 * linux-low.c (linux_resume_one_thread): Call
3474 enqueue_pending_signal.
3476 2016-07-21 Yao Qi <yao.qi@linaro.org>
3478 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3479 * inferiors.c (do_restore_current_thread_cleanup): New function.
3480 (make_cleanup_restore_current_thread): Likewise.
3481 * linux-low.c (install_software_single_step_breakpoints): Call
3482 make_cleanup_restore_current_thread. Switch current_thread to
3485 2016-07-21 Yao Qi <yao.qi@linaro.org>
3487 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3488 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3489 (clone_one_breakpoint): Likewise.
3490 (delete_reinsert_breakpoints): Change parameter to thread.
3492 (has_reinsert_breakpoints): Likewise.
3493 (uninsert_reinsert_breakpoints): Likewise.
3494 (reinsert_reinsert_breakpoints): Likewise.
3495 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3496 (delete_reinsert_breakpoints): Likewise.
3497 (reinsert_reinsert_breakpoints): Likewise.
3498 (uninsert_reinsert_breakpoints): Likewise.
3499 (has_reinsert_breakpoints): Likewise.
3501 2016-07-21 Yao Qi <yao.qi@linaro.org>
3503 * inferiors.c (get_thread_process): Make parameter const.
3504 * inferiors.h (get_thread_process): Update declaration.
3505 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3506 Add new parameters child_thread and parent_thread. Callers
3508 * mem-break.h (clone_all_breakpoints): Update declaration.
3510 2016-07-21 Yao Qi <yao.qi@linaro.org>
3512 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3513 <command_list, handler>: Remove.
3514 (struct gdb_breakpoint): New.
3515 (struct other_breakpoint): New.
3516 (struct reinsert_breakpoint): New.
3517 (is_gdb_breakpoint): New function.
3518 (any_persistent_commands): Update command_list if
3519 is_gdb_breakpoint returns true.
3520 (set_breakpoint): Create breakpoints according to their types.
3521 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3522 (set_gdb_breakpoint_1): Likewise.
3523 (set_gdb_breakpoint): Likewise.
3524 (clear_breakpoint_conditions): Change parameter type to
3525 'struct gdb_breakpoint *'.
3526 (clear_breakpoint_commands): Likewise.
3527 (clear_breakpoint_conditions_and_commands): Likewise.
3528 (add_condition_to_breakpoint): Likewise.
3529 (add_breakpoint_condition): Likewise.
3530 (add_commands_to_breakpoint): Likewise.
3531 (check_breakpoints): Check other_breakpoint.
3532 (clone_one_breakpoint): Clone breakpopint according to its type.
3533 * mem-break.h (struct gdb_breakpoint): Declare.
3534 (set_gdb_breakpoint): Update declaration.
3535 (clear_breakpoint_conditions_and_commands): Likewise.
3536 (add_breakpoint_condition): Likewise.
3537 (add_breakpoint_commands): Likewise.
3538 * server.c (process_point_options): Change parameter type to
3539 'struct gdb_breakpoint *'.
3541 2016-07-21 Yao Qi <yao.qi@linaro.org>
3543 * mem-break.c (set_breakpoint_at): Rename it to ...
3544 (set_breakpoint_type_at): ... it.
3545 (set_breakpoint_at): Call set_breakpoint_type_at.
3546 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3547 * mem-break.h (set_breakpoint_at): Update comments.
3549 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3551 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3553 (nios2_store_gregset): Likewise.
3555 2016-07-01 Pedro Alves <palves@redhat.com>
3556 Antoine Tremblay <antoine.tremblay@ericsson.com>
3558 * linux-low.c: Change interface to take the target lwp_info
3559 pointer directly and return void. Handle detaching from a zombie
3561 (linux_detach_lwp_callback): New function.
3562 (linux_detach): Detach from the leader thread after detaching from
3565 2016-06-28 Yao Qi <yao.qi@linaro.org>
3567 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3568 for variable new_offset.
3569 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3570 (aarch64_ftrace_insn_reloc_cb): Likewise.
3571 (aarch64_ftrace_insn_reloc_tb): Likewise.
3572 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3573 PRIx64 instead of PRIx32.
3575 2016-06-28 Yao Qi <yao.qi@linaro.org>
3577 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3578 (the_low_target): Install arm_get_syscall_trapinfo.
3580 2016-06-28 Yao Qi <yao.qi@linaro.org>
3582 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3584 (the_low_target): Install aarch64_get_syscall_trapinfo.
3586 2016-06-28 Yao Qi <yao.qi@linaro.org>
3588 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3590 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3591 Remove parameter sysno.
3592 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3595 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3597 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3598 (s390_emit_ne_goto): Likewise.
3599 (s390_emit_lt_goto): Likewise.
3600 (s390_emit_le_goto): Likewise.
3601 (s390_emit_gt_goto): Likewise.
3602 (s390_emit_ge_goto): Likewise.
3603 (s390x_emit_eq_goto): Likewise.
3604 (s390x_emit_ne_goto): Likewise.
3605 (s390x_emit_lt_goto): Likewise.
3606 (s390x_emit_le_goto): Likewise.
3607 (s390x_emit_gt_goto): Likewise.
3608 (s390x_emit_ge_goto): Likewise.
3609 (s390_emit_ops_impl): Mark variable static.
3610 (s390x_emit_ops): Likewise.
3612 2016-06-17 Yao Qi <yao.qi@linaro.org>
3614 * linux-low.c (handle_extended_wait): Call
3615 uninsert_reinsert_breakpoints for the parent process. Remove
3616 reinsert breakpoints from the child process. Reinsert them to
3617 the parent process when vfork is done.
3618 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3619 (reinsert_reinsert_breakpoints): New function.
3620 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3621 (reinsert_reinsert_breakpoints): Declare.
3623 2016-06-17 Yao Qi <yao.qi@linaro.org>
3625 * linux-low.c (handle_extended_wait): If the parent is doing
3626 step-over, remove the reinsert breakpoints from the forked child.
3628 2016-06-17 Yao Qi <yao.qi@linaro.org>
3630 * linux-low.c (unsuspend_all_lwps): Declare.
3631 (linux_low_filter_event): If thread exited, call finish_step_over.
3632 If step-over is finished, unsuspend other threads.
3634 2016-06-17 Yao Qi <yao.qi@linaro.org>
3636 * linux-low.c (linux_resume_one_lwp_throw): Assert
3637 has_reinsert_breakpoints returns false.
3638 * mem-break.c (delete_disabled_breakpoints): Assert
3639 bp type isn't reinsert_breakpoint.
3641 2016-06-17 Yao Qi <yao.qi@linaro.org>
3643 * linux-low.c (maybe_hw_step): New function.
3644 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3645 (finish_step_over): Switch current_thread to lwp temporarily,
3646 and assert has_reinsert_breakpoints returns true.
3647 (proceed_one_lwp): Call maybe_hw_step.
3648 * mem-break.c (has_reinsert_breakpoints): New function.
3649 * mem-break.h (has_reinsert_breakpoints): Declare.
3651 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3653 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3655 2016-05-17 Yao Qi <yao.qi@linaro.org>
3657 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3658 instead of find_inferior.
3660 2016-05-05 Yao Qi <yao.qi@linaro.org>
3662 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3663 Initialize res to zero.
3665 2016-05-05 Yao Qi <yao.qi@linaro.org>
3667 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3670 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3672 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3673 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3674 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3676 2016-04-28 Par Olsson <par.olsson@windriver.com>
3677 Simon Marchi <simon.marchi@ericsson.com>
3679 * tracepoint.c (write_inferior_int8): New function.
3680 (cmd_qtenable_disable): Write enable flag using
3681 write_inferior_int8.
3683 2016-04-25 Yao Qi <yao.qi@linaro.org>
3685 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3686 (need_step_over_p): Return zero if the LWP has pending signals
3687 can be delivered on software single step target.
3689 2016-04-25 Yao Qi <yao.qi@linaro.org>
3691 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3692 return instead of error.
3694 2016-04-22 Yao Qi <yao.qi@linaro.org>
3696 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3699 2016-04-22 Yao Qi <yao.qi@linaro.org>
3701 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3702 signal when stepping over breakpoint with software single
3705 2016-04-21 Pedro Alves <palves@redhat.com>
3707 * linux-s390-low.c (s390_collect_ptrace_register)
3708 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3710 (s390_check_regset): Use void * instead of gdb_byte *.
3712 2016-04-20 Pedro Alves <palves@redhat.com>
3714 * configure: Renegerate.
3716 2016-04-20 Yao Qi <yao.qi@linaro.org>
3718 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3719 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3721 (arm_store_gregset): Likewise.
3723 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3725 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3726 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3727 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3728 (amd64-avx-mpx-linux.c): New rules.
3729 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3730 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3731 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3732 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3733 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3734 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3735 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3736 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3737 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3738 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3739 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3740 * linux-x86-low.c (x86_linux_read_description): Add case for
3741 X86_XSTATE_AVX_MPX_MASK.
3742 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3743 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3744 init_registers_i386_avx_mpx_linux.
3745 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3746 (initialize_low_tracepoint): Call
3747 init_registers_i386_avx_mpx_linux.
3748 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3749 (initialize_low_tracepoint): Call
3750 init_registers_amd64_avx_mpx_linux.
3751 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3752 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3753 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3756 2016-04-18 Pedro Alves <palves@redhat.com>
3758 * configure: Regenerate.
3760 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3762 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3763 (aarch64_emit_sub): Likewise.
3765 2016-04-12 Pedro Alves <palves@redhat.com>
3767 * utils.c (prepare_to_throw_exception): Delete.
3769 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3771 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3773 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3775 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3777 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3779 * linux-aarch64-ipa.c: Add <elf.h> include.
3780 * linux-ppc-ipa.c: Add <elf.h> include.
3781 * linux-s390-ipa.c: Add <elf.h> include.
3783 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3785 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3786 (get_raw_reg_ptr): Likewise.
3787 (get_trace_state_variable_value_ptr): Likewise.
3788 (set_trace_state_variable_value_ptr): Likewise.
3789 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3792 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3793 Marcin Kościelnicki <koriakin@0x04.net>
3796 * linux-ppc-low.c (emit_insns): New function.
3797 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3798 (ppc_emit_prologue): New function.
3799 (ppc_emit_epilogue): New function.
3800 (ppc_emit_add): New function.
3801 (ppc_emit_sub): New function.
3802 (ppc_emit_mul): New function.
3803 (ppc_emit_lsh): New function.
3804 (ppc_emit_rsh_signed): New function.
3805 (ppc_emit_rsh_unsigned): New function.
3806 (ppc_emit_ext): New function.
3807 (ppc_emit_zero_ext): New function.
3808 (ppc_emit_log_not): New function.
3809 (ppc_emit_bit_and): New function.
3810 (ppc_emit_bit_or): New function.
3811 (ppc_emit_bit_xor): New function.
3812 (ppc_emit_bit_not): New function.
3813 (ppc_emit_equal): New function.
3814 (ppc_emit_less_signed): New function.
3815 (ppc_emit_less_unsigned): New function.
3816 (ppc_emit_ref): New function.
3817 (ppc_emit_const): New function.
3818 (ppc_emit_reg): New function.
3819 (ppc_emit_pop): New function.
3820 (ppc_emit_stack_flush): New function.
3821 (ppc_emit_swap): New function.
3822 (ppc_emit_stack_adjust): New function.
3823 (ppc_emit_call): New function.
3824 (ppc_emit_int_call_1): New function.
3825 (ppc_emit_void_call_2): New function.
3826 (ppc_emit_if_goto): New function.
3827 (ppc_emit_goto): New function.
3828 (ppc_emit_eq_goto): New function.
3829 (ppc_emit_ne_goto): New function.
3830 (ppc_emit_lt_goto): New function.
3831 (ppc_emit_le_goto): New function.
3832 (ppc_emit_gt_goto): New function.
3833 (ppc_emit_ge_goto): New function.
3834 (ppc_write_goto_address): New function.
3835 (ppc_emit_ops_impl): New static variable.
3836 (ppc64v1_emit_prologue): New function.
3837 (ppc64v2_emit_prologue): New function.
3838 (ppc64_emit_epilogue): New function.
3839 (ppc64_emit_add): New function.
3840 (ppc64_emit_sub): New function.
3841 (ppc64_emit_mul): New function.
3842 (ppc64_emit_lsh): New function.
3843 (ppc64_emit_rsh_signed): New function.
3844 (ppc64_emit_rsh_unsigned): New function.
3845 (ppc64_emit_ext): New function.
3846 (ppc64_emit_zero_ext): New function.
3847 (ppc64_emit_log_not): New function.
3848 (ppc64_emit_bit_and): New function.
3849 (ppc64_emit_bit_or): New function.
3850 (ppc64_emit_bit_xor): New function.
3851 (ppc64_emit_bit_not): New function.
3852 (ppc64_emit_equal): New function.
3853 (ppc64_emit_less_signed): New function.
3854 (ppc64_emit_less_unsigned): New function.
3855 (ppc64_emit_ref): New function.
3856 (ppc64_emit_const): New function.
3857 (ppc64v1_emit_reg): New function.
3858 (ppc64v2_emit_reg): New function.
3859 (ppc64_emit_pop): New function.
3860 (ppc64_emit_stack_flush): New function.
3861 (ppc64_emit_swap): New function.
3862 (ppc64v1_emit_call): New function.
3863 (ppc64v2_emit_call): New function.
3864 (ppc64v1_emit_int_call_1): New function.
3865 (ppc64v2_emit_int_call_1): New function.
3866 (ppc64v1_emit_void_call_2): New function.
3867 (ppc64v2_emit_void_call_2): New function.
3868 (ppc64_emit_if_goto): New function.
3869 (ppc64_emit_eq_goto): New function.
3870 (ppc64_emit_ne_goto): New function.
3871 (ppc64_emit_lt_goto): New function.
3872 (ppc64_emit_le_goto): New function.
3873 (ppc64_emit_gt_goto): New function.
3874 (ppc64_emit_ge_goto): New function.
3875 (ppc64v1_emit_ops_impl): New static variable.
3876 (ppc64v2_emit_ops_impl): New static variable.
3877 (ppc_emit_ops): New function.
3878 (linux_low_target): Wire in ppc_emit_ops.
3880 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3881 Marcin Kościelnicki <koriakin@0x04.net>
3884 * Makefile.in: Add powerpc-*-ipa.o
3885 * configure.srv: Add ipa_obj for powerpc*-linux.
3886 * linux-ppc-ipa.c: New file.
3887 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3889 (PPC_FIELD): New macro.
3890 (PPC_SEXT): New macro.
3891 (PPC_OP6): New macro.
3892 (PPC_BO): New macro.
3893 (PPC_LI): New macro.
3894 (PPC_BD): New macro.
3895 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3896 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3897 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3898 (ppc_get_thread_area): New function.
3899 (is_elfv2_inferior): New function.
3900 (gen_ds_form): New function.
3901 (GEN_STD): New macro.
3902 (GEN_STDU): New macro.
3903 (GEN_LD): New macro.
3904 (GEN_LDU): New macro.
3905 (gen_d_form): New function.
3906 (GEN_ADDI): New macro.
3907 (GEN_ADDIS): New macro.
3908 (GEN_LI): New macro.
3909 (GEN_LIS): New macro.
3910 (GEN_ORI): New macro.
3911 (GEN_ORIS): New macro.
3912 (GEN_LWZ): New macro.
3913 (GEN_STW): New macro.
3914 (GEN_STWU): New macro.
3915 (gen_xfx_form): New function.
3916 (GEN_MFSPR): New macro.
3917 (GEN_MTSPR): New macro.
3918 (GEN_MFCR): New macro.
3919 (GEN_MTCR): New macro.
3920 (GEN_SYNC): New macro.
3921 (GEN_LWSYNC): New macro.
3922 (gen_x_form): New function.
3923 (GEN_OR): New macro.
3924 (GEN_MR): New macro.
3925 (GEN_LWARX): New macro.
3926 (GEN_STWCX): New macro.
3927 (GEN_CMPW): New macro.
3928 (gen_md_form): New function.
3929 (GEN_RLDICL): New macro.
3930 (GEN_RLDICR): New macro.
3931 (gen_i_form): New function.
3933 (GEN_BL): New macro.
3934 (gen_b_form): New function.
3935 (GEN_BNE): New macro.
3936 (GEN_LOAD): New macro.
3937 (GEN_STORE): New macro.
3938 (gen_limm): New function.
3939 (gen_atomic_xchg): New function.
3940 (gen_call): New function.
3941 (ppc_relocate_instruction): New function.
3942 (ppc_install_fast_tracepoint_jump_pad): New function.
3943 (ppc_get_min_fast_tracepoint_insn_len): New function.
3944 (ppc_get_ipa_tdesc_idx): New function.
3945 (the_low_target): Wire in the new functions.
3946 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3948 * linux-ppc-tdesc.h: New file.
3950 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3952 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3953 (alloc_jump_pad_buffer): New function.
3954 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3955 (alloc_jump_pad_buffer): New function.
3956 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3957 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3958 (alloc_jump_pad_buffer): New function.
3959 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3960 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3961 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3962 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3964 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3966 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3967 * linux-amd64-ipa.c: Likewise.
3968 * linux-i386-ipa.c: Likewise.
3969 * linux-s390-ipa.c: Likewise.
3970 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3971 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3972 set_trace_state_variable_value_ptr.
3973 (struct ipa_sym_addresses): Likewise.
3974 (symbol_list): Likewise.
3975 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3976 accessing gdb_collect directly.
3977 (gdb_collect_ptr_type): New typedef.
3978 (get_raw_reg_ptr_type): New typedef.
3979 (get_trace_state_variable_value_ptr_type): New typedef.
3980 (set_trace_state_variable_value_ptr_type): New typedef.
3981 (gdb_collect_ptr): New global.
3982 (get_raw_reg_ptr): New global.
3983 (get_trace_state_variable_value_ptr): New global.
3984 (set_trace_state_variable_value_ptr): New global.
3985 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3986 accessing get_raw_reg directly.
3987 (get_get_tsv_func_addr): Likewise for
3988 get_trace_state_variable_value_ptr.
3989 (get_set_tsv_func_addr): Likewise for
3990 set_trace_state_variable_value_ptr.
3991 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3993 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3995 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3997 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3999 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4001 (relocate_instruction): Remove own_buf.
4002 * server.c (own_buf): Make global.
4003 (handle_v_requests): Make global.
4004 * server.h (own_buf): New declaration.
4005 (handle_v_requests): New prototype.
4007 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4010 * linux-s390-low.c (add_insns): New function.
4011 (s390_emit_prologue): New function.
4012 (s390_emit_epilogue): New function.
4013 (s390_emit_add): New function.
4014 (s390_emit_sub): New function.
4015 (s390_emit_mul): New function.
4016 (s390_emit_lsh): New function.
4017 (s390_emit_rsh_signed): New function.
4018 (s390_emit_rsh_unsigned): New function.
4019 (s390_emit_ext): New function.
4020 (s390_emit_log_not): New function.
4021 (s390_emit_bit_and): New function.
4022 (s390_emit_bit_or): New function.
4023 (s390_emit_bit_xor): New function.
4024 (s390_emit_bit_not): New function.
4025 (s390_emit_equal): New function.
4026 (s390_emit_less_signed): New function.
4027 (s390_emit_less_unsigned): New function.
4028 (s390_emit_ref): New function.
4029 (s390_emit_if_goto): New function.
4030 (s390_emit_goto): New function.
4031 (s390_write_goto_address): New function.
4032 (s390_emit_litpool): New function.
4033 (s390_emit_const): New function.
4034 (s390_emit_call): New function.
4035 (s390_emit_reg): New function.
4036 (s390_emit_pop): New function.
4037 (s390_emit_stack_flush): New function.
4038 (s390_emit_zero_ext): New function.
4039 (s390_emit_swap): New function.
4040 (s390_emit_stack_adjust): New function.
4041 (s390_emit_set_r2): New function.
4042 (s390_emit_int_call_1): New function.
4043 (s390_emit_void_call_2): New function.
4044 (s390_emit_eq_goto): New function.
4045 (s390_emit_ne_goto): New function.
4046 (s390_emit_lt_goto): New function.
4047 (s390_emit_le_goto): New function.
4048 (s390_emit_gt_goto): New function.
4049 (s390_emit_ge_goto): New function.
4050 (s390x_emit_prologue): New function.
4051 (s390x_emit_epilogue): New function.
4052 (s390x_emit_add): New function.
4053 (s390x_emit_sub): New function.
4054 (s390x_emit_mul): New function.
4055 (s390x_emit_lsh): New function.
4056 (s390x_emit_rsh_signed): New function.
4057 (s390x_emit_rsh_unsigned): New function.
4058 (s390x_emit_ext): New function.
4059 (s390x_emit_log_not): New function.
4060 (s390x_emit_bit_and): New function.
4061 (s390x_emit_bit_or): New function.
4062 (s390x_emit_bit_xor): New function.
4063 (s390x_emit_bit_not): New function.
4064 (s390x_emit_equal): New function.
4065 (s390x_emit_less_signed): New function.
4066 (s390x_emit_less_unsigned): New function.
4067 (s390x_emit_ref): New function.
4068 (s390x_emit_if_goto): New function.
4069 (s390x_emit_const): New function.
4070 (s390x_emit_call): New function.
4071 (s390x_emit_reg): New function.
4072 (s390x_emit_pop): New function.
4073 (s390x_emit_stack_flush): New function.
4074 (s390x_emit_zero_ext): New function.
4075 (s390x_emit_swap): New function.
4076 (s390x_emit_stack_adjust): New function.
4077 (s390x_emit_int_call_1): New function.
4078 (s390x_emit_void_call_2): New function.
4079 (s390x_emit_eq_goto): New function.
4080 (s390x_emit_ne_goto): New function.
4081 (s390x_emit_lt_goto): New function.
4082 (s390x_emit_le_goto): New function.
4083 (s390x_emit_gt_goto): New function.
4084 (s390x_emit_ge_goto): New function.
4085 (s390_emit_ops): New function.
4086 (struct linux_target_ops): Fill in emit_ops hook.
4088 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4091 * Makefile.in: Add s390 IPA files.
4092 * configure.srv: Build IPA for s390.
4093 * linux-s390-ipa.c: New file.
4094 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4095 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4096 (tdesc_s390_linux32): Likewise.
4097 (init_registers_s390_linux32v1): Likewise.
4098 (tdesc_s390_linux32v1): Likewise.
4099 (init_registers_s390_linux32v2): Likewise.
4100 (tdesc_s390_linux32v2): Likewise.
4101 (init_registers_s390_linux64): Likewise.
4102 (tdesc_s390_linux64): Likewise.
4103 (init_registers_s390_linux64v1): Likewise.
4104 (tdesc_s390_linux64v1): Likewise.
4105 (init_registers_s390_linux64v2): Likewise.
4106 (tdesc_s390_linux64v2): Likewise.
4107 (init_registers_s390_te_linux64): Likewise.
4108 (tdesc_s390_te_linux64): Likewise.
4109 (init_registers_s390_vx_linux64): Likewise.
4110 (tdesc_s390_vx_linux64): Likewise.
4111 (init_registers_s390_tevx_linux64): Likewise.
4112 (tdesc_s390_tevx_linux64): Likewise.
4113 (init_registers_s390x_linux64): Likewise.
4114 (tdesc_s390x_linux64): Likewise.
4115 (init_registers_s390x_linux64v1): Likewise.
4116 (tdesc_s390x_linux64v1): Likewise.
4117 (init_registers_s390x_linux64v2): Likewise.
4118 (tdesc_s390x_linux64v2): Likewise.
4119 (init_registers_s390x_te_linux64): Likewise.
4120 (tdesc_s390x_te_linux64): Likewise.
4121 (init_registers_s390x_vx_linux64): Likewise.
4122 (tdesc_s390x_vx_linux64): Likewise.
4123 (init_registers_s390x_tevx_linux64): Likewise.
4124 (tdesc_s390x_tevx_linux64): Likewise.
4125 (have_hwcap_s390_vx): New static variable.
4126 (s390_arch_setup): Fill have_hwcap_s390_vx.
4127 (s390_get_thread_area): New function.
4128 (s390_ft_entry_gpr_esa): New const.
4129 (s390_ft_entry_gpr_zarch): New const.
4130 (s390_ft_entry_misc): New const.
4131 (s390_ft_entry_fr): New const.
4132 (s390_ft_entry_vr): New const.
4133 (s390_ft_main_31): New const.
4134 (s390_ft_main_64): New const.
4135 (s390_ft_exit_fr): New const.
4136 (s390_ft_exit_vr): New const.
4137 (s390_ft_exit_misc): New const.
4138 (s390_ft_exit_gpr_esa): New const.
4139 (s390_ft_exit_gpr_zarch): New const.
4140 (append_insns): New function.
4141 (s390_relocate_instruction): New function.
4142 (s390_install_fast_tracepoint_jump_pad): New function.
4143 (s390_get_min_fast_tracepoint_insn_len): New function.
4144 (s390_get_ipa_tdesc_idx): New function.
4145 (struct linux_target_ops): Wire in the above functions.
4146 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4147 * linux-s390-tdesc.h: New file.
4149 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4151 * linux-s390-low.c (s390_supports_tracepoints): New function.
4152 (struct linux_target_ops): Fill supports_tracepoints hook.
4154 2016-03-18 Yao Qi <yao.qi@linaro.org>
4156 * linux-low.c (lwp_signal_can_be_delivered): New function.
4157 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4159 2016-03-18 Yao Qi <yao.qi@linaro.org>
4161 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4162 0 if signal is enqueued. Remove 'signal' from one debugging
4163 message. Move one debugging message to some lines below.
4164 Remove code setting 'signal' to 0.
4166 2016-03-18 Yao Qi <yao.qi@linaro.org>
4168 * linux-low.c (linux_low_filter_event): Remove redundant
4169 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4171 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4173 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4174 (struct linux_target_ops): Wire in the above.
4176 2016-03-03 Yao Qi <yao.qi@linaro.org>
4178 * linux-low.c: Update comments to start_step_over.
4180 2016-03-03 Yao Qi <yao.qi@linaro.org>
4183 * linux-low.c (handle_extended_wait): Set child suspended
4184 if event_lwp->bp_reinsert isn't zero.
4186 2016-03-02 Yao Qi <yao.qi@linaro.org>
4188 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4189 enqueue_pending_signal.
4191 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4193 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4196 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4198 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4199 (s390_regmap_3264) [!__s390x__]: New global.
4200 (s390_collect_ptrace_register): Skip map entries containing -1.
4201 (s390_supply_ptrace_register): Ditto.
4202 (s390_fill_gprs_high): New function.
4203 (s390_store_gprs_high): New function.
4204 (s390_regsets): Add NT_S390_HIGH_GPRS.
4205 (s390_get_hwcap): Enable on 31-bit.
4206 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4207 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4208 Detect NT_S390_HIGH_GPRS.
4209 (s390_usrregs_info_3264): Enable on 31-bit.
4210 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4211 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4213 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4216 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4217 * configure.srv: Ditto.
4218 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4219 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4220 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4221 (init_registers_amd64_linux): Remove prototype.
4222 (tdesc_amd64_linux): Remove declaration.
4223 (get_ipa_tdesc): New function.
4224 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4225 initialize remaining tdescs.
4226 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4227 (init_registers_i386_linux): Remove prototype.
4228 (tdesc_i386_linux): Remove declaration.
4229 (get_ipa_tdesc): New function.
4230 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4231 initialize remaining tdescs.
4232 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4233 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4234 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4235 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4236 (x86_get_ipa_tdesc_idx): New function.
4237 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4238 * linux-x86-tdesc.h: New file.
4239 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4240 (target_get_ipa_tdesc_idx): New macro.
4241 * tracepoint.c (ipa_tdesc_idx): New macro.
4242 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4243 (symbol_list): Add ipa_tdesc_idx.
4244 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4245 (ipa_tdesc): Remove.
4246 (ipa_tdesc_idx): New variable.
4247 (get_context_regcache): Use get_ipa_tdesc.
4248 (gdb_collect): Ditto.
4250 * tracepoint.h (get_ipa_tdesc): New prototype.
4251 (ipa_tdesc): Remove.
4253 2016-02-24 Pedro Alves <palves@redhat.com>
4255 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4256 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4257 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4258 Factor out common code between the USE_SIGTRAP_SIGINFO and
4259 !USE_SIGTRAP_SIGINFO blocks.
4260 (linux_low_filter_event): Call save_stop_reason instead of
4261 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4263 (linux_wait_1): Update comments.
4265 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4267 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4268 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4269 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4270 ppc_insert_point, ppc_remove_point.
4272 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4274 * linux-s390-low.c (s390_supports_z_point_type): New function.
4275 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4277 2016-02-16 Yao Qi <yao.qi@linaro.org>
4279 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4280 PC. Get pc from regcache_read_pc.
4282 2016-02-12 Yao Qi <yao.qi@linaro.org>
4284 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4285 or linux_get_pc_32bit.
4286 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4288 2016-02-12 Yao Qi <yao.qi@linaro.org>
4290 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4291 arm_linux_get_next_pcs_fixup.
4293 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4295 * tracepoint.c (x_tracepoint_action_download): Change
4296 write_inferior_data_ptr to write_inferior_data_pointer.
4297 (cmd_qtstart): Likewise.
4298 (write_inferior_data_ptr): Remove.
4299 (download_agent_expr): Change write_inferior_data_ptr to
4300 write_inferior_data_pointer.
4301 (download_tracepoint_1): Likewise.
4302 (download_tracepoint): Likewise.
4303 (download_trace_state_variables): Likewise.
4305 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4306 Marcin Kościelnicki <koriakin@0x04.net>
4308 * tracepoint.c (struct tracepoint_action_ops): Remove.
4309 (struct tracepoint_action): Remove ops.
4310 (m_tracepoint_action_download, r_tracepoint_action_download)
4311 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4312 size and offset accordingly.
4313 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4314 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4315 (tracepoint_action_send, tracepoint_action_download): New functions.
4316 Helpers for trace action handlers.
4317 (add_tracepoint_action): Remove setup actions ops.
4318 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4320 2016-02-10 Yao Qi <yao.qi@linaro.org>
4322 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4324 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4326 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4328 * configure: Regenerate.
4330 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4332 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4333 void * to gdb_byte *.
4334 * linux-low.c (siginfo_fixup): Likewise.
4335 (linux_xfer_siginfo): Likewise.
4336 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4338 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4340 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4342 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4344 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4346 * linux-x86-low.c [__x86_64__]: Include
4347 "nat/amd64-linux-siginfo.h".
4348 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4349 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4350 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4351 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4352 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4353 (cpt_si_fd, si_timerid, si_overrun): Move from
4354 nat/amd64-linux-siginfo.c.
4355 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4357 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4359 * server.c (skip_to_semicolon): Remove.
4360 (process_point_options): Use strchrnul instead of
4363 2016-01-26 Yao Qi <yao.qi@linaro.org>
4365 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4366 * linux-low.c (install_software_single_step_breakpoints): Don't
4367 call regcache_read_pc.
4368 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4371 2016-01-26 Yao Qi <yao.qi@linaro.org>
4373 * linux-low.c (install_software_single_step_breakpoints): Call
4374 regcache_read_pc instead of get_pc.
4376 2016-01-26 Yao Qi <yao.qi@linaro.org>
4378 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4379 (unblock_async_io): Rename to ...
4380 (block_unblock_async_io): ... it. New function.
4381 (enable_async_io): Don't install SIGIO handler. Unblock it
4383 (disable_async_io): Don't ignore SIGIO. Block it instead.
4384 (initialize_async_io): Install SIGIO handler. Don't call
4387 2016-01-26 Yao Qi <yao.qi@linaro.org>
4389 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4390 first character is '\003', call *the_target->request_interrupt.
4392 2016-01-25 Yao Qi <yao.qi@linaro.org>
4394 * remote-utils.c (new_thread_notify): Remove.
4395 (dead_thread_notify): Likewise.
4396 * remote-utils.h (new_thread_notify): Remove declaration.
4397 (dead_thread_notify): Likewise.
4399 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4401 * gdb.trace/pending.exp: Fix expected message on continue.
4403 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4405 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4406 it works properly on big-endian machines where sizeof (CORE_ADDR)
4409 2016-01-21 Pedro Alves <palves@redhat.com>
4411 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4412 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4413 * configure: Regenerate.
4415 2016-01-21 Yao Qi <yao.qi@linaro.org>
4417 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4418 is_thumb and set it according to CPSR saved on the stack.
4419 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4420 arm_sigreturn_next_pc.
4422 2016-01-18 Yao Qi <yao.qi@linaro.org>
4424 * linux-low.c (linux_set_pc_64bit): New function.
4425 (linux_get_pc_64bit): New function.
4426 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4428 * linux-sparc-low.c (debug_threads): Remove declaration.
4429 (sparc_get_pc): Remove.
4430 (the_low_target): Use linux_get_pc_64bit instead of
4432 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4433 (the_low_target): Use linux_get_pc_64bit and
4436 2016-01-18 Yao Qi <yao.qi@linaro.org>
4438 * linux-arm-low.c (debug_threads): Remove declaration.
4439 (arm_get_pc, arm_set_pc): Remove.
4440 (the_low_target): Use linux_get_pc_32bit and
4442 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4443 (the_low_target): Use linux_get_pc_32bit and
4445 * linux-cris-low.c (debug_threads): Remove declaration.
4446 (cris_get_pc, cris_set_pc,): Remove.
4447 (the_low_target): Use linux_get_pc_32bit and
4449 * linux-crisv32-low.c (debug_threads): Remove declaration.
4450 (cris_get_pc, cris_set_pc): Remove.
4451 (the_low_target): Use linux_get_pc_32bit and
4453 * linux-low.c: Include inttypes.h.
4454 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4455 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4456 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4457 (the_low_target): Use linux_get_pc_32bit and
4459 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4460 (the_low_target): Use linux_get_pc_32bit and
4462 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4463 (the_low_target): Use linux_get_pc_32bit and
4465 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4466 (the_low_target): Use linux_get_pc_32bit and
4468 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4469 (the_low_target): Use linux_get_pc_32bit and
4472 2016-01-18 Gary Benson <gbenson@redhat.com>
4474 * configure.ac (AC_FUNC_FORK): New check.
4475 * config.in: Regenerate.
4476 * configure: Likewise.
4478 2016-01-14 Yao Qi <yao.qi@linaro.org>
4480 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4481 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4482 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4483 arm_get_next_pcs_ctor.
4485 2016-01-12 Josh Stone <jistone@redhat.com>
4486 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4488 * inferiors.h: Include "gdb_vecs.h".
4489 (struct process_info): Add syscalls_to_catch.
4490 * inferiors.c (remove_process): Free syscalls_to_catch.
4491 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4492 syscall_return stops.
4493 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4494 * server.c (handle_general_set): Handle QCatchSyscalls.
4495 (handle_query): Report support for QCatchSyscalls.
4496 * target.h (struct target_ops): Add supports_catch_syscall.
4497 (target_supports_catch_syscall): New macro.
4498 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4499 (struct lwp_info): Add syscall_state.
4500 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4501 Maintain syscall_state and syscalls_to_catch across exec.
4502 (get_syscall_trapinfo): New function, proxy to the_low_target.
4503 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4504 (linux_low_filter_event): Toggle syscall_state entry/return for
4505 syscall traps, and set it ignored for all others.
4506 (gdb_catching_syscalls_p): New function.
4507 (gdb_catch_this_syscall_p): New function.
4508 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4509 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4510 (linux_supports_catch_syscall): New function.
4511 (linux_target_ops): Install it.
4512 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4513 (the_low_target): Install it.
4515 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4517 * acinclude.m4: Include new ../warning.m4 file.
4518 * configure: Regenerated.
4519 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4521 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4523 * ax.c (is_goto_target): Mark static.
4524 * linux-low.c (register_addr): Likewise.
4525 (linux_fetch_registers, linux_store_registers): Likewise.
4526 * mem-break.c (any_persistent_commands): Fix old prototype.
4527 (add_commands_to_breakpoint): Mark static.
4528 * regcache.c (find_register_by_name): Delete unused func.
4529 * remote-utils.c (hex_or_minus_one): Mark static.
4530 * server.c (monitor_show_help): Mark static.
4531 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4532 handle_v_requests): Likewise.
4534 2016-01-12 Pedro Alves <palves@redhat.com>
4536 Remove use of the registered trademark symbol throughout.
4538 2016-01-08 Yao Qi <yao.qi@linaro.org>
4540 * remote-utils.c (getpkt): If c is '\003', call target hook
4543 2016-01-06 Yao Qi <yao.qi@linaro.org>
4545 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4546 linux-aarch32-low.c.
4547 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4548 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4549 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4550 (thumb2_breakpoint): Declare.
4551 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4552 linux-aarch32-low.h.
4553 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4554 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4555 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4557 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4559 * gdbreplay.c (gdbreplay_version): Change copyright year in
4561 * server.c (gdbserver_version): Likewise.
4563 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4565 * server.c (crc32_table): Delete.
4566 (crc32): Use libiberty's xcrc32 function.
4568 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4570 * lynx-low.c (lynx_delete_thread_callback): New function.
4571 (lynx_mourn): Properly delete our process and all of its
4572 threads. Remove call to clear_inferiors.
4574 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4576 * target.c (thread_search_callback): Add check that
4577 the thread_stopped target callback is not NULL before
4580 2015-12-21 Yao Qi <yao.qi@linaro.org>
4582 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4585 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4587 * server.c (handle_query): Call target_supports_software_single_step.
4589 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4591 * linux-low.c (single_step): New function.
4592 (linux_resume_one_lwp_throw): Call single_step.
4593 (start_step_over): Likewise.
4595 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4597 * Makefile.in (SFILES): Append arch/arm-linux.c,
4598 arch/arm-get-next-pcs.c.
4599 (arm-linux.o): New rule.
4600 (arm-get-next-pcs.o): New rule.
4601 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4603 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4604 to linux-aarch32-low.c.
4605 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4606 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4607 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4608 (thumb2_breakpoint_len): Likewise.
4609 (arm_is_thumb_mode): Make non-static.
4610 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4611 from linux-aarch32-low.c.
4612 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4613 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4614 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4615 (thumb2_breakpoint_len): Likewise.
4616 (arm_is_thumb_mode): New declaration.
4617 * linux-arm-low.c: Include arch/arm-linux.h
4618 aarch/arm-get-next-pcs.h, sys/syscall.h.
4619 (get_next_pcs_ops): New struct.
4620 (get_next_pcs_addr_bits_remove): New function.
4621 (get_next_pcs_is_thumb): New function.
4622 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4623 (arm_sigreturn_next_pc): Likewise.
4624 (get_next_pcs_syscall_next_pc): Likewise.
4625 (arm_gdbserver_get_next_pcs): Likewise.
4626 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4628 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4629 * server.h: Include gdb_vecs.h.
4631 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4633 * Makefile.in (SFILES): Append common/common-regcache.c.
4634 (OBS): Append common-regcache.o.
4635 (common-regcache.o): New rule.
4636 * regcache.c (init_register_cache): Initialize cache to
4638 (regcache_raw_read_unsigned): New function.
4639 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4640 register_status enum.
4642 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4644 * linux-aarch64-low.c (the_low_targets): Rename
4645 breakpoint_reinsert_addr to get_next_pcs.
4646 * linux-arm-low.c (the_low_targets): Likewise.
4647 * linux-bfin-low.c (the_low_targets): Likewise.
4648 * linux-cris-low.c (the_low_targets): Likewise.
4649 * linux-crisv32-low.c (the_low_targets): Likewise.
4650 * linux-low.c (can_software_single_step): Likewise.
4651 (install_software_single_step_breakpoints): New function.
4652 (start_step_over): Use install_software_single_step_breakpoints.
4653 * linux-low.h: New CORE_ADDR vector.
4654 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4656 * linux-mips-low.c (the_low_targets): Likewise.
4657 * linux-nios2-low.c (the_low_targets): Likewise.
4658 * linux-sparc-low.c (the_low_targets): Likewise.
4660 2015-12-17 Pedro Alves <palves@redhat.com>
4662 * linux-low.c (linux_kill_one_lwp): Remove references to
4664 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4666 (linux_init_signals): Delete.
4667 (initialize_low): Adjust.
4668 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4670 2015-12-16 Pedro Alves <palves@redhat.com>
4672 * configure.ac (compiler warning flags): When testing a
4673 -Wno-foo option, check whether -Wfoo works instead.
4674 * configure: Regenerate.
4676 2015-12-11 Don Breazeal <donb@codesourcery.com>
4678 * server.c (process_serial_event): Don't exit from gdbserver
4679 in remote mode if there are still active inferiors.
4681 2015-12-11 Yao Qi <yao.qi@linaro.org>
4683 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4684 arm_breakpoint_at if the process is 32-bit.
4686 2015-12-11 Yao Qi <yao.qi@linaro.org>
4688 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4691 2015-12-07 Yao Qi <yao.qi@linaro.org>
4693 * configure.srv: Append arm.o to srv_tgtobj for
4694 aarch64*-*-linux* target.
4695 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4696 from linux-arm-low.c.
4697 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4698 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4699 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4700 (thumb2_breakpoint_len): Likewise.
4701 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4702 (arm_breakpoint_kinds): Likewise.
4703 (arm_breakpoint_kind_from_pc): Likewise.
4704 (arm_sw_breakpoint_from_kind): Likewise.
4705 (arm_breakpoint_kind_from_current_state): Likewise.
4706 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4707 (arm_sw_breakpoint_from_kind): Declare.
4708 (arm_breakpoint_kind_from_current_state): Declare.
4709 (arm_breakpoint_at): Declare.
4710 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4711 arm_sw_breakpoint_from_kind if process is 32-bit.
4712 (aarch64_breakpoint_kind_from_pc): New function.
4713 (aarch64_breakpoint_kind_from_current_state): New function.
4714 (the_low_target): Initialize fields breakpoint_kind_from_pc
4715 and breakpoint_kind_from_current_state.
4716 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4717 linux-aarch32-low.c.
4718 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4719 (arm_breakpoint, arm_breakpoint_len): Likewise.
4720 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4721 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4722 (arm_is_thumb_mode): Likewise.
4723 (arm_breakpoint_at): Likewise.
4724 (arm_breakpoint_kind_from_pc): Likewise.
4725 (arm_sw_breakpoint_from_kind): Likewise.
4726 (arm_breakpoint_kind_from_current_state): Likewise.
4729 2015-08-04 Yao Qi <yao.qi@linaro.org>
4731 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4732 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4733 * server.c (extended_protocol): Remove "static".
4734 * server.h (extended_protocol): Declare it.
4736 2015-12-04 Josh Stone <jistone@redhat.com>
4738 * target.h (struct target_ops) <arch_setup>: Rename to ...
4739 (struct target_ops) <post_create_inferior>: ... this.
4740 (target_arch_setup): Rename to ...
4741 (target_post_create_inferior): ... this, calling post_create_inferior.
4742 * server.c (start_inferior): Update target_arch_setup calls to
4743 target_post_create_inferior.
4744 * linux-low.c (linux_low_ptrace_options): Forward declare.
4745 (linux_arch_setup): Update its comment for general use.
4746 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4747 (struct linux_target_ops): Use linux_post_create_inferior.
4748 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4749 to post_create_inferior.
4750 * nto-low.c (struct nto_target_ops): Likewise.
4751 * spu-low.c (struct spu_target_ops): Likewise.
4752 * win32-low.c (struct win32_target_ops): Likewise.
4754 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4756 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4758 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4760 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4761 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4762 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4763 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4764 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4765 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4766 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4767 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4768 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4769 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4770 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4771 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4773 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4775 * linux-low.c (linux_look_up_symbols): Don't call
4776 linux_supports_traceclone.
4777 * linux-low.h (thread_db_init): Remove use_events argument.
4778 * thread-db.c (thread_db_use_event): Remove global variable.
4779 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4780 (struct thread_db) <td_create_bp>: Remove field.
4781 (thread_db_create_event): Remove function.
4782 (thread_db_enable_reporting): Likewise.
4783 (find_one_thread): Don't check for thread_db_use_events.
4784 (attach_thread): Likewise.
4785 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4786 (try_thread_db_load_1): Don't check for thread_db_use_events.
4787 (thread_db_init): Remove use_events argument and thread events
4789 (remove_thread_event_breakpoints): Remove function.
4790 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4792 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4794 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4796 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4797 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4798 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4799 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4800 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4802 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4804 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4805 * linux-low.c (can_hardware_single_step): Use
4806 supports_hardware_single_step.
4807 (can_software_single_step): New function.
4808 (start_step_over): Call can_software_single_step.
4809 (linux_supports_hardware_single_step): New function.
4810 (struct target_ops) <supports_software_single_step>: Initialize.
4811 * linux-low.h (struct linux_target_ops)
4812 <supports_hardware_single_step>: Initialize.
4813 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4814 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4815 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4816 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4817 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4818 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4819 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4820 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4821 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4822 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4824 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4825 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4827 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4829 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4831 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4832 * target.h (struct target_ops): <supports_software_single_step>:
4834 (target_supports_software_single_step): New macro.
4836 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4838 * linux-low.c (linux_wait_1): Fix pc advance condition.
4839 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4840 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4842 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4844 * linux-arm-low.c (arm_is_thumb_mode): New function.
4845 (arm_breakpoint_at): Use arm_is_thumb_mode.
4846 (arm_breakpoint_kind_from_current_state): New function.
4847 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4849 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4850 (linux_breakpoint_kind_from_current_state): New function.
4851 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4852 * linux-low.h (struct linux_target_ops)
4853 <breakpoint_kind_from_current_state>: New field.
4854 * target.h (struct target_ops): Likewise.
4855 (target_breakpoint_kind_from_current_state): New macro.
4857 2015-11-30 Pedro Alves <palves@redhat.com>
4859 * linux-low.c (linux_resume): Wake up the event loop before
4862 2015-11-30 Pedro Alves <palves@redhat.com>
4864 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4866 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4868 * target.c (struct thread_search): New structure.
4869 (thread_search_callback): New function.
4870 (prev_general_thread): New global.
4871 (prepare_to_access_memory, done_accessing_memory): New functions.
4872 * target.h (prepare_to_access_memory, done_accessing_memory):
4873 Replace macros with function declarations.
4875 2015-11-30 Pedro Alves <palves@redhat.com>
4878 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4879 report TARGET_WAITKIND_NO_RESUMED.
4880 * remote-utils.c (prepare_resume_reply): Handle
4881 TARGET_WAITKIND_NO_RESUMED.
4882 * server.c (report_no_resumed): New global.
4883 (handle_query) <qSupported>: Handle "no-resumed+". Report
4884 "no-resumed+" support.
4885 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4886 return error if the client doesn't support no-resumed events.
4887 (push_stop_notification): New function.
4888 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4889 events if the client supports them.
4891 2015-11-30 Pedro Alves <palves@redhat.com>
4893 * linux-low.c (thread_still_has_status_pending_p): Don't check
4895 (lwp_resumed): New function.
4896 (status_pending_p_callback): Return early if the LWP is not
4897 supposed to be resumed.
4899 2015-11-30 Pedro Alves <palves@redhat.com>
4901 * linux-low.c (handle_extended_wait): Assert that the LWP's
4902 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4903 thread create events, leave the new child's status pending.
4904 (linux_low_filter_event): If GDB wants to hear about thread exit
4905 events, leave the LWP marked dead and don't delete it.
4906 (linux_wait_for_event_filtered): Don't check for thread exit.
4907 (filter_exit_event): New function.
4908 (linux_wait_1): Use it, when returning an exit event.
4909 (linux_resume_one_lwp_throw): Assert that the LWP's
4910 waitstatus is TARGET_WAITKIND_IGNORE.
4911 * remote-utils.c (prepare_resume_reply): Handle
4912 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4913 * server.c (report_thread_events): New global.
4914 (handle_general_set): Handle QThreadEvents.
4915 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4916 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4917 TARGET_WAITKIND_THREAD_EXITED.
4918 * server.h (report_thread_events): Declare.
4920 2015-11-30 Pedro Alves <palves@redhat.com>
4922 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4923 the thread's last_resume_kind was resume_stop.
4925 2015-11-30 Pedro Alves <palves@redhat.com>
4927 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4930 2015-11-30 Pedro Alves <palves@redhat.com>
4932 * server.c (handle_v_requests): Handle vCtrlC.
4934 2015-11-30 Pedro Alves <palves@redhat.com>
4936 * gdbthread.h (find_any_thread_of_pid): Declare.
4937 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4939 * server.c (handle_query): If current_thread is NULL, look for
4940 another thread of the selected process.
4942 2015-11-26 Daniel Colascione <dancol@dancol.org>
4943 Simon Marchi <simon.marchi@ericsson.com>
4945 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4946 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4948 * target.h (struct target_ops) <thread_name>: New field.
4949 (target_thread_name): New macro.
4951 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4953 * regcache.h (regcache_invalidate_pid): Add declaration.
4954 * regcache.c (regcache_invalidate_pid): New function, extracted
4955 from regcache_invalidate.
4956 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4957 Add trivial documentation comment.
4958 * lynx-low.c: Use regcache_invalidate_pid instead of
4959 regcache_invalidate.
4961 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4963 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4964 and Elf64_auxv_t if the target is Android.
4966 2015-11-22 Doug Evans <xdje42@gmail.com>
4968 * target.h: #include <sys/types.h>.
4970 2015-11-19 Pedro Alves <palves@redhat.com>
4972 * linux-low.c (linux_process_qsupported): Change prototype.
4974 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4976 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4977 and adjust to loop over all features.
4978 * server.c (handle_query) <qSupported>: Adjust to call
4979 target_process_qsupported once, passing it a vector of unprocessed
4981 * target.h (struct target_ops) <process_qsupported>: Change
4983 (target_process_qsupported): Adjust.
4985 2015-11-19 Pedro Alves <palves@redhat.com>
4987 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4989 * configure: Regenerate.
4991 2015-11-19 Pedro Alves <palves@redhat.com>
4993 * configure: Regenerate.
4995 2015-11-19 Yao Qi <yao.qi@linaro.org>
4997 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5000 2015-11-19 Yao Qi <yao.qi@linaro.org>
5002 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5003 (struct aarch64_operand): Move enum out.
5005 2015-11-19 Yao Qi <yao.qi@linaro.org>
5007 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5008 struct user_fpsimd_state *.
5009 (aarch64_store_fpregset): Likewise.
5011 2015-11-19 Yao Qi <yao.qi@linaro.org>
5013 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5014 struct user_pt_regs *.
5015 (aarch64_store_gregset): Likewise.
5017 2015-11-18 Pedro Alves <palves@redhat.com>
5019 * Makefile.in (all_object_files): Add $IPA_OBJS.
5021 2015-11-17 Pedro Alves <palves@redhat.com>
5023 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5024 GDB_SIGNAL_0 and gdb_signal_to_string.
5026 2015-11-17 Pedro Alves <palves@redhat.com>
5028 * win32-low.c (handle_output_debug_string): Remove parameter.
5029 (win32_kill): Remove our_status local and adjust call to
5030 handle_output_debug_string.
5031 (get_child_debug_event): Adjust call to
5032 handle_output_debug_string.
5034 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5036 * linux-mips-low.c (mips_fill_gregset): Add cast.
5037 (mips_store_gregset): Likewise.
5038 (mips_fill_fpregset): Likewise.
5039 (mips_store_fpregset): Likewise.
5041 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5043 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5046 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5048 * linux-mips-low.c (mips_linux_new_thread): Change type of
5049 watch_type to enum target_hw_bp_type.
5051 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5053 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5054 Change return type to arm_hwbp_type.
5056 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5058 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5059 (arm_store_gregset): Likewise.
5060 * linux-arm-low.c (arm_get_hwcap): Likewise.
5061 (arm_read_description): Likewise.
5063 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5065 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5067 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5069 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5070 (ppc_fill_vsxregset): Likewise.
5071 (ppc_store_vsxregset): Likewise.
5072 (ppc_fill_vrregset): Likewise.
5073 (ppc_store_vrregset): Likewise.
5074 (ppc_fill_evrregset): Likewise.
5075 (ppc_store_evrregset): Likewise.
5077 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5079 * linux-ppc-low.c (ppc_usrregs_info): Remove
5080 forward-declaration.
5081 (ppc_arch_setup): Move lower in file.
5083 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5085 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5086 (ps_pdwrite): Likewise.
5088 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5090 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5091 to after assert checks.
5093 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5095 * proc-service.c (ps_pdread): Add/adjust casts.
5096 (ps_pdwrite): Add/adjust casts.
5098 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5100 * server.c (handle_search_memory_1): Cast return value of
5103 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5105 * server.c (write_qxfer_response): Change type of data to
5108 2015-10-29 Pedro Alves <palves@redhat.com>
5110 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5112 2015-10-29 Pedro Alves <palves@redhat.com>
5114 * tracepoint.c (clear_installed_tracepoints): Add casts.
5116 2015-10-29 Pedro Alves <palves@redhat.com>
5118 * server.c (handle_v_cont, process_serial_event): Add enum
5119 gdb_signal casts to signal parsing code.
5121 2015-10-29 Pedro Alves <palves@redhat.com>
5123 * linux-low.h (NULL_REGSET): Define.
5124 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5125 * linux-arm-low.c (arm_regsets): Likewise.
5126 * linux-crisv32-low.c (cris_regsets): Likewise.
5127 * linux-m68k-low.c (m68k_regsets): Likewise.
5128 * linux-mips-low.c (mips_regsets): Likewise.
5129 * linux-nios2-low.c (nios2_regsets): Likewise.
5130 * linux-ppc-low.c (ppc_regsets): Likewise.
5131 * linux-s390-low.c (s390_regsets): Likewise.
5132 * linux-sh-low.c (sh_regsets): Likewise.
5133 * linux-sparc-low.c (sparc_regsets): Likewise.
5134 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5135 * linux-tile-low.c (tile_regsets): Likewise.
5136 * linux-x86-low.c (x86_regsets): Likewise.
5137 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5139 2015-10-29 Pedro Alves <palves@redhat.com>
5141 * linux-low.h (NULL_REGSET): Define.
5142 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5143 * linux-arm-low.c (arm_regsets): Likewise.
5144 * linux-crisv32-low.c (cris_regsets): Likewise.
5145 * linux-m68k-low.c (m68k_regsets): Likewise.
5146 * linux-mips-low.c (mips_regsets): Likewise.
5147 * linux-nios2-low.c (nios2_regsets): Likewise.
5148 * linux-ppc-low.c (ppc_regsets): Likewise.
5149 * linux-s390-low.c (s390_regsets): Likewise.
5150 * linux-sh-low.c (sh_regsets): Likewise.
5151 * linux-sparc-low.c (sparc_regsets): Likewise.
5152 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5153 * linux-tile-low.c (tile_regsets): Likewise.
5154 * linux-x86-low.c (x86_regsets): Likewise.
5155 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5157 2015-10-26 Doug Evans <dje@google.com>
5159 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5161 2015-10-26 Doug Evans <dje@google.com>
5163 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5165 2015-10-26 Doug Evans <dje@google.com>
5167 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5169 (attach_thread, find_new_threads_callback): Ditto.
5171 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5173 * mem-break.h (set_breakpoint_data): Remove.
5175 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5177 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5178 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5179 (initialize_low): Remove set_breakpoint_data call.
5180 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5181 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5182 (initialize_low): Remove set_breakpoint_data call.
5183 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5184 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5185 (initialize_low): Remove set_breakpoint_data call.
5187 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5189 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5190 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5191 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5192 * target.h (target_breakpoint_kind_from_pc): New macro.
5194 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5196 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5197 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5198 the default breakpoint kind.
5200 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5202 * linux-arm-low.c (arm_supports_z_point_type): Add software
5205 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5207 * linux-arm-low.c: Refactor breakpoint definitions.
5208 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5209 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5211 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5213 * Makefile.in: Add arm.c/o.
5214 * configure.srv: Likewise.
5215 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5216 (arm_breakpoint_kind_from_pc): New function.
5217 (arm_sw_breakpoint_from_kind): Return proper kind.
5218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5220 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5222 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5224 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5225 (struct raw_breakpoint) <size>: Remove.
5226 (struct raw_breakpoint) <kind>: Add.
5227 (bp_size): New function.
5228 (bp_opcode): Likewise.
5229 (find_raw_breakpoint_at): Adjust for kind.
5230 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5231 (remove_memory_breakpoint): Adjust for kind call bp_size.
5232 (set_raw_breakpoint_at): Adjust for kind.
5233 (set_breakpoint): Likewise.
5234 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5235 (delete_raw_breakpoint): Adjust for kind.
5236 (delete_breakpoint): Likewise.
5237 (find_gdb_breakpoint): Likewise.
5238 (set_gdb_breakpoint_1): Likewise.
5239 (set_gdb_breakpoint): Likewise.
5240 (delete_gdb_breakpoint_1): Likewise.
5241 (delete_gdb_breakpoint): Likewise.
5242 (uninsert_raw_breakpoint): Likewise.
5243 (reinsert_raw_breakpoint): Likewise.
5244 (set_breakpoint_data): Remove.
5245 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5246 (check_mem_read): Adjust for kind call bp_size.
5247 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5248 (clone_one_breakpoint): Adjust for kind.
5249 * mem-break.h (set_gdb_breakpoint): Likewise.
5250 (delete_gdb_breakpoint): Likewise.
5251 * server.c (process_serial_event): Likewise.
5253 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5255 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5256 (struct linux_target_ops) <breakpoint>: Remove.
5257 (struct linux_target_ops) <breakpoint_len>: Remove.
5258 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5259 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5260 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5261 (arm_sw_breakpoint_from_kind): New function.
5262 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5263 (struct linux_target_ops) <breakpoint>: Remove.
5264 (struct linux_target_ops) <breakpoint_len>: Remove.
5265 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5267 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5268 (struct linux_target_ops) <breakpoint>: Remove.
5269 (struct linux_target_ops) <breakpoint_len>: Remove.
5270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5272 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5273 (struct linux_target_ops) <breakpoint>: Remove.
5274 (struct linux_target_ops) <breakpoint_len>: Remove.
5275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5277 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5278 and sw_breakpoint_from_kind to increment the pc.
5279 (linux_breakpoint_kind_from_pc): New function.
5280 (linux_sw_breakpoint_from_kind): New function.
5281 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5282 (initialize_low): Call breakpoint_kind_from_pc and
5283 sw_breakpoint_from_kind to replace breakpoint_data/len.
5284 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5287 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5288 (struct linux_target_ops) <breakpoint>: Remove.
5289 (struct linux_target_ops) <breakpoint_len>: Remove.
5290 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5292 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5293 (struct linux_target_ops) <breakpoint>: Remove.
5294 (struct linux_target_ops) <breakpoint_len>: Remove.
5295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5297 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5298 (struct linux_target_ops) <breakpoint>: Remove.
5299 (struct linux_target_ops) <breakpoint_len>: Remove.
5300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5302 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5303 (struct linux_target_ops) <breakpoint>: Remove.
5304 (struct linux_target_ops) <breakpoint_len>: Remove.
5305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5307 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5308 (struct linux_target_ops) <breakpoint>: Remove.
5309 (struct linux_target_ops) <breakpoint_len>: Remove.
5310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5312 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5313 (struct linux_target_ops) <breakpoint>: Remove.
5314 (struct linux_target_ops) <breakpoint_len>: Remove.
5315 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5316 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5317 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5318 (struct linux_target_ops) <breakpoint>: Remove.
5319 (struct linux_target_ops) <breakpoint_len>: Remove.
5320 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5321 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5322 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5323 (struct linux_target_ops) <breakpoint>: Remove.
5324 (struct linux_target_ops) <breakpoint_len>: Remove.
5325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5327 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5328 (struct linux_target_ops) <breakpoint>: Remove.
5329 (struct linux_target_ops) <breakpoint_len>: Remove.
5330 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5332 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5333 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5334 (struct linux_target_ops) <breakpoint>: Remove.
5335 (struct linux_target_ops) <breakpoint_len>: Remove.
5336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5338 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5339 (struct linux_target_ops) <breakpoint>: Remove.
5340 (struct linux_target_ops) <breakpoint_len>: Remove.
5341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5344 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5346 * linux-cris-low.c (cris_get_pc): Remove void arg.
5348 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5350 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5353 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5355 * inferiors.c (thread_pid_matches_callback): New function.
5356 (find_thread_process): New function.
5357 (remove_thread): Reset current_thread.
5358 (remove_process): Assert threads have been removed first.
5360 2015-10-15 Yao Qi <yao.qi@linaro.org>
5362 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5364 (aarch64_remove_point): Likewise.
5365 * regcache.c (regcache_register_size): New function.
5367 2015-10-12 Yao Qi <yao.qi@linaro.org>
5369 * linux-aarch64-low.c: Update all callers as emit_load_store
5370 is renamed to aarch64_emit_load_store.
5372 2015-10-12 Yao Qi <yao.qi@linaro.org>
5374 * linux-aarch64-low.c: Update all callers of function renaming
5375 from emit_insn to aarch64_emit_insn.
5377 2015-10-12 Yao Qi <yao.qi@linaro.org>
5379 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5380 arch/aarch64-insn.h.
5381 (struct aarch64_memory_operand): Likewise.
5383 (emit_insn): Move to arch/aarch64-insn.c.
5384 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5385 (emit_load_store): Move to arch/aarch64-insn.c.
5386 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5387 (can_encode_int32): Remove.
5389 2015-10-12 Yao Qi <yao.qi@linaro.org>
5391 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5392 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5393 (aarch64_relocate_instruction): Likewise.
5394 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5395 (struct aarch64_insn_visitor): Likewise.
5397 2015-10-12 Yao Qi <yao.qi@linaro.org>
5399 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5400 (struct aarch64_insn_visitor): New.
5401 (struct aarch64_insn_relocation_data): New.
5402 (aarch64_ftrace_insn_reloc_b): New function.
5403 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5404 (aarch64_ftrace_insn_reloc_cb): Likewise.
5405 (aarch64_ftrace_insn_reloc_tb): Likewise.
5406 (aarch64_ftrace_insn_reloc_adr): Likewise.
5407 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5408 (aarch64_ftrace_insn_reloc_others): Likewise.
5410 (aarch64_relocate_instruction): Use visitor.
5412 2015-10-12 Yao Qi <yao.qi@linaro.org>
5414 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5415 int. Add argument buf.
5416 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5417 aarch64_relocate_instruction.
5419 2015-10-12 Yao Qi <yao.qi@linaro.org>
5421 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5422 argument insn. Remove local variable insn. Don't call
5424 (aarch64_install_fast_tracepoint_jump_pad): Call
5427 2015-09-30 Yao Qi <yao.qi@linaro.org>
5429 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5430 (emit_load_store_pair): Likewise.
5432 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5434 * dll.c (match_dll): Add cast(s).
5435 (unloaded_dll): Likewise.
5436 * linux-low.c (second_thread_of_pid_p): Likewise.
5437 (delete_lwp_callback): Likewise.
5438 (count_events_callback): Likewise.
5439 (select_event_lwp_callback): Likewise.
5440 (linux_set_resume_request): Likewise.
5441 * server.c (accumulate_file_name_length): Likewise.
5442 (emit_dll_description): Likewise.
5443 (handle_qxfer_threads_worker): Likewise.
5444 (visit_actioned_threads): Likewise.
5445 * thread-db.c (any_thread_of): Likewise.
5446 * tracepoint.c (same_process_p): Likewise.
5447 (match_blocktype): Likewise.
5448 (build_traceframe_info_xml): Likewise.
5450 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5452 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5454 (gdb_unparse_agent_expr): Likewise.
5455 * hostio.c (require_data): Likewise.
5456 (handle_pread): Likewise.
5457 * linux-low.c (disable_regset): Likewise.
5458 (fetch_register): Likewise.
5459 (store_register): Likewise.
5460 (get_dynamic): Likewise.
5461 (linux_qxfer_libraries_svr4): Likewise.
5462 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5463 (set_fast_tracepoint_jump): Likewise.
5464 (uninsert_fast_tracepoint_jumps_at): Likewise.
5465 (reinsert_fast_tracepoint_jumps_at): Likewise.
5466 (validate_inserted_breakpoint): Likewise.
5467 (clone_agent_expr): Likewise.
5468 * regcache.c (init_register_cache): Likewise.
5469 * remote-utils.c (putpkt_binary_1): Likewise.
5470 (decode_M_packet): Likewise.
5471 (decode_X_packet): Likewise.
5472 (look_up_one_symbol): Likewise.
5473 (relocate_instruction): Likewise.
5474 (monitor_output): Likewise.
5475 * server.c (handle_search_memory): Likewise.
5476 (handle_qxfer_exec_file): Likewise.
5477 (handle_qxfer_libraries): Likewise.
5478 (handle_qxfer): Likewise.
5479 (handle_query): Likewise.
5480 (handle_v_cont): Likewise.
5481 (handle_v_run): Likewise.
5482 (captured_main): Likewise.
5483 * target.c (write_inferior_memory): Likewise.
5484 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5485 * tracepoint.c (init_trace_buffer): Likewise.
5486 (add_tracepoint_action): Likewise.
5487 (add_traceframe): Likewise.
5488 (add_traceframe_block): Likewise.
5489 (cmd_qtdpsrc): Likewise.
5490 (cmd_qtdv): Likewise.
5491 (cmd_qtstatus): Likewise.
5492 (response_source): Likewise.
5493 (response_tsv): Likewise.
5494 (cmd_qtnotes): Likewise.
5495 (gdb_collect): Likewise.
5496 (initialize_tracepoint): Likewise.
5498 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5500 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5501 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5502 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5504 (enum aarch64_condition_codes): New enum.
5505 (w0): New static global.
5508 (struct aarch64_memory_operand) <type>: New
5509 MEMORY_OPERAND_POSTINDEX type.
5510 (postindex_memory_operand): New helper function.
5511 (emit_ret): New function.
5512 (emit_load_store_pair): New function, factored out of emit_stp
5513 with support for MEMORY_OPERAND_POSTINDEX.
5514 (emit_stp): Rewrite using emit_load_store_pair.
5515 (emit_ldp): New function.
5516 (emit_load_store): Likewise.
5517 (emit_ldr): Mention post-index instruction in comment.
5518 (emit_ldrh): New function.
5519 (emit_ldrb): New function.
5520 (emit_ldrsw): Mention post-index instruction in comment.
5521 (emit_str): Likewise.
5522 (emit_subs): New function.
5523 (emit_cmp): Likewise.
5524 (emit_and): Likewise.
5525 (emit_orr): Likewise.
5526 (emit_orn): Likewise.
5527 (emit_eor): Likewise.
5528 (emit_mvn): Likewise.
5529 (emit_lslv): Likewise.
5530 (emit_lsrv): Likewise.
5531 (emit_asrv): Likewise.
5532 (emit_mul): Likewise.
5533 (emit_sbfm): Likewise.
5534 (emit_sbfx): Likewise.
5535 (emit_ubfm): Likewise.
5536 (emit_ubfx): Likewise.
5537 (emit_csinc): Likewise.
5538 (emit_cset): Likewise.
5539 (emit_nop): Likewise.
5540 (emit_ops_insns): New helper function.
5541 (emit_pop): Likewise.
5542 (emit_push): Likewise.
5543 (aarch64_emit_prologue): New function.
5544 (aarch64_emit_epilogue): Likewise.
5545 (aarch64_emit_add): Likewise.
5546 (aarch64_emit_sub): Likewise.
5547 (aarch64_emit_mul): Likewise.
5548 (aarch64_emit_lsh): Likewise.
5549 (aarch64_emit_rsh_signed): Likewise.
5550 (aarch64_emit_rsh_unsigned): Likewise.
5551 (aarch64_emit_ext): Likewise.
5552 (aarch64_emit_log_not): Likewise.
5553 (aarch64_emit_bit_and): Likewise.
5554 (aarch64_emit_bit_or): Likewise.
5555 (aarch64_emit_bit_xor): Likewise.
5556 (aarch64_emit_bit_not): Likewise.
5557 (aarch64_emit_equal): Likewise.
5558 (aarch64_emit_less_signed): Likewise.
5559 (aarch64_emit_less_unsigned): Likewise.
5560 (aarch64_emit_ref): Likewise.
5561 (aarch64_emit_if_goto): Likewise.
5562 (aarch64_emit_goto): Likewise.
5563 (aarch64_write_goto_address): Likewise.
5564 (aarch64_emit_const): Likewise.
5565 (aarch64_emit_call): Likewise.
5566 (aarch64_emit_reg): Likewise.
5567 (aarch64_emit_pop): Likewise.
5568 (aarch64_emit_stack_flush): Likewise.
5569 (aarch64_emit_zero_ext): Likewise.
5570 (aarch64_emit_swap): Likewise.
5571 (aarch64_emit_stack_adjust): Likewise.
5572 (aarch64_emit_int_call_1): Likewise.
5573 (aarch64_emit_void_call_2): Likewise.
5574 (aarch64_emit_eq_goto): Likewise.
5575 (aarch64_emit_ne_goto): Likewise.
5576 (aarch64_emit_lt_goto): Likewise.
5577 (aarch64_emit_le_goto): Likewise.
5578 (aarch64_emit_gt_goto): Likewise.
5579 (aarch64_emit_ge_got): Likewise.
5580 (aarch64_emit_ops_impl): New static global variable.
5581 (aarch64_emit_ops): New target function, return
5582 &aarch64_emit_ops_impl.
5583 (struct linux_target_ops): Install it.
5585 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5587 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5588 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5590 * linux-aarch64-ipa.c: New file.
5591 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5593 (aarch64_get_thread_area): New target method.
5594 (extract_signed_bitfield): New helper function.
5595 (aarch64_decode_ldr_literal): New function.
5596 (enum aarch64_opcodes): New enum.
5597 (struct aarch64_register): New struct.
5598 (struct aarch64_operand): New struct.
5599 (x0): New static global.
5608 (aarch64_register): New helper function.
5609 (register_operand): Likewise.
5610 (immediate_operand): Likewise.
5611 (struct aarch64_memory_operand): New struct.
5612 (offset_memory_operand): New helper function.
5613 (preindex_memory_operand): Likewise.
5614 (enum aarch64_system_control_registers): New enum.
5615 (ENCODE): New macro.
5616 (emit_insn): New helper function.
5617 (emit_b): New function.
5618 (emit_bcond): Likewise.
5619 (emit_cb): Likewise.
5620 (emit_tb): Likewise.
5621 (emit_blr): Likewise.
5622 (emit_stp): Likewise.
5623 (emit_ldp_q_offset): Likewise.
5624 (emit_stp_q_offset): Likewise.
5625 (emit_load_store): Likewise.
5626 (emit_ldr): Likewise.
5627 (emit_ldrsw): Likewise.
5628 (emit_str): Likewise.
5629 (emit_ldaxr): Likewise.
5630 (emit_stxr): Likewise.
5631 (emit_stlr): Likewise.
5632 (emit_data_processing_reg): Likewise.
5633 (emit_data_processing): Likewise.
5634 (emit_add): Likewise.
5635 (emit_sub): Likewise.
5636 (emit_mov): Likewise.
5637 (emit_movk): Likewise.
5638 (emit_mov_addr): Likewise.
5639 (emit_mrs): Likewise.
5640 (emit_msr): Likewise.
5641 (emit_sevl): Likewise.
5642 (emit_wfe): Likewise.
5643 (append_insns): Likewise.
5644 (can_encode_int32_in): New helper function.
5645 (aarch64_relocate_instruction): New function.
5646 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5647 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5648 (struct linux_target_ops): Install aarch64_get_thread_area,
5649 aarch64_install_fast_tracepoint_jump_pad and
5650 aarch64_get_min_fast_tracepoint_insn_len.
5652 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5654 * Makefile.in (aarch64-insn.o): New rule.
5655 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5657 2015-09-21 Yao Qi <yao.qi@linaro.org>
5659 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5661 2015-09-21 Yao Qi <yao.qi@linaro.org>
5663 * tracepoint.c (max_jump_pad_size): Remove.
5665 2015-09-18 Yao Qi <yao.qi@linaro.org>
5667 * linux-aarch64-low.c: Don't include sys/uio.h.
5668 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5670 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5672 * tracepoint.c (eval_result_type): Change prototype.
5673 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5675 2015-09-15 Pedro Alves <palves@redhat.com>
5677 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5678 Check whether to report exec events instead of checking whether
5679 multiprocess is enabled.
5681 2015-09-15 Pedro Alves <palves@redhat.com>
5684 * remote-utils.c (prepare_resume_reply): Merge
5685 TARGET_WAITKIND_VFORK_DONE switch case with the
5686 TARGET_WAITKIND_FORKED case.
5688 2015-09-15 Yao Qi <yao.qi@linaro.org>
5690 * server.c (handle_query): Check string comparison using
5691 "else if" instead of "if".
5693 2015-09-15 Yao Qi <yao.qi@linaro.org>
5695 * server.c (vCont_supported): New global variable.
5696 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5697 matches. Append ";vContSupported+" to own_buf.
5698 (handle_v_requests): Append ";s;S" to own_buf if target supports
5699 hardware single step or vCont_supported is false.
5700 (capture_main): Set vCont_supported to zero.
5702 2015-09-15 Yao Qi <yao.qi@linaro.org>
5704 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5706 (linux_supports_hardware_single_step): ... New function.
5707 (linux_target_ops): Update.
5708 * lynx-low.c (lynx_target_ops): Set field
5709 supports_hardware_single_step to target_can_do_hardware_single_step.
5710 * nto-low.c (nto_target_ops): Likewise.
5711 * spu-low.c (spu_target_ops): Likewise.
5712 * win32-low.c (win32_target_ops): Likewise.
5713 * target.c (target_can_do_hardware_single_step): New function.
5714 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5715 Remove. <supports_hardware_single_step>: New field.
5716 (target_supports_conditional_breakpoints): Remove.
5717 (target_supports_hardware_single_step): New macro.
5718 (target_can_do_hardware_single_step): Declare.
5719 * server.c (handle_query): Use target_supports_hardware_single_step
5720 instead of target_supports_conditional_breakpoints.
5722 2015-09-15 Yao Qi <yao.qi@linaro.org>
5724 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5726 (struct linux_target_ops the_low_target): Install
5727 aarch64_linux_siginfo_fixup.
5729 2015-09-11 Don Breazeal <donb@codesourcery.com>
5730 Luis Machado <lgustavo@codesourcery.com>
5732 * linux-low.c (linux_mourn): Static declaration.
5733 (linux_arch_setup): Move in front of
5734 handle_extended_wait.
5735 (linux_arch_setup_thread): New function.
5736 (handle_extended_wait): Handle exec events. Call
5737 linux_arch_setup_thread. Make event_lwp argument a
5738 pointer-to-a-pointer.
5739 (check_zombie_leaders): Do not check stopped threads.
5740 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5741 (linux_low_filter_event): Add lwp and thread for exec'ing
5742 non-leader thread if leader thread has been deleted.
5743 Refactor code into linux_arch_setup_thread and call it.
5744 Pass child lwp pointer by reference to handle_extended_wait.
5745 (linux_wait_for_event_filtered): Update comment.
5746 (linux_wait_1): Prevent clobbering exec event status.
5747 (linux_supports_exec_events): New function.
5748 (linux_target_ops) <supports_exec_events>: Initialize new member.
5749 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5751 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5752 * server.c (report_exec_events): New global variable.
5753 (handle_query): Handle qSupported query for exec-events feature.
5754 (captured_main): Initialize report_exec_events.
5755 * server.h (report_exec_events): Declare new global variable.
5756 * target.h (struct target_ops) <supports_exec_events>: New
5758 (target_supports_exec_events): New macro.
5759 * win32-low.c (win32_target_ops) <supports_exec_events>:
5760 Initialize new member.
5762 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5764 * linux-low.c (linux_low_enable_btrace): Remove.
5765 (linux_target_ops): Replace linux_low_enable_btrace with
5766 linux_enable_btrace.
5768 2015-09-03 Yao Qi <yao.qi@linaro.org>
5770 * linux-aarch64-low.c (aarch64_insert_point): Call
5771 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5774 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5776 * linux-low.c (check_stopped_by_breakpoint): Use
5777 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5779 2015-08-27 Pedro Alves <palves@redhat.com>
5781 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5783 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5785 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5786 the XNEW-family equivalent.
5787 (compile_bytecodes): Likewise.
5788 * dll.c (loaded_dll): Likewise.
5789 * event-loop.c (append_callback_event): Likewise.
5790 (create_file_handler): Likewise.
5791 (create_file_event): Likewise.
5792 * hostio.c (handle_open): Likewise.
5793 * inferiors.c (add_thread): Likewise.
5794 (add_process): Likewise.
5795 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5796 * linux-arm-low.c (arm_new_process): Likewise.
5797 (arm_new_thread): Likewise.
5798 * linux-low.c (add_to_pid_list): Likewise.
5799 (linux_add_process): Likewise.
5800 (handle_extended_wait): Likewise.
5801 (add_lwp): Likewise.
5802 (enqueue_one_deferred_signal): Likewise.
5803 (enqueue_pending_signal): Likewise.
5804 (linux_resume_one_lwp_throw): Likewise.
5805 (linux_resume_one_thread): Likewise.
5806 (linux_read_memory): Likewise.
5807 (linux_write_memory): Likewise.
5808 * linux-mips-low.c (mips_linux_new_process): Likewise.
5809 (mips_linux_new_thread): Likewise.
5810 (mips_add_watchpoint): Likewise.
5811 * linux-x86-low.c (initialize_low_arch): Likewise.
5812 * lynx-low.c (lynx_add_process): Likewise.
5813 * mem-break.c (set_raw_breakpoint_at): Likewise.
5814 (set_breakpoint): Likewise.
5815 (add_condition_to_breakpoint): Likewise.
5816 (add_commands_to_breakpoint): Likewise.
5817 (clone_agent_expr): Likewise.
5818 (clone_one_breakpoint): Likewise.
5819 * regcache.c (new_register_cache): Likewise.
5820 * remote-utils.c (look_up_one_symbol): Likewise.
5821 * server.c (queue_stop_reply): Likewise.
5822 (start_inferior): Likewise.
5823 (queue_stop_reply_callback): Likewise.
5824 (handle_target_event): Likewise.
5825 * spu-low.c (fetch_ppc_memory): Likewise.
5826 (store_ppc_memory): Likewise.
5827 * target.c (set_target_ops): Likewise.
5828 * thread-db.c (thread_db_load_search): Likewise.
5829 (try_thread_db_load_1): Likewise.
5830 * tracepoint.c (add_tracepoint): Likewise.
5831 (add_tracepoint_action): Likewise.
5832 (create_trace_state_variable): Likewise.
5833 (cmd_qtdpsrc): Likewise.
5834 (cmd_qtro): Likewise.
5835 (add_while_stepping_state): Likewise.
5836 * win32-low.c (child_add_thread): Likewise.
5837 (get_image_name): Likewise.
5839 2015-08-25 Yao Qi <yao.qi@linaro.org>
5841 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5843 2015-08-25 Yao Qi <yao.qi@linaro.org>
5845 * Makefile.in (aarch64-linux.o): New rule.
5846 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5848 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5849 (aarch64_init_debug_reg_state): Make it extern.
5850 (aarch64_linux_prepare_to_resume): Remove.
5852 2015-08-25 Yao Qi <yao.qi@linaro.org>
5854 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5855 lwp_arch_private_info and ptid_of_lwp.
5857 2015-08-25 Yao Qi <yao.qi@linaro.org>
5859 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5860 Find proc_info by find_process_pid. All callers updated.
5862 2015-08-25 Yao Qi <yao.qi@linaro.org>
5864 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5866 (debug_reg_change_callback): Remove.
5867 (aarch64_notify_debug_reg_change): Remove.
5869 2015-08-25 Yao Qi <yao.qi@linaro.org>
5871 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5872 Call current_lwp_ptid.
5874 2015-08-25 Yao Qi <yao.qi@linaro.org>
5876 * linux-aarch64-low.c (debug_reg_change_callback): Use
5879 2015-08-25 Yao Qi <yao.qi@linaro.org>
5881 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5883 2015-08-25 Yao Qi <yao.qi@linaro.org>
5885 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5887 2015-08-25 Yao Qi <yao.qi@linaro.org>
5889 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5892 2015-08-25 Yao Qi <yao.qi@linaro.org>
5894 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5896 (debug_reg_change_callback): Remove argument entry and add argument
5897 lwp. Remove local variable thread. Don't print thread id in the
5898 debugging output. Don't check whether pid of thread equals to pid.
5899 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5900 iterate_over_lwps instead find_inferior.
5902 2015-08-24 Pedro Alves <palves@redhat.com>
5904 * inferiors.c (get_first_process): New function.
5905 * inferiors.h (get_first_process): New declaration.
5906 * remote-utils.c (read_ptid): Default to the first process in the
5907 list, instead of to the current thread's process.
5909 2015-08-24 Pedro Alves <palves@redhat.com>
5911 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5912 * event-loop.c: Likewise.
5913 * remote-utils.c: Likewise.
5914 * tracepoint.c: Likewise.
5916 2015-08-24 Pedro Alves <palves@redhat.com>
5918 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5921 2015-08-21 Pedro Alves <palves@redhat.com>
5923 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5924 instead of literal 1.
5926 2015-08-21 Pedro Alves <palves@redhat.com>
5928 * tdesc.c (default_description): Explicitly zero-initialize.
5930 2015-08-21 Pedro Alves <palves@redhat.com>
5933 * inferiors.c (remove_thread): Discard any pending stop reply for
5935 * server.c (remove_all_on_match_pid): Rename to ...
5936 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5938 (discard_queued_stop_replies): Change parameter to a ptid. Now
5940 (handle_v_kill, kill_inferior_callback, captured_main)
5941 (process_serial_event): Adjust.
5942 * server.h (discard_queued_stop_replies): Declare.
5944 2015-08-21 Pedro Alves <palves@redhat.com>
5946 * linux-low.c (wait_for_sigstop): Always switch to no thread
5947 selected if the previously current thread dies.
5948 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5949 process instead of the current thread's.
5950 * remote-utils.c (input_interrupt): Don't check if there's no
5952 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5953 current thread to the general thread fails, error out.
5954 (handle_qxfer_auxv, handle_qxfer_libraries)
5955 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5956 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5957 (handle_query): Check if there's a thread selected instead of
5958 checking whether there's any thread in the thread list.
5959 (handle_qxfer_threads, handle_qxfer_btrace)
5960 (handle_qxfer_btrace_conf): Don't error out early if there's no
5961 thread in the thread list.
5962 (handle_v_cont, myresume): Don't set the current thread to the
5964 (process_serial_event) <Hg handling>: Also set thread_id if the
5965 previous general thread is still alive.
5966 (process_serial_event) <g/G handling>: If setting the current
5967 thread to the general thread fails, error out.
5968 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5969 thread's lwp instead of the current thread's.
5970 * target.c (set_desired_thread): If the desired thread was not
5971 found, leave the current thread pointing to NULL. Return an int
5972 (boolean) indicating success.
5973 * target.h (set_desired_thread): Change return type to int.
5975 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5977 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5978 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5980 (ps_get_thread_area): New function.
5982 2015-08-19 Gary Benson <gbenson@redhat.com>
5984 * hostio.c (handle_pread): Do not attempt to read more data
5985 than hostio_reply_with_data can fit in a packet.
5987 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5989 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5991 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5993 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5995 2015-08-06 Pedro Alves <palves@redhat.com>
5997 * tracepoint.c (expr_eval_result): Now an int.
5999 2015-08-06 Pedro Alves <palves@redhat.com>
6001 * gdbthread.h (struct regcache): Forward declare.
6002 (struct thread_info) <regcache_data>: Now a struct regcache
6004 * inferiors.c (inferior_regcache_data)
6005 (set_inferior_regcache_data): Now work with struct regcache
6007 * inferiors.h (struct regcache): Forward declare.
6008 (inferior_regcache_data, set_inferior_regcache_data): Now work
6009 with struct regcache pointers.
6010 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6011 (free_register_cache_thread): Remove struct regcache pointer
6014 2015-08-06 Pedro Alves <palves@redhat.com>
6016 * server.c (captured_main): On error, print the exception message
6017 to stderr, and if run_once is set, throw a quit.
6019 2015-08-06 Pedro Alves <palves@redhat.com>
6021 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6024 2015-08-06 Pedro Alves <palves@redhat.com>
6026 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6027 reading beyond the passed in buffer length.
6029 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6031 * tracepoint.c (symbol_list) <required>: Remove.
6033 2015-08-06 Pedro Alves <palves@redhat.com>
6035 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6036 count if stopping and suspending threads.
6037 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6038 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6039 (linux_detach): Complete an ongoing step-over.
6040 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6042 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6043 (linux_wait_1): If passing a signal to the inferior after
6044 finishing a step-over, unsuspend and re-resume all lwps. If we
6045 see a single-step event but the thread should be continuing, don't
6046 pass the trap to gdb.
6047 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6048 internal_error instead of gdb_assert.
6049 (enqueue_pending_signal): New function.
6050 (check_ptrace_stopped_lwp_gone): Add debug output.
6051 (start_step_over): Use internal_error instead of gdb_assert.
6052 (complete_ongoing_step_over): New function.
6053 (linux_resume_one_thread): Don't resume a suspended thread.
6054 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6057 2015-08-06 Pedro Alves <palves@redhat.com>
6059 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6060 (linux_thread_alive): Use lwp_is_marked_dead.
6061 (extended_event_reported): Delete.
6062 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6063 instead of extended_event_reported.
6064 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6066 (lwp_is_marked_dead): New function.
6067 (lwp_running): Use lwp_is_marked_dead.
6068 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6071 2015-08-06 Pedro Alves <palves@redhat.com>
6073 * linux-low.c (linux_wait_1): Move fork event output out of the
6074 !report_to_gdb check. Pass event_child->waitstatus to
6075 target_waitstatus_to_string instead of ourstatus.
6077 2015-08-04 Yao Qi <yao.qi@linaro.org>
6079 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6080 if current_thread is 32 bit.
6082 2015-08-04 Yao Qi <yao.qi@linaro.org>
6084 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6085 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6086 * server.c (extended_protocol): Remove "static".
6087 * server.h (extended_protocol): Declare it.
6089 2015-08-04 Yao Qi <yao.qi@linaro.org>
6091 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6092 both aarch64 and aarch32.
6093 (aarch64_set_pc): Likewise.
6095 2015-08-04 Yao Qi <yao.qi@linaro.org>
6097 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6098 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6099 arm-with-neon.xml to srv_xmlfiles.
6100 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6101 (is_64bit_tdesc): New function.
6102 (aarch64_linux_read_description): New function.
6103 (aarch64_arch_setup): Call aarch64_linux_read_description.
6104 (regs_info): Rename to regs_info_aarch64.
6105 (aarch64_regs_info): Return right regs_info.
6106 (initialize_low_arch): Call initialize_low_arch_aarch32.
6108 2015-08-04 Yao Qi <yao.qi@linaro.org>
6110 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6111 * linux-aarch32-low.c: New file.
6112 * linux-aarch32-low.h: New file.
6113 * linux-arm-low.c (arm_fill_gregset): Move it to
6114 linux-aarch32-low.c.
6115 (arm_store_gregset): Likewise.
6116 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6117 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6118 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6119 (regs_info): Rename to regs_info_arm.
6120 (arm_regs_info): Return regs_info_aarch32 if
6121 have_ptrace_getregset is 1 and target description is
6122 arm_with_neon or arm_with_vfpv3.
6123 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6124 Call initialize_low_arch_aarch32 instead.
6126 2015-08-04 Yao Qi <yao.qi@linaro.org>
6128 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6129 * linux-low.c: ... here.
6130 * linux-low.h (have_ptrace_getregset): Declare it.
6132 2015-08-04 Pedro Alves <palves@redhat.com>
6134 * thread-db.c (struct thread_db): Use new typedefs.
6135 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6137 (disable_thread_event_reporting): Cast result of dlsym to
6138 destination function pointer type.
6139 (thread_db_mourn): Use td_ta_delete_ftype.
6141 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6143 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6145 (CDX_BREAKPOINT): Define for R2.
6146 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6147 (the_low_target): Add comments.
6149 2015-07-30 Yao Qi <yao.qi@linaro.org>
6151 * linux-arm-low.c (arm_hwcap): Remove it.
6152 (arm_read_description): New local variable arm_hwcap. Don't
6153 set arm_hwcap to zero.
6155 2015-07-30 Yao Qi <yao.qi@linaro.org>
6157 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6158 Use regcache->tdesc instead.
6159 (arm_store_wmmxregset): Likewise.
6160 (arm_fill_vfpregset): Likewise.
6161 (arm_store_vfpregset): Likewise.
6163 2015-07-30 Yao Qi <yao.qi@linaro.org>
6165 * linux-arm-low.c: Include arch/arm.h.
6166 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6167 (arm_store_gregset): Likewise.
6169 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6171 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6172 ptrace's 4th parameter.
6174 2015-07-27 Yao Qi <yao.qi@linaro.org>
6176 * configure.srv (case aarch64*-*-linux*): Don't set
6179 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6181 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6183 * linux-arm-low.c: Likewise.
6184 * linux-cris-low.c: Likewise.
6185 * linux-crisv32-low.c: Likewise.
6186 * linux-low.c: Likewise.
6187 * linux-m68k-low.c: Likewise.
6188 * linux-mips-low.c: Likewise.
6189 * linux-nios2-low.c: Likewise.
6190 * linux-s390-low.c: Likewise.
6191 * linux-sparc-low.c: Likewise.
6192 * linux-tic6x-low.c: Likewise.
6193 * linux-tile-low.c: Likewise.
6194 * linux-x86-low.c: Likewise.
6196 2015-07-24 Pedro Alves <palves@redhat.com>
6198 * config.in: Regenerate.
6199 * configure: Regenerate.
6201 2015-07-24 Pedro Alves <palves@redhat.com>
6203 * acinclude.m4: Include ../ptrace.m4.
6204 * configure.ac: Call GDB_AC_PTRACE.
6205 * config.in, configure: Regenerate.
6207 2015-07-24 Yao Qi <yao.qi@linaro.org>
6209 * linux-low.c (linux_create_inferior): Remove setting to
6210 proc->priv->new_inferior.
6211 (linux_attach): Likewise.
6212 (linux_low_filter_event): Likewise.
6213 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6215 2015-07-24 Yao Qi <yao.qi@linaro.org>
6217 * linux-low.c (linux_arch_setup): New function.
6218 (linux_low_filter_event): If proc->tdesc is NULL and
6219 proc->attached is true, call the_low_target.arch_setup.
6220 Otherwise, keep status pending, and return.
6221 (linux_resume_one_lwp_throw): Don't call get_pc if
6222 thread->while_stepping isn't NULL. Don't call
6223 get_thread_regcache if proc->tdesc is NULL.
6224 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6225 (linux_target_ops): Install arch_setup.
6226 * server.c (start_inferior): Call the_target->arch_setup.
6227 * target.h (struct target_ops) <arch_setup>: New field.
6228 (target_arch_setup): New marco.
6229 * lynx-low.c (lynx_target_ops): Update.
6230 * nto-low.c (nto_target_ops): Update.
6231 * spu-low.c (spu_target_ops): Update.
6232 * win32-low.c (win32_target_ops): Update.
6234 2015-07-24 Yao Qi <yao.qi@linaro.org>
6236 * linux-low.c (linux_add_process): Don't set
6237 proc->priv->new_inferior.
6238 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6239 (linux_attach): Likewise.
6241 2015-07-24 Yao Qi <yao.qi@linaro.org>
6243 * server.c (start_inferior): Code refactor.
6245 2015-07-24 Yao Qi <yao.qi@linaro.org>
6247 * server.c (process_serial_event): Set general_thread.
6249 2015-07-21 Yao Qi <yao.qi@linaro.org>
6251 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6252 aarch64_linux_get_debug_reg_capacity.
6254 2015-07-17 Yao Qi <yao.qi@linaro.org>
6256 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6257 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6258 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6259 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6260 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6261 (AARCH64_HWP_ALIGNMENT): Likewise.
6262 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6263 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6264 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6265 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6266 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6267 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6268 (struct aarch64_debug_reg_state): Likewise.
6269 (struct arch_lwp_info): Likewise.
6270 (aarch64_align_watchpoint): Likewise.
6271 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6272 (aarch64_watchpoint_length): Likewise.
6273 (aarch64_point_encode_ctrl_reg): Likewise
6274 (aarch64_point_is_aligned): Likewise.
6275 (aarch64_align_watchpoint): Likewise.
6276 (aarch64_linux_set_debug_regs):
6277 (aarch64_dr_state_insert_one_point): Likewise.
6278 (aarch64_dr_state_remove_one_point): Likewise.
6279 (aarch64_handle_breakpoint): Likewise.
6280 (aarch64_handle_aligned_watchpoint): Likewise.
6281 (aarch64_handle_unaligned_watchpoint): Likewise.
6282 (aarch64_handle_watchpoint): Likewise.
6284 2015-07-17 Yao Qi <yao.qi@linaro.org>
6286 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6287 and don't aarch64_get_debug_reg_state. All callers update.
6288 (aarch64_handle_aligned_watchpoint): Likewise.
6289 (aarch64_handle_unaligned_watchpoint): Likewise.
6290 (aarch64_handle_watchpoint): Likewise.
6291 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6292 (aarch64_remove_point): Likewise.
6294 2015-07-17 Yao Qi <yao.qi@linaro.org>
6296 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6298 (aarch64_handle_unaligned_watchpoint): Likewise.
6300 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6302 Revert the previous 3 commits:
6303 Move gdb_regex* to common/
6304 Move linux_find_memory_regions_full & co.
6305 gdbserver build-id attribute generator
6307 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6308 Jan Kratochvil <jan.kratochvil@redhat.com>
6310 gdbserver build-id attribute generator.
6311 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6312 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6313 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6315 (get_dynamic): Use find_pdhr to traverse program headers.
6316 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6317 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6318 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6319 (get_hex_build_id): New.
6320 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6321 to reply XML document.
6323 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6324 Jan Kratochvil <jan.kratochvil@redhat.com>
6326 * target.c: Include target/target-utils.h and fcntl.h.
6327 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6328 (target_fileio_read_stralloc): New functions.
6330 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6332 * Makefile.in (OBS): Add gdb_regex.o.
6334 * config.in: Rebuilt.
6335 * configure: Rebuilt.
6337 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6338 Jan Kratochvil <jan.kratochvil@redhat.com>
6340 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6341 * Makefile.in (OBS): Add target-utils.o.
6342 (linux-maps.o, target-utils.o): New.
6343 * configure.srv (srv_linux_obj): Add linux-maps.o.
6345 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6347 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6349 (the_low_target): Install it.
6351 2015-07-14 Pedro Alves <palves@redhat.com>
6353 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6354 Instead, ignore ECHILD, and throw an error for other errnos.
6356 2015-07-10 Pedro Alves <palves@redhat.com>
6358 * event-loop.c (struct callback_event) <data>: Change type to
6359 gdb_client_data instance instead of gdb_client_data pointer.
6360 (append_callback_event): Adjust.
6362 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6364 * linux-aarch64-low.c: Add comments for each linux_target_ops
6365 method. Remove comments already covered in target_ops and
6366 linux_target_ops definitions.
6367 (the_low_target): Add comments for each unimplemented method.
6369 2015-07-09 Yao Qi <yao.qi@linaro.org>
6371 * linux-aarch64-low.c (aarch64_regmap): Remove.
6372 (aarch64_usrregs_info): Remove.
6373 (regs_info): Set field usrregs to NULL.
6375 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6377 * linux-low.c: Include "rsp-low.h"
6378 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6379 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6380 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6381 (handle_btrace_enable_pt): New.
6382 (handle_btrace_general_set): Support "pt".
6383 (handle_btrace_conf_general_set): Support "pt:size".
6385 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6387 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6390 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6392 * linux-aarch64-low.c: Remove comment about endianness.
6393 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6394 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6397 2015-06-24 Gary Benson <gbenson@redhat.com>
6399 * linux-i386-ipa.c (stdint.h): Do not include.
6400 * lynx-i386-low.c (stdint.h): Likewise.
6401 * lynx-ppc-low.c (stdint.h): Likewise.
6402 * mem-break.c (stdint.h): Likewise.
6403 * thread-db.c (stdint.h): Likewise.
6404 * tracepoint.c (stdint.h): Likewise.
6405 * win32-low.c (stdint.h): Likewise.
6407 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6409 * server.c (write_qxfer_response): Update call to
6410 remote_escape_output.
6412 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6413 Jan Kratochvil <jan.kratochvil@redhat.com>
6415 Merge multiple hex conversions.
6416 * gdbreplay.c (tohex): Rename to 'fromhex'.
6417 (logchar): Use fromhex.
6419 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6421 * server.c (handle_qxfer_libraries): Set `version' attribute for
6424 2015-06-10 Gary Benson <gbenson@redhat.com>
6426 * target.h (struct target_ops) <multifs_open>: New field.
6427 <multifs_unlink>: Likewise.
6428 <multifs_readlink>: Likewise.
6429 * linux-low.c (nat/linux-namespaces.h): New include.
6430 (linux_target_ops): Initialize the_target->multifs_open,
6431 the_target->multifs_unlink and the_target->multifs_readlink.
6432 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6433 * hostio.c (hostio_fs_pid): New static variable.
6434 (hostio_handle_new_gdb_connection): New function.
6435 (handle_setfs): Likewise.
6436 (handle_open): Use the_target->multifs_open as appropriate.
6437 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6438 (handle_readlink): Use the_target->multifs_readlink as
6440 (handle_vFile): Handle vFile:setfs packets.
6441 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6442 after target_handle_new_gdb_connection.
6444 2015-06-10 Gary Benson <gbenson@redhat.com>
6446 * configure.ac (AC_CHECK_FUNCS): Add setns.
6447 * config.in: Regenerate.
6448 * configure: Likewise.
6449 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6450 (linux-namespaces.o): New rule.
6451 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6453 2015-06-09 Gary Benson <gbenson@redhat.com>
6455 * hostio.c (handle_open): Process mode argument with
6456 fileio_to_host_mode.
6458 2015-06-01 Yao Qi <yao.qi@linaro.org>
6460 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6461 * linux-x86-low.c: Likewise.
6463 2015-05-28 Don Breazeal <donb@codesourcery.com>
6465 * linux-low.c (handle_extended_wait): Initialize
6466 thread_info.last_resume_kind for new fork children.
6468 2015-05-15 Pedro Alves <palves@redhat.com>
6470 * target.h (target_handle_new_gdb_connection): Rewrite using if
6471 wrapped in do/while.
6473 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6475 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6476 * configure, config.in: Regenerate.
6477 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6480 2015-05-12 Don Breazeal <donb@codesourcery.com>
6482 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6483 PTRACE_EVENT_VFORK_DONE.
6484 (linux_low_ptrace_options, extended_event_reported): Add vfork
6486 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6487 and "vforkdone" for RSP 'T' Stop Reply Packet.
6488 * server.h (report_vfork_events): Declare
6491 2015-05-12 Don Breazeal <donb@codesourcery.com>
6493 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6494 (the_low_target) <new_fork>: Initialize new member.
6495 * linux-arm-low.c (arm_new_fork): New function.
6496 (the_low_target) <new_fork>: Initialize new member.
6497 * linux-low.c (handle_extended_wait): Call new target function
6499 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6500 * linux-mips-low.c (mips_add_watchpoint): New function
6501 extracted from mips_insert_point.
6502 (the_low_target) <new_fork>: Initialize new member.
6503 (mips_linux_new_fork): New function.
6504 (mips_insert_point): Call mips_add_watchpoint.
6505 * linux-x86-low.c (x86_linux_new_fork): New function.
6506 (the_low_target) <new_fork>: Initialize new member.
6508 2015-05-12 Don Breazeal <donb@codesourcery.com>
6510 * linux-low.c (handle_extended_wait): Implement return value,
6511 rename argument 'event_child' to 'event_lwp', handle
6512 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6513 (linux_low_ptrace_options): New function.
6514 (linux_low_filter_event): Call linux_low_ptrace_options,
6515 use different argument fo linux_enable_event_reporting,
6516 use return value from handle_extended_wait.
6517 (extended_event_reported): New function.
6518 (linux_wait_1): Call extended_event_reported and set
6519 status to report fork events.
6520 (linux_write_memory): Add pid to debug message.
6521 (reset_lwp_ptrace_options_callback): New function.
6522 (linux_handle_new_gdb_connection): New function.
6523 (linux_target_ops): Initialize new structure member.
6524 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6525 * lynx-low.c: Initialize new structure member.
6526 * remote-utils.c (prepare_resume_reply): Implement stop reason
6527 "fork" for "T" stop message.
6528 * server.c (handle_query): Call handle_new_gdb_connection.
6529 * server.h (report_fork_events): Declare global flag.
6530 * target.h (struct target_ops) <handle_new_gdb_connection>:
6532 (target_handle_new_gdb_connection): New macro.
6533 * win32-low.c: Initialize new structure member.
6535 2015-05-12 Don Breazeal <donb@codesourcery.com>
6537 * mem-break.c (APPEND_TO_LIST): Define macro.
6538 (clone_agent_expr): New function.
6539 (clone_one_breakpoint): New function.
6540 (clone_all_breakpoints): New function.
6541 * mem-break.h: Declare new functions.
6543 2015-05-12 Don Breazeal <donb@codesourcery.com>
6545 * linux-low.c (linux_supports_fork_events): New function.
6546 (linux_supports_vfork_events): New function.
6547 (linux_target_ops): Initialize new structure members.
6548 (initialize_low): Call linux_check_ptrace_features.
6549 * lynx-low.c (lynx_target_ops): Initialize new structure
6551 * server.c (report_fork_events, report_vfork_events):
6553 (handle_query): Add new features to qSupported packet and
6555 (captured_main): Initialize new global variables.
6556 * target.h (struct target_ops) <supports_fork_events>:
6558 <supports_vfork_events>: New member.
6559 (target_supports_fork_events): New macro.
6560 (target_supports_vfork_events): New macro.
6561 * win32-low.c (win32_target_ops): Initialize new structure
6564 2015-05-12 Gary Benson <gbenson@redhat.com>
6566 * server.c (handle_qxfer_exec_file): Use current process
6569 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6571 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6572 Remove HAVE_PTRACE_GETREGS conditionals.
6573 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6574 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6576 2015-05-08 Yao Qi <yao.qi@linaro.org>
6578 * linux-low.c (linux_supports_conditional_breakpoints): New
6580 (linux_target_ops): Install new target method.
6581 * lynx-low.c (lynx_target_ops): Install NULL hook for
6582 supports_conditional_breakpoints.
6583 * nto-low.c (nto_target_ops): Likewise.
6584 * spu-low.c (spu_target_ops): Likewise.
6585 * win32-low.c (win32_target_ops): Likewise.
6586 * server.c (handle_query): Check
6587 target_supports_conditional_breakpoints.
6588 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6590 (target_supports_conditional_breakpoints): New macro.
6592 2015-05-06 Pedro Alves <palves@redhat.com>
6595 * server.c (start_inferior): If the process exits, mourn it.
6597 2015-04-21 Gary Benson <gbenson@redhat.com>
6599 * hostio.c (fileio_open_flags_to_host): Factored out to
6600 fileio_to_host_openflags in common/fileio.c. Single use
6603 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6605 * linux-xtensa-low.c (xtensa_fill_gregset)
6606 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6609 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6611 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6612 (regs_info): Replace usrregs pointer with NULL.
6614 2015-04-17 Gary Benson <gbenson@redhat.com>
6616 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6617 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6618 * server.c (handle_qxfer_exec_file): New function.
6619 (qxfer_packets): Add exec-file entry.
6620 (handle_query): Report qXfer:exec-file:read as supported packet.
6622 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6624 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6626 2015-04-09 Gary Benson <gbenson@redhat.com>
6628 * hostio-errno.c (errno_to_fileio_error): Remove function.
6629 Update caller to use remote_fileio_to_fio_error.
6631 2015-04-09 Yao Qi <yao.qi@linaro.org>
6633 * linux-low.c (linux_insert_point): Call
6634 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6635 (linux_remove_point): Call remove_memory_breakpoint if type is
6637 * linux-x86-low.c (x86_insert_point): Don't call
6638 insert_memory_breakpoint.
6639 (x86_remove_point): Don't call remove_memory_breakpoint.
6641 2015-04-01 Pedro Alves <palves@redhat.com>
6642 Cleber Rosa <crosa@redhat.com>
6644 * server.c (gdbserver_usage): Reorganize and extend the usage
6647 2015-03-24 Pedro Alves <palves@redhat.com>
6649 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6650 output. Also dump TRAP_TRACE.
6651 (linux_low_filter_event): In debug output, distinguish a
6652 resume_stop SIGSTOP from a delayed SIGSTOP.
6654 2015-03-24 Gary Benson <gbenson@redhat.com>
6656 * linux-x86-low.c (x86_linux_new_thread): Moved to
6658 (x86_linux_prepare_to_resume): Likewise.
6660 2015-03-24 Gary Benson <gbenson@redhat.com>
6662 * Makefile.in (x86-linux-dregs.o): New rule.
6663 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6664 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6665 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6666 (x86_linux_dr_get): Likewise.
6667 (x86_linux_dr_set): Likewise.
6668 (update_debug_registers_callback): Likewise.
6669 (x86_linux_dr_set_addr): Likewise.
6670 (x86_linux_dr_get_addr): Likewise.
6671 (x86_linux_dr_set_control): Likewise.
6672 (x86_linux_dr_get_control): Likewise.
6673 (x86_linux_dr_get_status): Likewise.
6674 (x86_linux_update_debug_registers): Likewise.
6676 2015-03-24 Gary Benson <gbenson@redhat.com>
6678 * linux-x86-low.c (x86_linux_update_debug_registers):
6679 New function, factored out from...
6680 (x86_linux_prepare_to_resume): ...this.
6682 2015-03-24 Gary Benson <gbenson@redhat.com>
6684 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6685 (x86_linux_dr_set): Likewise.
6686 (update_debug_registers_callback): Likewise.
6687 (x86_linux_dr_set_addr): Likewise.
6688 (x86_linux_dr_get_addr): Likewise.
6689 (x86_linux_dr_set_control): Likewise.
6690 (x86_linux_dr_get_control): Likewise.
6691 (x86_linux_dr_get_status): Likewise.
6692 (x86_linux_prepare_to_resume): Likewise.
6694 2015-03-24 Gary Benson <gbenson@redhat.com>
6696 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6697 Use perror_with_name. Pass string through gettext.
6698 (x86_linux_dr_set): Likewise.
6700 2015-03-24 Gary Benson <gbenson@redhat.com>
6702 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6703 (x86_linux_dr_set_addr): ...this.
6704 (x86_dr_low_get_addr): Rename to...
6705 (x86_linux_dr_get_addr): ...this.
6706 (x86_dr_low_set_control): Rename to...
6707 (x86_linux_dr_set_control): ...this.
6708 (x86_dr_low_get_control): Rename to...
6709 (x86_linux_dr_get_control): ...this.
6710 (x86_dr_low_get_status): Rename to...
6711 (x86_linux_dr_get_status): ...this.
6712 (x86_dr_low): Update with new function names.
6714 2015-03-24 Gary Benson <gbenson@redhat.com>
6716 * Makefile.in (x86-linux.o): New rule.
6717 * configure.srv: Add x86-linux.o to relevant targets.
6718 * linux-low.c (lwp_set_arch_private_info): New function.
6719 (lwp_arch_private_info): Likewise.
6720 * linux-x86-low.c: Include nat/x86-linux.h.
6721 (arch_lwp_info): Removed structure.
6722 (update_debug_registers_callback):
6723 Use lwp_set_debug_registers_changed.
6724 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6725 and lwp_set_debug_registers_changed.
6726 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6728 2015-03-24 Gary Benson <gbenson@redhat.com>
6730 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6731 * linux-arm-low.c (arm_new_thread): Likewise.
6732 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6733 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6734 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6735 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6737 2015-03-24 Gary Benson <gbenson@redhat.com>
6739 * linux-low.c (ptid_of_lwp): New function.
6740 (lwp_is_stopped): Likewise.
6741 (lwp_stop_reason): Likewise.
6742 * linux-x86-low.c (update_debug_registers_callback):
6744 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6747 2015-03-24 Gary Benson <gbenson@redhat.com>
6749 * linux-low.h (linux_stop_lwp): Remove declaration.
6751 2015-03-24 Gary Benson <gbenson@redhat.com>
6753 * linux-low.h: Include nat/linux-nat.h.
6754 * linux-low.c (iterate_over_lwps_args): New structure.
6755 (iterate_over_lwps_filter): New function.
6756 (iterate_over_lwps): Likewise.
6757 * linux-x86-low.c (update_debug_registers_callback):
6758 Update signature to what iterate_over_lwps expects.
6759 Remove PID check that iterate_over_lwps now performs.
6760 (x86_dr_low_set_addr): Use iterate_over_lwps.
6761 (x86_dr_low_set_control): Likewise.
6763 2015-03-24 Gary Benson <gbenson@redhat.com>
6765 * linux-x86-low.c (x86_debug_reg_state): New function.
6766 (x86_linux_prepare_to_resume): Use the above.
6768 2015-03-24 Gary Benson <gbenson@redhat.com>
6770 * linux-low.c (current_lwp_ptid): New function.
6771 * linux-x86-low.c: Include nat/linux-nat.h.
6772 (x86_dr_low_get_addr): Use current_lwp_ptid.
6773 (x86_dr_low_get_control): Likewise.
6774 (x86_dr_low_get_status): Likewise.
6776 2015-03-20 Pedro Alves <palves@redhat.com>
6778 * tracepoint.c (cmd_qtstatus): Make "str" const.
6780 2015-03-20 Pedro Alves <palves@redhat.com>
6782 * server.c (handle_general_set): Make "req_str" const.
6784 2015-03-19 Pedro Alves <palves@redhat.com>
6786 * linux-low.c (linux_resume_one_lwp): Rename to ...
6787 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6788 instead call perror_with_name.
6789 (check_ptrace_stopped_lwp_gone): New function.
6790 (linux_resume_one_lwp): Reimplement as wrapper around
6791 linux_resume_one_lwp_throw that swallows errors if the LWP is
6794 2015-03-19 Pedro Alves <palves@redhat.com>
6796 * linux-low.c (count_events_callback, select_event_lwp_callback):
6797 No longer check whether the thread has resume_stop as last resume
6800 2015-03-19 Pedro Alves <palves@redhat.com>
6802 * linux-low.c (count_events_callback, select_event_lwp_callback):
6803 Use the lwp's status_pending_p field, not the thread's.
6805 2015-03-19 Pedro Alves <palves@redhat.com>
6807 * linux-low.c (select_event_lwp_callback): Update comments to
6808 no longer mention SIGTRAP.
6810 2015-03-18 Gary Benson <gbenson@redhat.com>
6812 * server.c (handle_query): Do not report vFile:fstat as supported.
6814 2015-03-11 Gary Benson <gbenson@redhat.com>
6816 * hostio.c (sys/types.h): New include.
6817 (sys/stat.h): Likewise.
6818 (common-remote-fileio.h): Likewise.
6819 (handle_fstat): New function.
6820 (handle_vFile): Handle vFile:fstat packets.
6822 2015-03-11 Gary Benson <gbenson@redhat.com>
6824 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6825 struct stat.st_blocks and struct stat.st_blksize.
6826 * configure: Regenerate.
6827 * config.in: Likewise.
6828 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6829 (OBS): Add common-remote-fileio.o.
6830 (common-remote-fileio.o): New rule.
6832 2015-03-09 Pedro Alves <palves@redhat.com>
6834 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6835 'struct sockaddr' pointer in 'accept' call.
6837 2015-03-09 Pedro Alves <palves@redhat.com>
6840 2015-03-07 Pedro Alves <palves@redhat.com>
6841 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6842 or <winsock2.h> here. Instead include "gdb_socket.h".
6843 (remote_open): Use union gdb_sockaddr_u.
6844 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6845 or <winsock2.h> here. Instead include "gdb_socket.h".
6846 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6847 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6849 (init_named_socket, gdb_agent_helper_thread): Use union
6852 2015-03-07 Pedro Alves <palves@redhat.com>
6854 * configure.ac (build_warnings): Move
6855 -Wdeclaration-after-statement to the C-specific set.
6856 * configure: Regenerate.
6858 2015-03-07 Pedro Alves <palves@redhat.com>
6860 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6861 or <winsock2.h> here. Instead include "gdb_socket.h".
6862 (remote_open): Use union gdb_sockaddr_u.
6863 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6864 or <winsock2.h> here. Instead include "gdb_socket.h".
6865 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6866 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6868 (init_named_socket, gdb_agent_helper_thread): Use union
6871 2015-03-07 Pedro Alves <palves@redhat.com>
6873 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6876 2015-03-06 Yao Qi <yao.qi@linaro.org>
6878 * linux-aarch64-low.c (aarch64_insert_point): Use
6879 show_debug_regs as a boolean.
6880 (aarch64_remove_point): Likewise.
6882 2015-03-05 Pedro Alves <palves@redhat.com>
6884 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6885 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6886 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6887 * nto-low.c (nto_target_ops): Likewise.
6888 * spu-low.c (spu_target_ops): Likewise.
6889 * win32-low.c (win32_target_ops): Likewise.
6891 2015-03-04 Pedro Alves <palves@redhat.com>
6893 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6894 Decide whether a breakpoint triggered based on the SIGTRAP's
6896 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6897 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6898 (linux_low_filter_event): Check for breakpoints before checking
6900 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6902 (linux_stopped_by_sw_breakpoint)
6903 (linux_supports_stopped_by_sw_breakpoint)
6904 (linux_stopped_by_hw_breakpoint)
6905 (linux_supports_stopped_by_hw_breakpoint): New functions.
6906 (linux_target_ops): Install new target methods.
6908 2015-03-04 Pedro Alves <palves@redhat.com>
6910 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6911 * server.c (swbreak_feature, hwbreak_feature): New globals.
6912 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6913 (captured_main): Clear swbreak_feature and hwbreak_feature.
6914 * server.h (swbreak_feature, hwbreak_feature): Declare.
6915 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6916 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6917 supports_stopped_by_hw_breakpoint>: New fields.
6918 (target_supports_stopped_by_sw_breakpoint)
6919 (target_stopped_by_sw_breakpoint)
6920 (target_supports_stopped_by_hw_breakpoint)
6921 (target_stopped_by_hw_breakpoint): Declare.
6923 2015-03-04 Pedro Alves <palves@redhat.com>
6925 enum lwp_stop_reason -> enum target_stop_reason
6926 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6927 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6928 (linux_wait_1, stuck_in_jump_pad_callback)
6929 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6930 (linux_stopped_by_watchpoint):
6931 * linux-low.h (enum lwp_stop_reason): Delete.
6932 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6933 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6935 2015-03-04 Yao Qi <yao.qi@linaro.org>
6937 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6939 2015-03-03 Gary Benson <gbenson@redhat.com>
6941 * hostio.c (handle_vFile): Fix prefix lengths.
6943 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6945 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6948 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6950 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6951 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6952 (clean): Add "rm -f" for above C files.
6953 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6954 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6955 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6956 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6957 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6958 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6959 (init_registers_s390x_vx_linux64)
6960 (init_registers_s390x_tevx_linux64)
6961 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6962 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6964 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6965 (s390_store_vxrs_high): New functions.
6966 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6968 (s390_arch_setup): Add logic for selecting one of the new target
6969 descriptions. Activate the new vector regsets if applicable.
6970 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6971 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6972 and init_registers_s390x_tevx_linux64.
6974 2015-03-01 Pedro Alves <palves@redhat.com>
6976 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6979 2015-02-27 Pedro Alves <palves@redhat.com>
6981 * linux-x86-low.c (u_debugreg_offset): New function.
6982 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6984 2015-02-27 Pedro Alves <palves@redhat.com>
6986 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6987 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6988 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6989 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6990 (ps_lsetfpregs, ps_getpid)
6991 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6992 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6993 (ps_lsetxregs, ps_plog): Declare.
6995 2015-02-27 Pedro Alves <palves@redhat.com>
6997 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6998 IP_AGENT_EXPORT_FUNC.
6999 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7000 IP_AGENT_EXPORT_FUNC.
7001 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7002 (IP_AGENT_EXPORT): Delete.
7003 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7004 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7005 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7006 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7007 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7008 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7009 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7010 (traceframe_read_count, traceframe_write_count)
7011 (traceframes_created, trace_state_variables, get_raw_reg)
7012 (get_trace_state_variable_value, set_trace_state_variable_value)
7013 (ust_loaded, helper_thread_id, cmd_buf): Use
7014 IPA_SYM_EXPORTED_NAME.
7015 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7016 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7017 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7018 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7019 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7020 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7021 EXTERN_C_PUSH/EXTERN_C_POP.
7022 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7023 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7024 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7025 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7026 (traceframe_write_count, traceframe_read_count)
7027 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7028 (about_to_request_buffer_space, get_trace_state_variable_value)
7029 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7030 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7031 EXTERN_C_PUSH/EXTERN_C_POP.
7032 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7033 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7034 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7035 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7036 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7037 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7038 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7039 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7041 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7042 (IP_AGENT_EXPORT_VAR_DECL): Define.
7044 (gdb_agent_get_raw_reg): Declare.
7046 2015-02-27 Tom Tromey <tromey@redhat.com>
7047 Pedro Alves <palves@redhat.com>
7049 Rename symbols whose names are reserved C++ keywords throughout.
7051 2015-02-27 Pedro Alves <palves@redhat.com>
7053 * Makefile.in (COMPILER): New, get it from autoconf.
7054 (CXX): Get from autoconf instead.
7055 (COMPILE.pre): Use COMPILER.
7056 (CC-LD): Rename to ...
7057 (CC_LD): ... this. Use COMPILER.
7058 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7059 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7060 * acinclude.m4: Include build-with-cxx.m4.
7061 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7062 Disable -Werror by default if building in C++ mode.
7063 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7064 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7065 the C++ compiler. Save/restore CXXFLAGS too.
7066 * configure: Regenerate.
7068 2015-02-27 Pedro Alves <palves@redhat.com>
7070 * acinclude.m4: Include libiberty.m4.
7071 * configure.ac: Call libiberty_INIT.
7072 * config.in, configure: Regenerate.
7074 2015-02-26 Pedro Alves <palves@redhat.com>
7076 * linux-low.c (linux_wait_1): When incrementing the PC past a
7077 program breakpoint always use the_low_target.breakpoint_len as
7078 increment, rather than the maximum between that and
7079 the_low_target.decr_pc_after_break.
7081 2015-02-23 Pedro Alves <palves@redhat.com>
7083 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7084 thread was doing a step-over; always adjust the PC if
7085 we stepped over a permanent breakpoint.
7086 (linux_wait_1): If we stepped over breakpoint that was on top of a
7087 permanent breakpoint, manually advance the PC past it.
7089 2015-02-23 Pedro Alves <palves@redhat.com>
7091 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7093 (x86_fill_gregset, x86_store_gregset): Use it when handling
7096 2015-02-20 Pedro Alves <palves@redhat.com>
7098 * thread-db.c: Include "nat/linux-procfs.h".
7099 (thread_db_init): Skip listing new threads if the kernel supports
7100 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7102 2015-02-20 Pedro Alves <palves@redhat.com>
7104 * linux-low.c (status_pending_p_callback): Use ptid_match.
7106 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7108 PR breakpoints/16812
7109 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7110 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7111 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7113 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7115 PR breakpoints/15956
7116 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7118 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7120 * linux-low.c (linux_low_btrace_conf): Print size.
7121 * server.c (handle_btrace_conf_general_set): New.
7122 (hanle_general_set): Call handle_btrace_conf_general_set.
7123 (handle_query): Report Qbtrace-conf:bts:size as supported.
7125 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7127 * linux-low.c (linux_low_enable_btrace): Update parameters.
7128 (linux_low_btrace_conf): New.
7129 (linux_target_ops)<to_btrace_conf>: Initialize.
7130 * server.c (current_btrace_conf): New.
7131 (handle_btrace_enable): Rename to ...
7132 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7133 to target_enable_btrace. Update comment. Update users.
7134 (handle_qxfer_btrace_conf): New.
7135 (qxfer_packets): Add btrace-conf entry.
7136 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7137 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7138 (target_ops)<read_btrace_conf>: New.
7139 (target_enable_btrace): Update parameters.
7140 (target_read_btrace_conf): New.
7142 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7144 * server.c (handle_btrace_general_set): Remove call to
7145 target_supports_btrace.
7146 (supported_btrace_packets): New.
7147 (handle_query): Call supported_btrace_packets.
7148 * target.h: include btrace-common.h.
7149 (btrace_target_info): Removed.
7150 (supports_btrace, target_supports_btrace): Update parameters.
7152 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7154 * Makefile.in (SFILES): Add common/btrace-common.c.
7155 (OBS): Add common/btrace-common.o.
7156 (btrace-common.o): Add build rules.
7157 * linux-low: Include btrace-common.h.
7158 (linux_low_read_btrace): Use struct btrace_data. Call
7159 btrace_data_init and btrace_data_fini.
7161 2015-02-06 Pedro Alves <palves@redhat.com>
7163 * thread-db.c (find_new_threads_callback): Add debug output.
7165 2015-02-04 Pedro Alves <palves@redhat.com>
7167 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7168 (resume_stopped_resumed_lwps): New function.
7169 (linux_wait_for_event_filtered): Use it.
7171 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7173 * Makefile.in (SFILES): Add linux-personality.c.
7174 (linux-personality.o): New rule.
7175 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7176 list of objects to be built.
7177 * linux-low.c: Include nat/linux-personality.h.
7178 (linux_create_inferior): Remove code to disable address space
7179 randomization (moved to ../nat/linux-personality.c). Create
7180 cleanup to disable address space randomization.
7182 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7184 * Makefile.in (posix-strerror.o): New rule.
7185 (mingw-strerror.o): Likewise.
7186 * configure: Regenerated.
7187 * configure.ac: Source file ../common/common.host. Initialize new
7188 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7190 2015-01-14 Yao Qi <yao@codesourcery.com>
7192 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7193 (ppc-linux.o): New rule.
7194 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7195 * configure.ac: AC_CHECK_FUNCS(getauxval).
7196 * config.in: Re-generated.
7197 * configure: Re-generated.
7198 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7199 ppc64_64bit_inferior_p
7201 2015-01-14 Yao Qi <yao@codesourcery.com>
7203 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7204 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7205 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7206 (PT_ORIG_R3, PT_TRAP): Likewise.
7207 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7208 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7209 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7211 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7213 * i387-fp.c (i387_cache_to_xsave): In look over
7214 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7215 zmmh_low_space field by use of zmmh_high_space.
7217 2015-01-09 Pedro Alves <palves@redhat.com>
7219 * linux-low.c (step_over_bkpt): Move higher up in the file.
7220 (handle_extended_wait): Don't store the stop_pc here.
7221 (get_stop_pc): Adjust comments and rename to ...
7222 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7223 stopped for a software breakpoint or hardware breakpoint.
7224 (thread_still_has_status_pending_p): New function.
7225 (status_pending_p_callback): Use
7226 thread_still_has_status_pending_p. If the event is no longer
7227 interesting, resume the LWP.
7228 (handle_tracepoints): Add assert.
7229 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7230 (wstatus_maybe_breakpoint): New function.
7231 (cancel_breakpoint): Delete function.
7232 (check_stopped_by_watchpoint): New function, factored out from
7233 linux_low_filter_event.
7234 (lp_status_maybe_breakpoint): Delete function.
7235 (linux_low_filter_event): Remove filter_ptid argument.
7236 Leave thread group exits pending here. Store the LWP's stop PC.
7237 Always leave events pending.
7238 (linux_wait_for_event_filtered): Pull all events out of the
7239 kernel, and leave them all pending.
7240 (count_events_callback, select_event_lwp_callback): Consider all
7242 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7243 (select_event_lwp): Only give preference to the stepping LWP in
7244 all-stop mode. Adjust comments.
7245 (ignore_event): New function.
7246 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7247 references to cancel_breakpoints. Adjust to renames. Also give
7248 equal priority to all LWPs that have had events in non-stop mode.
7249 If reporting a software breakpoint event, unadjust the LWP's PC.
7250 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7251 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7253 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7254 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7255 (linux_stopped_by_watchpoint): Adjust.
7256 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7257 * linux-low.h (enum lwp_stop_reason): New.
7258 (struct lwp_info) <stop_pc>: Adjust comment.
7259 <stopped_by_watchpoint>: Delete field.
7260 <stop_reason>: New field.
7261 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7262 * mem-break.c (software_breakpoint_inserted_here)
7263 (hardware_breakpoint_inserted_here): New function.
7264 * mem-break.h (software_breakpoint_inserted_here)
7265 (hardware_breakpoint_inserted_here): Declare.
7266 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7267 (cancel_breakpoints): Delete.
7268 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7269 (upload_fast_traceframes): Remove references to
7272 2015-01-09 Pedro Alves <palves@redhat.com>
7274 * thread-db.c (find_new_threads_callback): Ignore thread if the
7275 kernel thread ID is -1.
7277 2015-01-09 Pedro Alves <palves@redhat.com>
7279 * linux-low.c (linux_attach_fail_reason_string): Move to
7280 nat/linux-ptrace.c, and rename.
7281 (linux_attach_lwp): Update comment.
7282 (attach_proc_task_lwp_callback): New function.
7283 (linux_attach): Adjust to rename and use
7284 linux_proc_attach_tgid_threads.
7285 (linux_attach_fail_reason_string): Delete declaration.
7287 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7289 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7290 * server.c (gdbserver_version): Likewise.
7292 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7294 * remote-utils.c: Include ctype.h.
7295 (input_interrupt): Explicitly handle the case when the char
7296 received is the NUL byte. Improve the printing of non-ASCII
7299 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7301 * linux-low.c (linux_low_filter_event): Update call to
7302 linux_enable_event_reporting following the addition of
7303 a new parameter to that function.
7305 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7308 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7309 (AARCH64_FPCR_REGNO): Likewise.
7310 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7311 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7312 (aarch64_store_fpregset): Likewise.
7314 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7316 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7317 Remove FIXME comment about assumption about N.
7319 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7321 * configure.ac: If large-file support is disabled in GDBserver,
7322 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7323 * configure: Regenerate.
7325 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7327 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7328 warning upon ENODATA from ptrace.
7329 * linux-s390-low.c (s390_store_tdb): New.
7330 (s390_regsets): Add regset for NT_S390_TDB.
7332 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7334 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7335 without a fill_function.
7336 * linux-s390-low.c (s390_fill_last_break): Remove.
7337 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7338 (s390_arch_setup): Use regset's size instead of fill_function for
7341 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7343 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7344 the regset's store function when ptrace returned an error.
7345 * regcache.c (get_thread_regcache): Invalidate register cache
7346 before fetching inferior's registers.
7348 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7350 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7351 while-loop as for-loop.
7352 (regsets_store_inferior_registers): Likewise.
7354 2014-11-28 Yao Qi <yao@codesourcery.com>
7356 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7357 * config.in, configure: Re-generate.
7358 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7361 2014-11-21 Yao Qi <yao@codesourcery.com>
7363 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7364 (AC_CHECK_HEADERS): Remove malloc.h.
7365 * configure: Re-generated.
7366 * config.in: Re-generated.
7367 * server.h: Don't include alloca.h and malloc.h.
7368 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7369 Don't include malloc.h.
7371 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7373 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7374 corresponding ERRNO check in same block.
7376 2014-11-12 Pedro Alves <palves@redhat.com>
7378 * server.c (cont_thread): Update comment.
7379 (start_inferior, attach_inferior): No longer clear cont_thread.
7380 (handle_v_cont): No longer set cont_thread.
7381 (captured_main): Clear cont_thread each time a GDB connects.
7383 2014-11-12 Pedro Alves <palves@redhat.com>
7385 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7386 thread, and don't resume all threads if the Hc thread has exited.
7388 2014-11-12 Pedro Alves <palves@redhat.com>
7390 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7391 the process group instead of to a specific LWP.
7393 2014-10-15 Pedro Alves <palves@redhat.com>
7396 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7398 (arm_set_thread_context): Delete.
7399 (the_low_target): Adjust.
7400 * win32-i386-low.c (debug_registers_changed)
7401 (debug_registers_used): Delete.
7402 (update_debug_registers_callback): New function.
7403 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7404 needing to update their debug registers.
7405 (win32_get_current_dr): New function.
7406 (x86_dr_low_get_addr, x86_dr_low_get_control)
7407 (x86_dr_low_get_status): Fetch the debug register from the thread
7409 (i386_initial_stuff): Adjust.
7410 (i386_get_thread_context): Remove current_event parameter. Don't
7411 clear debug_registers_changed nor copy DR values to
7413 (i386_set_thread_context): Delete.
7414 (i386_prepare_to_resume): New function.
7415 (i386_thread_added): Mark the thread as needing to update irs
7417 (the_low_target): Remove i386_set_thread_context and install
7418 i386_prepare_to_resume.
7419 * win32-low.c (win32_get_thread_context): Adjust.
7420 (win32_set_thread_context): Use SetThreadContext
7422 (win32_prepare_to_resume): New function.
7423 (win32_require_context): New function, factored out from ...
7424 (thread_rec): ... this.
7425 (continue_one_thread): Call win32_prepare_to_resume on each thread
7426 we're about to continue.
7427 (win32_resume): Call win32_prepare_to_resume on the event thread.
7428 * win32-low.h (struct win32_thread_info)
7429 <debug_registers_changed>: New field.
7430 (struct win32_target_ops): Change prototype of set_thread_context,
7431 delete set_thread_context and add prepare_to_resume.
7432 (win32_require_context): New declaration.
7434 2014-10-08 Gary Benson <gbenson@redhat.com>
7436 * server.h: Do not include common-exceptions.h.
7438 2014-10-08 Gary Benson <gbenson@redhat.com>
7440 * server.h: Do not include cleanups.h.
7442 2014-09-30 James Hogan <james.hogan@imgtec.com>
7444 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7447 2014-09-23 Yao Qi <yao@codesourcery.com>
7449 * linux-low.c (lp_status_maybe_breakpoint): New function.
7450 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7451 (count_events_callback): Likewise.
7452 (select_event_lwp_callback): Likewise.
7453 (cancel_breakpoints_callback): Likewise.
7455 2014-09-19 Don Breazeal <donb@codesourcery.com>
7457 * linux-low.c (handle_extended_wait): Call
7458 linux_ptrace_get_extended_event.
7459 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7460 linux_is_extended_waitstatus.
7462 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7464 * Makefile.in (CPPFLAGS): Define.
7465 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7466 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7468 2014-09-16 Gary Benson <gbenson@redhat.com>
7470 * inferiors.h (current_inferior): Renamed as...
7471 (current_thread): New variable. All uses updated.
7472 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7473 (maybe_move_out_of_jump_pad): Likewise.
7474 (cancel_breakpoint): Likewise.
7475 (linux_low_filter_event): Likewise.
7476 (wait_for_sigstop): Likewise.
7477 (linux_resume_one_lwp): Likewise.
7478 (need_step_over_p): Likewise.
7479 (start_step_over): Likewise.
7480 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7481 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7482 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7483 and save_inferior as saved_thread.
7484 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7486 (regcache_invalidate_thread): Likewise.
7487 * remote-utils.c (prepare_resume_reply): Likewise.
7488 * thread-db.c (thread_db_get_tls_address): Likewise.
7489 (disable_thread_event_reporting): Likewise.
7490 (remove_thread_event_breakpoints): Likewise.
7491 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7493 * target.h (set_desired_inferior): Renamed as...
7494 (set_desired_thread): New declaration. All uses updated.
7495 * server.c (myresume): Updated comment to reference thread instead
7497 (handle_serial_event): Likewise.
7498 (handle_target_event): Likewise.
7500 2014-09-12 Tom Tromey <tromey@redhat.com>
7501 Gary Benson <gbenson@redhat.com>
7503 * regcache.h: Include common-regcache.h.
7504 (regcache_read_pc): Don't declare.
7505 * regcache.c (get_thread_regcache_for_ptid): New function.
7507 2014-09-11 Tom Tromey <tromey@redhat.com>
7508 Gary Benson <gbenson@redhat.com>
7510 * symbol.c: New file.
7511 * Makefile.in (SFILES): Add symbol.c.
7512 (OBS): Add symbol.o.
7514 2014-09-11 Gary Benson <gbenson@redhat.com>
7516 * target.c (target_stop_ptid, target_continue_ptid): New
7519 2014-09-11 Tom Tromey <tromey@redhat.com>
7520 Gary Benson <gbenson@redhat.com>
7522 * target.h: Include target/target.h.
7523 * target.c (target_read_memory, target_read_uint32)
7524 (target_write_memory): New functions.
7526 2014-09-11 Gary Benson <gbenson@redhat.com>
7528 * server.h (debug_hw_points): Don't declare.
7529 * server.c (debug_hw_points): Don't define. Replace all uses
7530 with show_debug_regs.
7531 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7532 all uses with show_debug_regs.
7534 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7536 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7537 endianness into account.
7538 (ppc_supply_ptrace_register): Likewise.
7540 2014-09-03 James Hogan <james.hogan@imgtec.com>
7542 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7543 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7545 2014-09-03 Gary Benson <gbenson@redhat.com>
7547 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7548 ALL_DEBUG_ADDRESS_REGISTERS.
7550 2014-09-02 Gary Benson <gbenson@redhat.com>
7552 * i386-low.h: Renamed as...
7553 * x86-low.h: New file. All type, function and variable name
7554 prefixes changed from "i386_" to "x86_". All references updated.
7555 * i386-low.c: Renamed as...
7556 * x86-low.c: New file. All type, function and variable name
7557 prefixes changed from "i386_" to "x86_". All references updated.
7559 2014-09-02 Gary Benson <gbenson@redhat.com>
7561 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7562 (x86_linux_new_thread): Likewise.
7564 2014-08-29 Gary Benson <gbenson@redhat.com>
7566 * server.h (setjmp.h): Do not include.
7567 (toplevel): Do not declare.
7568 (common-exceptions.h): Include.
7569 (cleanups.h): Likewise.
7570 * server.c (toplevel): Do not define.
7571 (exit_code): New static global.
7572 (detach_or_kill_for_exit_cleanup): New function.
7573 (main): New function. Original main renamed to...
7574 (captured_main): New function.
7575 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7577 2014-08-29 Gary Benson <gbenson@redhat.com>
7579 * Makefile.in (SFILES): Add common/common-exceptions.c.
7580 (OBS): Add common-exceptions.o.
7581 (common-exceptions.o): New rule.
7582 * utils.c (prepare_to_throw_exception): New function.
7584 2014-08-29 Gary Benson <gbenson@redhat.com>
7586 * config.in: Regenerate.
7587 * configure: Likewise.
7589 2014-08-29 Gary Benson <gbenson@redhat.com>
7591 * Makefile.in (SFILES): Add common/cleanups.c.
7593 (cleanups.o): New rule.
7595 2014-08-29 Gary Benson <gbenson@redhat.com>
7597 * utils.c (internal_vwarning): New function.
7599 2014-08-28 Gary Benson <gbenson@redhat.com>
7601 * utils.h (fatal): Remove declaration.
7602 * utils.c (fatal): Remove function.
7604 2014-08-28 Gary Benson <gbenson@redhat.com>
7606 * tracepoint.c (gdb_agent_init): Replace fatal with
7608 (initialize_tracepoint): Likewise.
7610 2014-08-28 Gary Benson <gbenson@redhat.com>
7612 * remote-utils.c (remote_prepare): Replace fatal with error.
7614 2014-08-28 Gary Benson <gbenson@redhat.com>
7616 * linux-low.c (linux_async): Replace fatal with warning.
7618 (linux_start_non_stop): Return -1 if linux_async failed.
7620 2014-08-28 Gary Benson <gbenson@redhat.com>
7622 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7624 (i386_dr_low_get_addr): Remove vague comment.
7625 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7628 2014-08-28 Gary Benson <gbenson@redhat.com>
7630 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7631 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7633 (linux_resume_one_lwp): Likewise.
7634 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7636 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7637 with internal_error.
7638 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7639 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7640 (find_register_by_name): Replace fatal with internal_error.
7641 (find_regno): Likewise.
7642 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7643 * thread-db.c (thread_db_create_event): Likewise.
7644 (thread_db_load_search): Likewise.
7645 (try_thread_db_load_1): Likewise.
7646 * tracepoint.c (get_jump_space_head): Replace fatal with
7648 (claim_trampoline_space): Likewise.
7649 (have_fast_tracepoint_trampoline_buffer): Likewise.
7650 (cmd_qtstart): Likewise.
7651 (stop_tracing): Likewise.
7652 (fast_tracepoint_collecting): Likewise.
7653 (target_malloc): Likewise.
7654 (download_tracepoint): Likewise.
7655 (download_trace_state_variables): Replace check with gdb_assert.
7656 (upload_fast_traceframes): Replace fatal with internal_error.
7658 2014-08-19 Tom Tromey <tromey@redhat.com>
7659 Gary Benson <gbenson@redhat.com>
7661 * Makefile.in (SFILES): Add common/common-debug.c.
7662 (OBS): Add common-debug.o.
7663 (common-debug.o): New rule.
7664 * debug.h (debug_printf): Don't declare.
7665 * debug.c (debug_printf): Renamed and rewritten as...
7666 (debug_vprintf): New function.
7668 2014-08-19 Gary Benson <gbenson@redhat.com>
7670 * utils.h: Do not include print-utils.h.
7672 2014-08-19 Tom Tromey <tromey@redhat.com>
7673 Gary Benson <gbenson@redhat.com>
7675 * server.h: Add static assertion.
7676 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7678 2014-08-19 Tom Tromey <tromey@redhat.com>
7679 Gary Benson <gbenson@redhat.com>
7681 * Makefile.in (SFILES): Add common/errors.c.
7682 (OBS): Add errors.o.
7683 (IPA_OBS): Add errors-ipa.o.
7684 (errors.o): New rule.
7685 (errors-ipa.o): Likewise.
7686 * utils.h (perror_with_name, error, warning): Don't declare.
7687 * utils.c (warning): Renamed and rewritten as...
7688 (vwarning): New function.
7689 (error): Renamed and rewritten as...
7690 (verror): New function.
7691 (internal_error): Renamed and rewritten as...
7692 (internal_verror): New function.
7694 2014-08-07 Gary Benson <gbenson@redhat.com>
7696 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7697 * configure: Regenerate.
7698 * config.in: Likewise.
7699 * server.h: Do not include errno.h.
7700 * event-loop.c: Likewise.
7701 * hostio-errno.c: Likewise.
7702 * linux-low.c: Likewise.
7703 * remote-utils.c: Likewise.
7704 * spu-low.c: Likewise.
7705 * utils.c: Likewise.
7706 * gdbreplay.c: Unconditionally include errno.h.
7708 2014-08-07 Gary Benson <gbenson@redhat.com>
7710 * server.h: Do not include string.h.
7711 * event-loop.c: Likewise.
7712 * linux-low.c: Likewise.
7713 * regcache.c: Likewise.
7714 * remote-utils.c: Likewise.
7715 * spu-low.c: Likewise.
7716 * utils.c: Likewise.
7718 2014-08-07 Gary Benson <gbenson@redhat.com>
7720 * server.h: Do not include gdb_assert.h.
7722 2014-08-07 Gary Benson <gbenson@redhat.com>
7724 * server.h: Do not include common-utils.h.
7726 2014-08-07 Gary Benson <gbenson@redhat.com>
7728 * server.h: Do not include ptid.h.
7729 * notif.h: Likewise.
7731 2014-08-07 Gary Benson <gbenson@redhat.com>
7733 * server.h: Do not include gdb_locale.h.
7735 2014-08-07 Gary Benson <gbenson@redhat.com>
7737 * server.h: Do not include gdb/signals.h.
7738 * win32-low.c: Likewise.
7740 2014-08-07 Gary Benson <gbenson@redhat.com>
7742 * server.h: Do not include pathmax.h.
7744 2014-08-07 Gary Benson <gbenson@redhat.com>
7746 * server.h: Do not include libiberty.h.
7747 * linux-bfin-low.c: Likewise.
7749 2014-08-07 Gary Benson <gbenson@redhat.com>
7751 * server.h: Do not include ansidecl.h.
7753 2014-08-07 Gary Benson <gbenson@redhat.com>
7755 * linux-x86-low.c: Do not include stddef.h.
7756 * lynx-ppc-low.c: Likewise.
7757 * tracepoint.c: Likewise.
7759 2014-08-07 Gary Benson <gbenson@redhat.com>
7761 * server.h: Do not include stdarg.h.
7762 * nto-low.c: Likewise.
7764 2014-08-07 Gary Benson <gbenson@redhat.com>
7766 * server.h: Do not include stdlib.h.
7767 * inferiors.c: Likewise.
7768 * linux-low.c: Likewise.
7769 * regcache.c: Likewise.
7770 * spu-low.c: Likewise.
7771 * tracepoint.c: Likewise.
7772 * utils.c: Likewise.
7774 2014-08-07 Gary Benson <gbenson@redhat.com>
7776 * server.h: Do not include stdio.h.
7777 * linux-low.c: Likewise.
7778 * remote-utils.c: Likewise.
7779 * spu-low.c: Likewise.
7780 * utils.c: Likewise.
7781 * wincecompat.c: Likewise.
7783 2014-08-06 Gary Benson <gbenson@redhat.com>
7785 * regcache.c (init_register_cache): Move conditionals inside if.
7787 2014-08-06 Gary Benson <gbenson@redhat.com>
7789 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7791 2014-07-31 Gary Benson <gbenson@redhat.com>
7793 * ax.h: Do not include server.h.
7794 * gdbthread.h: Likewise.
7795 * lynx-low.h: Likewise.
7796 * notif.h: Likewise.
7798 2014-07-30 Gary Benson <gbenson@redhat.com>
7800 * server.h: Include common-defs.h.
7801 Do not include config.h or build-gnulib-gdbserver/config.h.
7803 2014-07-30 Gary Benson <gbenson@redhat.com>
7805 * hostio-errno.c: Move server.h to top of includes list.
7806 * inferiors.c: Likewise.
7807 * linux-x86-low.c: Likewise.
7808 * notif.c: Include server.h.
7810 2014-07-24 Tom Tromey <tromey@redhat.com>
7811 Gary Benson <gbenson@redhat.com>
7813 * server.h (CORE_ADDR): Now unsigned.
7815 2014-07-16 Pedro Alves <palves@redhat.com>
7817 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7819 2014-07-15 Pedro Alves <palves@redhat.com>
7821 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7824 2014-07-11 Pedro Alves <palves@redhat.com>
7826 * linux-low.c (kill_wait_lwp): New function, based on
7827 kill_one_lwp_callback, but use my_waitpid directly.
7828 (kill_one_lwp_callback, linux_kill): Use it.
7830 2014-06-23 Pedro Alves <palves@redhat.com>
7832 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7833 before setting DR0..DR3.
7835 2014-06-20 Gary Benson <gbenson@redhat.com>
7837 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7838 * configure: Regenerated.
7839 * config.in: Likewise.
7841 2014-06-20 Gary Benson <gbenson@redhat.com>
7843 * Makefile.in (SFILES): Update locations for files moved
7845 (object file files): Reordered.
7847 2014-06-20 Gary Benson <gbenson@redhat.com>
7849 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7850 (i386_dr_low_set_addr): Likewise.
7851 (i386_dr_low_get_addr): Likewise.
7852 (i386_dr_low_can_set_control): Likewise.
7853 (i386_dr_low_set_control): Likewise.
7854 (i386_dr_low_get_control): Likewise.
7855 (i386_dr_low_get_status): Likewise.
7856 (i386_get_debug_register_length): Likewise.
7857 * linux-x86-low.c (i386_dr_low_set_addr):
7858 Changed signature. Made static.
7859 (i386_dr_low_get_addr): Likewise.
7860 (i386_dr_low_set_control): Likewise.
7861 (i386_dr_low_get_control): Likewise.
7862 (i386_dr_low_get_status): Likewise.
7863 (i386_dr_low): New global variable.
7864 * win32-i386-low.c (i386_dr_low_set_addr):
7865 Changed signature. Made static.
7866 (i386_dr_low_get_addr): Likewise.
7867 (i386_dr_low_set_control): Likewise.
7868 (i386_dr_low_get_control): Likewise.
7869 (i386_dr_low_get_status): Likewise.
7870 (i386_dr_low): New global variable.
7872 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7874 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7875 * Makefile.in (AR, AR_FLAGS): Define.
7876 * configure: Regenerate.
7878 2014-06-19 Gary Benson <gbenson@redhat.com>
7880 * Makefile.in (i386-dregs.o): New rule.
7881 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7882 * i386-low.c (target.h): Remove include.
7883 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7884 (DR_CONTROL_SHIFT): Likewise.
7885 (DR_CONTROL_SIZE): Likewise.
7886 (DR_RW_EXECUTE): Likewise.
7887 (DR_RW_WRITE): Likewise.
7888 (DR_RW_READ): Likewise.
7889 (DR_RW_IORW): Likewise.
7890 (DR_LEN_1): Likewise.
7891 (DR_LEN_2): Likewise.
7892 (DR_LEN_4): Likewise.
7893 (DR_LEN_8): Likewise.
7894 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7895 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7896 (DR_ENABLE_SIZE): Likewise.
7897 (DR_LOCAL_SLOWDOWN): Likewise.
7898 (DR_GLOBAL_SLOWDOWN): Likewise.
7899 (DR_CONTROL_RESERVED): Likewise.
7900 (I386_DR_CONTROL_MASK): Likewise.
7901 (I386_DR_VACANT): Likewise.
7902 (I386_DR_LOCAL_ENABLE): Likewise.
7903 (I386_DR_GLOBAL_ENABLE): Likewise.
7904 (I386_DR_DISABLE): Likewise.
7905 (I386_DR_SET_RW_LEN): Likewise.
7906 (I386_DR_GET_RW_LEN): Likewise.
7907 (I386_DR_WATCH_HIT): Likewise.
7908 (i386_wp_op_t): Likewise.
7909 (i386_show_dr): Likewise.
7910 (i386_length_and_rw_bits): Likewise.
7911 (i386_insert_aligned_watchpoint): Likewise.
7912 (i386_remove_aligned_watchpoint): Likewise.
7913 (i386_handle_nonaligned_watchpoint): Likewise.
7914 i386_update_inferior_debug_regs(): Likewise.
7915 (i386_dr_insert_watchpoint): Likewise.
7916 (i386_dr_remove_watchpoint): Likewise.
7917 (i386_dr_region_ok_for_watchpoint): Likewise.
7918 (i386_dr_stopped_data_address): Likewise.
7919 (i386_dr_stopped_by_watchpoint): Likewise.
7921 2014-06-19 Gary Benson <gbenson@redhat.com>
7923 * i386-low.c (i386_dr_show): Renamed to
7924 i386_show_dr and made static. All uses updated.
7925 (i386_dr_length_and_rw_bits): Renamed to
7926 i386_length_and_rw_bits and made static.
7928 (i386_dr_insert_aligned_watchpoint): Renamed to
7929 i386_insert_aligned_watchpoint and made static.
7931 (i386_dr_remove_aligned_watchpoint): Renamed to
7932 i386_remove_aligned_watchpoint and made static.
7934 (i386_dr_update_inferior_debug_regs): Renamed to
7935 i386_update_inferior_debug_regs and made static.
7938 2014-06-18 Gary Benson <gbenson@redhat.com>
7940 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7941 (i386_dr_low_can_set_control): Likewise.
7942 (i386_get_debug_register_length): Likewise.
7943 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7944 (i386_dr_low_can_set_control): Likewise.
7945 (i386_get_debug_register_length): Likewise.
7947 2014-06-17 Gary Benson <gbenson@redhat.com>
7949 * i386-low.h (i386-dregs.h): New include.
7950 (DR_FIRSTADDR): Now in i386-dregs.h.
7951 (DR_LASTADDR): Likewise.
7952 (DR_NADDR): Likewise.
7953 (DR_STATUS): Likewise.
7954 (DR_CONTROL): Likewise.
7955 (i386_debug_reg_state): Likewise.
7956 (i386_dr_insert_watchpoint): Likewise.
7957 (i386_dr_remove_watchpoint): Likewise.
7958 (i386_dr_region_ok_for_watchpoint): Likewise.
7959 (i386_dr_stopped_data_address): Likewise.
7960 (i386_dr_stopped_by_watchpoint): Likewise.
7961 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7963 2014-06-18 Gary Benson <gbenson@redhat.com>
7965 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7966 i386_dr_insert_watchpoint.
7967 (i386_low_remove_watchpoint): Renamed to
7968 i386_dr_remove_watchpoint.
7969 (i386_low_region_ok_for_watchpoint): Renamed to
7970 i386_dr_region_ok_for_watchpoint.
7971 (i386_low_stopped_data_address): Renamed to
7972 i386_dr_stopped_data_address.
7973 (i386_low_stopped_by_watchpoint): Renamed to
7974 i386_dr_stopped_by_watchpoint.
7975 * i386-low.c (i386_show_dr): Renamed to
7976 i386_dr_show and made nonstatic. All uses updated.
7977 (i386_length_and_rw_bits): Renamed to
7978 i386_dr_length_and_rw_bits and made nonstatic.
7980 (i386_insert_aligned_watchpoint): Renamed to
7981 i386_dr_insert_aligned_watchpoint and made nonstatic.
7983 (i386_remove_aligned_watchpoint): Renamed to
7984 i386_dr_remove_aligned_watchpoint and made nonstatic.
7986 (i386_update_inferior_debug_regs): Renamed to
7987 i386_dr_update_inferior_debug_regs and made nonstatic.
7989 (i386_low_insert_watchpoint): Renamed to
7990 i386_dr_insert_watchpoint. All uses updated.
7991 (i386_low_remove_watchpoint): Renamed to
7992 i386_dr_remove_watchpoint. All uses updated.
7993 (i386_low_region_ok_for_watchpoint): Renamed to
7994 i386_dr_region_ok_for_watchpoint. All uses updated.
7995 (i386_low_stopped_data_address): Renamed to
7996 i386_dr_stopped_data_address. All uses updated.
7997 (i386_low_stopped_by_watchpoint): Renamed to
7998 i386_dr_stopped_by_watchpoint. All uses updated.
8000 2014-06-18 Gary Benson <gbenson@redhat.com>
8002 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8003 (i386_dr_low_can_set_control): Likewise.
8004 (i386_insert_aligned_watchpoint): New check.
8006 2014-06-18 Gary Benson <gbenson@redhat.com>
8008 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8011 2014-06-18 Gary Benson <gbenson@redhat.com>
8013 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8014 instead of fatal and error.
8015 (i386_handle_nonaligned_watchpoint): Likewise.
8017 2014-06-18 Gary Benson <gbenson@redhat.com>
8019 * i386-low.c (i386_get_debug_register_length): New macro.
8020 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8021 (i386_show_dr): Use debug_printf instead of fprintf. Use
8022 phex to format values.
8024 2014-06-18 Gary Benson <gbenson@redhat.com>
8026 * i386-low.h: Comment changes.
8027 * i386-low.c: Likewise.
8029 2014-06-18 Gary Benson <gbenson@redhat.com>
8031 * i386-low.c: Whitespace changes.
8033 2014-06-12 Tom Tromey <tromey@redhat.com>
8035 * utils.c (freeargv): Remove.
8037 2014-06-12 Tom Tromey <tromey@redhat.com>
8039 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8040 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8041 (parse_debug_format_options): Likewise.
8042 (gdbserver_usage): Likewise.
8043 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8044 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8045 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8047 ($(LIBGNU)): Depend on libiberty.
8048 (all-lib): Recurse into all subdirs.
8049 (install-only): Invoke "install" target in subdirs.
8050 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8052 * configure: Rebuild.
8053 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8054 for vasprintf, vsnprintf, or gettimeofday.
8055 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8058 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8060 * development.sh: Delete.
8061 * Makefile.in (config.status): Adjust dependency on development.sh.
8062 * configure.ac: Adjust development.sh source call.
8063 * configure: Regenerate.
8065 2014-06-02 Pedro Alves <palves@redhat.com>
8067 * ax.c (gdb_free_agent_expr): New function.
8068 * ax.h (gdb_free_agent_expr): New declaration.
8069 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8071 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8073 (clear_breakpoint_conditions_and_commands): New function.
8074 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8075 (clear_breakpoint_conditions_and_commands): New declaration.
8077 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8079 * linux-aarch64-low.c (asm/ptrace.h): Include.
8081 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8083 Fix TLS access for -static -pthread.
8084 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8085 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8086 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8088 2014-05-20 Pedro Alves <palves@redhat.com>
8090 * linux-aarch64-low.c (aarch64_insert_point)
8091 (aarch64_remove_point): No longer check whether the type is
8092 supported here. Adjust to new interface.
8093 (the_low_target): Install aarch64_supports_z_point_type as
8094 supports_z_point_type method.
8095 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8096 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8097 instead of a Z packet char. Adjust.
8098 (arm_supports_z_point_type): New function.
8099 (arm_insert_point, arm_remove_point): Adjust to new interface.
8100 (the_low_target): Install arm_supports_z_point_type.
8101 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8102 (cris_insert_point, cris_remove_point): Adjust to new interface.
8103 Don't check whether the type is supported here.
8104 (the_low_target): Install cris_supports_z_point_type.
8105 * linux-low.c (linux_supports_z_point_type): New function.
8106 (linux_insert_point, linux_remove_point): Adjust to new interface.
8107 * linux-low.h (struct linux_target_ops) <insert_point,
8108 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8109 raw_breakpoint pointer parameter.
8110 <supports_z_point_type>: New method.
8111 * linux-mips-low.c (mips_supports_z_point_type): New function.
8112 (mips_insert_point, mips_remove_point): Adjust to new interface.
8113 Use mips_supports_z_point_type.
8114 (the_low_target): Install mips_supports_z_point_type.
8115 * linux-ppc-low.c (the_low_target): Install NULL as
8116 supports_z_point_type method.
8117 * linux-s390-low.c (the_low_target): Install NULL as
8118 supports_z_point_type method.
8119 * linux-sparc-low.c (the_low_target): Install NULL as
8120 supports_z_point_type method.
8121 * linux-x86-low.c (x86_supports_z_point_type): New function.
8122 (x86_insert_point): Adjust to new insert_point interface. Use
8123 insert_memory_breakpoint. Adjust to new
8124 i386_low_insert_watchpoint interface.
8125 (x86_remove_point): Adjust to remove_point interface. Use
8126 remove_memory_breakpoint. Adjust to new
8127 i386_low_remove_watchpoint interface.
8128 (the_low_target): Install x86_supports_z_point_type.
8129 * lynx-low.c (lynx_target_ops): Install NULL as
8130 supports_z_point_type callback.
8131 * nto-low.c (nto_supports_z_point_type): New.
8132 (nto_insert_point, nto_remove_point): Adjust to new interface.
8133 (nto_target_ops): Install nto_supports_z_point_type.
8134 * mem-break.c: Adjust intro comment.
8135 (struct raw_breakpoint) <raw_type, size>: New fields.
8136 <inserted>: Update comment.
8137 <shlib_disabled>: Delete field.
8138 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8139 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8140 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8141 (raw_bkpt_type_to_target_hw_bp_type): New function.
8142 (find_enabled_raw_code_breakpoint_at): New function.
8143 (find_raw_breakpoint_at): New type and size parameters. Use them.
8144 (insert_memory_breakpoint): New function, based off
8145 set_raw_breakpoint_at.
8146 (remove_memory_breakpoint): New function.
8147 (set_raw_breakpoint_at): Reimplement.
8148 (set_breakpoint): New, based on set_breakpoint_at.
8149 (set_breakpoint_at): Reimplement.
8150 (delete_raw_breakpoint): Go through the_target->remove_point
8151 instead of assuming memory breakpoints.
8152 (find_gdb_breakpoint_at): Delete.
8153 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8154 (find_gdb_breakpoint): New function.
8155 (set_gdb_breakpoint_at): Delete.
8156 (z_type_supported): New function.
8157 (set_gdb_breakpoint_1): New function, loosely based off
8158 set_gdb_breakpoint_at.
8159 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8160 (delete_gdb_breakpoint_at): Delete.
8161 (delete_gdb_breakpoint_1): New function, loosely based off
8162 delete_gdb_breakpoint_at.
8163 (delete_gdb_breakpoint): New function.
8164 (clear_gdb_breakpoint_conditions): Rename to ...
8165 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8167 (add_condition_to_breakpoint): Make static.
8168 (add_breakpoint_condition): Take a struct breakpoint pointer
8169 instead of an address. Adjust.
8170 (gdb_condition_true_at_breakpoint): Rename to ...
8171 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8173 (gdb_condition_true_at_breakpoint): Reimplement.
8174 (add_breakpoint_commands): Take a struct breakpoint pointer
8175 instead of an address. Adjust.
8176 (gdb_no_commands_at_breakpoint): Rename to ...
8177 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8178 parameter. Return true if no breakpoint was found. Change debug
8180 (gdb_no_commands_at_breakpoint): Reimplement.
8181 (run_breakpoint_commands): Rename to ...
8182 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8183 and change return type to boolean.
8184 (run_breakpoint_commands): New function.
8185 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8186 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8187 breakpoint. Go through the_target->remove_point instead of
8188 assuming memory breakpoint.
8189 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8190 software and hardware breakpoints.
8191 (reinsert_raw_breakpoint): Go through the_target->insert_point
8192 instead of assuming memory breakpoint.
8193 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8194 software and hardware breakpoints.
8195 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8196 Check both software and hardware breakpoints.
8197 (validate_inserted_breakpoint): Assert the breakpoint is a
8198 software breakpoint. Set the inserted flag to -1 instead of
8199 setting shlib_disabled.
8200 (delete_disabled_breakpoints): Adjust.
8201 (validate_breakpoints): Only validate software breakpoints.
8202 Adjust to inserted flag change.
8203 (check_mem_read, check_mem_write): Skip breakpoint types other
8204 than software breakpoints. Adjust to inserted flag change.
8205 * mem-break.h (enum raw_bkpt_type): New enum.
8206 (raw_breakpoint, struct process_info): Forward declare.
8207 (Z_packet_to_target_hw_bp_type): Delete declaration.
8208 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8209 (set_gdb_breakpoint, delete_gdb_breakpoint)
8210 (clear_breakpoint_conditions): New declarations.
8211 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8212 (breakpoint_inserted_here): Update comment.
8213 (add_breakpoint_condition, add_breakpoint_commands): Replace
8214 address parameter with a breakpoint pointer parameter.
8215 (gdb_breakpoint_here): Update comment.
8216 (delete_gdb_breakpoint_at): Delete.
8217 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8218 * server.c (process_point_options): Take a struct breakpoint
8219 pointer instead of an address. Adjust.
8220 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8221 delete_gdb_breakpoint.
8222 * spu-low.c (spu_target_ops): Install NULL as
8223 supports_z_point_type method.
8224 * target.h: Include mem-break.h.
8225 (struct target_ops) <prepare_to_access_memory>: Update comment.
8226 <supports_z_point_type>: New field.
8227 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8228 instead of a char. Also take a raw breakpoint pointer.
8229 * win32-arm-low.c (the_low_target): Install NULL as
8230 supports_z_point_type.
8231 * win32-i386-low.c (i386_supports_z_point_type): New function.
8232 (i386_insert_point, i386_remove_point): Adjust to new interface.
8233 (the_low_target): Install i386_supports_z_point_type.
8234 * win32-low.c (win32_supports_z_point_type): New function.
8235 (win32_insert_point, win32_remove_point): Adjust to new interface.
8236 (win32_target_ops): Install win32_supports_z_point_type.
8237 * win32-low.h (struct win32_target_ops):
8238 <supports_z_point_type>: New method.
8239 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8240 instead of a char. Also take a raw breakpoint pointer.
8242 2014-05-20 Pedro Alves <palves@redhat.com>
8244 * mem-break.h: Include break-common.h.
8245 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8246 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8247 (Z_packet_to_target_hw_bp_type): New declaration.
8248 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8249 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8250 (Z_PACKET_ACCESS_WP): Delete macros.
8251 (Z_packet_to_hw_type): Delete function.
8252 * i386-low.h: Don't include break-common.h here.
8253 (Z_packet_to_hw_type): Delete declaration.
8254 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8255 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8256 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8257 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8258 * linux-aarch64-low.c: Don't include break-common.h here.
8259 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8260 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8261 (Z_packet_to_target_hw_bp_type): Delete function.
8262 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8264 (mips_insert_point, mips_remove_point): Use
8265 Z_packet_to_target_hw_bp_type.
8267 2014-05-20 Pedro Alves <palves@redhat.com>
8269 * linux-aarch64-low.c: Include break-common.h.
8270 (enum target_point_type): Delete.
8271 (Z_packet_to_point_type): Rename to ...
8272 (Z_packet_to_target_hw_bp_type): ... this, and return a
8273 target_hw_bp_type instead.
8274 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8275 instead of an enum target_point_type.
8276 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8278 (aarch64_dr_state_insert_one_point)
8279 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8280 (aarch64_handle_aligned_watchpoint)
8281 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8282 Take an enum target_hw_bp_type instead of an enum
8284 (aarch64_supports_z_point_type): New function.
8285 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8286 use Z_packet_to_target_hw_bp_type.
8288 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8290 * configure.ac: Only use -Werror by default when DEVELOPMENT
8292 * configure: Regenerate.
8294 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8296 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8297 * linux-x86-low.c (X86_64_USER_REGS): New.
8298 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8300 2014-04-28 Yao Qi <yao@codesourcery.com>
8302 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8305 2014-04-25 Pedro Alves <palves@redhat.com>
8308 * linux-low.c (linux_attach_fail_reason_string): New function.
8309 (linux_attach_lwp): Delete.
8310 (linux_attach_lwp_1): Rename to ...
8311 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8312 argument. Remove "initial" parameter. Return int instead of
8313 void. Don't error or warn here.
8314 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8315 failure to attach to the tgid. Call warning when failing to
8317 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8318 argument. Remove "initial" parameter. Return int instead of
8319 void. Don't error or warn here.
8320 (linux_attach_fail_reason_string): New declaration.
8321 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8322 interface change. Use linux_attach_fail_reason_string.
8324 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8325 Walfred Tedeschi <walfred.tedeschi@intel.com>
8327 * Makefile.in: Added rules to handle new files
8328 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8329 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8330 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8331 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8332 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8333 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8335 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8336 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8337 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8338 i386/x32-avx512.xml.
8339 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8340 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8341 i386/x32-avx512-linux.xml.
8342 * i387-fp.c (num_avx512_k_registers): New constant for number
8344 (num_avx512_zmmh_low_registers): New constant for number of
8345 lower ZMM registers (0-15).
8346 (num_avx512_zmmh_high_registers): New constant for number of
8347 higher ZMM registers (16-31).
8348 (num_avx512_ymmh_registers): New contant for number of higher
8349 YMM registers (ymm16-31 added by avx521 on x86_64).
8350 (num_avx512_xmm_registers): New constant for number of higher
8351 XMM registers (xmm16-31 added by AVX512 on x86_64).
8352 (struct i387_xsave): Add space for AVX512 registers.
8353 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8354 Add code to handle AVX512 registers.
8355 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8356 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8357 prototypei from generated file.
8358 (tdesc_amd64_avx512_linux): Likewise.
8359 (init_registers_x32_avx512_linux): Likewise.
8360 (tdesc_x32_avx512_linux): Likewise.
8361 (init_registers_i386_avx512_linux): Likewise.
8362 (tdesc_i386_avx512_linux): Likewise.
8363 (x86_64_regmap): Add AVX512 registers.
8364 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8366 (initialize_low_arch): Add code to initialize AVX512 registers.
8368 2014-04-23 Pedro Alves <palves@redhat.com>
8370 * mem-break.c (find_gdb_breakpoint_at): Make static.
8371 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8373 2014-04-23 Pedro Alves <palves@redhat.com>
8375 * i386-low.c: Don't include break-common.h here.
8376 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8377 prototype to take target_hw_bp_type as argument instead of a Z
8379 * i386-low.h: Include break-common.h here.
8380 (Z_packet_to_hw_type): Declare.
8381 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8383 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8384 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8385 (x86_remove_point): Convert the packet number to a
8386 target_hw_bp_type before calling i386_low_remove_watchpoint.
8387 * win32-i386-low.c (i386_insert_point): Convert the packet number
8388 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8389 (i386_remove_point): Convert the packet number to a
8390 target_hw_bp_type before calling i386_low_remove_watchpoint.
8392 2014-04-23 Pedro Alves <palves@redhat.com>
8394 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8396 2014-04-10 Pedro Alves <palves@redhat.com>
8398 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8399 Check if the condition or command is NULL before checking if the
8400 breakpoint is known. On success, return true.
8401 * mem-break.h (add_breakpoint_condition): Document return.
8402 (add_breakpoint_commands): Add describing comment.
8403 * server.c (skip_to_semicolon): New function.
8404 (process_point_options): Use it.
8406 2014-04-09 Pedro Alves <palves@redhat.com>
8408 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8411 2014-02-27 Pedro Alves <palves@redhat.com>
8414 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8416 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8418 (last_thread_of_process_p): Take a PID argument instead of a
8420 (linux_wait_for_lwp): Delete.
8421 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8423 (linux_low_filter_event): New function, party factored out from
8424 linux_wait_for_event.
8425 (linux_wait_for_event): Rename to ...
8426 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8427 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8428 sigsuspend. Check for zombie leaders.
8429 (linux_wait_for_event): Reimplement as wrapper around
8430 linux_wait_for_event_filtered.
8431 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8432 a normal or signal exit is seen, it's the whole process exiting.
8433 (wait_for_sigstop): No longer a for_each_inferior callback.
8434 Rewrite on top of linux_wait_for_event_filtered.
8435 (stop_all_lwps): Call wait_for_sigstop directly.
8436 * server.c (resume, handle_target_event): Handle
8437 TARGET_WAITKIND_NO_RESUMED.
8439 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8441 * win32-low.c (psapi_get_dll_name,
8442 * win32_CreateToolhelp32Snapshot): Delete.
8443 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8444 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8446 (handle_load_dll): Add function description.
8447 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8449 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8451 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8453 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8454 base address when calling win32_add_one_solib.
8455 (handle_load_dll): Delete local variable load_addr.
8456 Remove 0x1000 offset applied to DLL base address when calling
8457 win32_add_one_solib.
8458 (handle_unload_dll): Add comment.
8460 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8462 * win32-low.c (win32_add_all_dlls): Renames
8463 win32_ensure_ntdll_loaded. Rewrite function documentation.
8464 Adjust implementation to always load all DLLs.
8465 Add 0x1000 offset to DLL base address when calling
8466 win32_add_one_solib.
8467 (child_initialization_done): New static global.
8468 (do_initial_child_stuff): Set child_initialization_done to
8469 zero during child initialization, and 1 after. Replace call
8470 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8472 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8473 (handle_unload_dll): Add function documentation.
8474 (get_child_debug_event): Ignore load and unload DLL events
8475 during child initialization.
8477 2014-02-20 Doug Evans <dje@google.com>
8479 Remove global all_lwps.
8480 * inferiors.h (ptid_of): Move here from linux-low.h.
8481 (pid_of, lwpid_of): Ditto.
8482 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8483 parameter is a struct thread_info * now.
8484 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8485 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8486 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8488 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8489 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8490 * linux-arm-low.c (update_registers_callback): Update, "entry"
8491 parameter is a struct thread_info * now.
8492 Fetch lwpid from current_inferior directly.
8493 (arm_insert_point): Pass &all_threads to find_inferior instead of
8495 (arm_remove_point): Ditto.
8496 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8497 (arm_prepare_to_resume): Fetch pid from thread.
8498 (arm_read_description): Fetch lwpid from current_inferior directly.
8499 * linux-low.c (all_lwps): Delete.
8500 (delete_lwp): Delete call to remove_inferior.
8501 (handle_extended_wait): Fetch lwpid from thread.
8502 (add_lwp): Don't set lwp->entry.id. Remove call to
8503 add_inferior_to_list.
8504 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8505 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8506 (kill_one_lwp_callback): Ditto.
8507 (linux_kill): Don't dereference NULL pointer.
8508 Fetch ptid,lwpid from thread.
8509 (get_detach_signal): Fetch ptid from thread.
8510 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8511 Simplify call to regcache_invalidate_thread.
8512 (delete_lwp_callback): Update, "entry" parameter is a
8513 struct thread_info * now. Fetch pid from thread.
8514 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8515 (status_pending_p_callback): Update, "entry" parameter is a
8516 struct thread_info * now. Fetch ptid from thread.
8517 (find_lwp_pid): Update, "entry" parameter is a
8518 struct thread_info * now.
8519 (linux_wait_for_lwp): Fetch pid from thread.
8520 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8521 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8522 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8523 (dequeue_one_deferred_signal): Ditto.
8524 (cancel_breakpoint): Fetch ptid from current_inferior.
8525 (linux_wait_for_event): Pass &all_threads to find_inferior,
8526 not &all_lwps. Fetch ptid, lwpid from thread.
8527 (count_events_callback): Update, "entry" parameter is a
8528 struct thread_info * now.
8529 (select_singlestep_lwp_callback): Ditto.
8530 (select_event_lwp_callback): Ditto.
8531 (cancel_breakpoints_callback): Ditto.
8532 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8534 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8535 (unsuspend_one_lwp): Update, "entry" parameter is a
8536 struct thread_info * now.
8537 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8539 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8540 Fetch lwpid from thread, not lwp.
8541 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8542 Pass &all_threads to find_inferior, not &all_lwps.
8543 (send_sigstop): Fetch lwpid from thread, not lwp.
8544 (send_sigstop_callback): Update, "entry" parameter is a
8545 struct thread_info * now.
8546 (suspend_and_send_sigstop_callback): Ditto.
8547 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8548 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8549 struct thread_info * now.
8550 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8552 (lwp_running): Update, "entry" parameter is a
8553 struct thread_info * now.
8554 (stop_all_lwps): Fetch ptid from thread.
8555 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8556 (linux_resume_one_lwp): Fetch lwpid from thread.
8557 (linux_set_resume_request): Update, "entry" parameter is a
8558 struct thread_info * now. Fetch pid, lwpid from thread.
8559 (resume_status_pending_p): Update, "entry" parameter is a
8560 struct thread_info * now.
8561 (need_step_over_p): Ditto. Fetch lwpid from thread.
8562 (start_step_over): Fetch lwpid from thread.
8563 (linux_resume_one_thread): Update, "entry" parameter is a
8564 struct thread_info * now. Fetch lwpid from thread.
8565 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8566 (proceed_one_lwp): Update, "entry" parameter is a
8567 struct thread_info * now. Fetch lwpid from thread.
8568 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8569 struct thread_info * now.
8570 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8571 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8572 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8574 (regsets_store_inferior_registers): Ditto.
8575 (fetch_register, store_register): Ditto.
8576 (linux_read_memory, linux_write_memory): Ditto.
8577 (linux_request_interrupt): Ditto.
8578 (linux_read_auxv): Ditto.
8579 (linux_xfer_siginfo): Ditto.
8580 (linux_qxfer_spu): Ditto.
8581 (linux_qxfer_libraries_svr4): Ditto.
8582 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8583 moved to inferiors.h.
8585 (get_thread_lwp): Update.
8586 (struct lwp_info): Delete member "entry". Simplify comment for
8589 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8590 current_inferior directly.
8591 (update_watch_registers_callback): Update, "entry" parameter is a
8592 struct thread_info * now. Fetch pid from thread.
8593 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8594 (mips_insert_point): Fetch lwpid from current_inferior.
8595 Pass &all_threads to find_inferior, not &all_lwps.
8596 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8597 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8599 (mips_stopped_data_address): Ditto.
8600 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8602 * linux-tile-low.c (tile_arch_setup): Ditto.
8603 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8604 (update_debug_registers_callback): Update, "entry" parameter is a
8605 struct thread_info * now. Fetch pid from thread.
8606 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8607 Pass &all_threads to find_inferior, not &all_lwps.
8608 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8609 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8610 Pass &all_threads to find_inferior, not &all_lwps.
8611 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8612 (i386_dr_low_get_status): Ditto.
8613 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8614 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8615 (x86_linux_read_description): Ditto.
8616 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8618 2014-02-20 Doug Evans <dje@google.com>
8620 * inferiors.c (get_first_inferior): Fix buglet.
8622 2014-02-19 Doug Evans <dje@google.com>
8624 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8625 * inferiors.c (add_thread): Change result type to struct thread_info *.
8626 All callers updated.
8627 (add_lwp): Call add_thread here instead of in callers.
8628 All callers updated.
8629 * linux-low.h (get_lwp_thread): Rewrite.
8630 (struct lwp_info): New member "thread".
8632 2014-02-19 Doug Evans <dje@google.com>
8634 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8635 All callers updated.
8637 2014-02-19 Doug Evans <dje@google.com>
8639 * inferiors.c (add_thread): Fix whitespace.
8641 2014-02-19 Doug Evans <dje@google.com>
8643 * dll.c (clear_dlls): Replace accessing list implemention details
8645 * gdbthread.h (get_first_thread): Declare.
8646 * inferiors.c (for_each_inferior_with_data): New function.
8647 (get_first_thread): New function.
8648 (find_thread_ptid): Simplify.
8649 (get_first_inferior): New function.
8650 (clear_list): Delete.
8651 (one_inferior_p): New function.
8652 (clear_inferior_list): New function.
8653 (clear_inferiors): Update.
8654 * inferiors.h (for_each_inferior_with_data): Declare.
8655 (clear_inferior_list): Declare.
8656 (one_inferior_p): Declare.
8657 (get_first_inferior): Declare.
8658 * linux-low.c (linux_wait_for_event): Replace accessing list
8659 implemention details with API function.
8660 * server.c (target_running): Ditto.
8661 (accumulate_file_name_length): New function.
8662 (emit_dll_description): New function.
8663 (handle_qxfer_libraries): Replace accessing list implemention
8664 details with API function.
8665 (handle_qxfer_threads_worker): New function.
8666 (handle_qxfer_threads_proper): Replace accessing list implemention
8667 details with API function.
8668 (handle_query): Ditto.
8669 (visit_actioned_threads_callback_ftype): New typedef.
8670 (visit_actioned_threads_data): New struct.
8671 (visit_actioned_threads): Rewrite to be find_inferior callback.
8672 (resume): Call find_inferior.
8673 (handle_status): Replace accessing list implemention
8674 details with API function.
8675 (process_serial_event): Replace accessing list implemention details
8677 * target.c (set_desired_inferior): Replace accessing list implemention
8678 details with API function.
8679 * tracepoint.c (same_process_p): New function.
8680 (gdb_agent_about_to_close): Replace accessing list implemention
8681 details with API function.
8682 * win32-low.c (child_delete_thread): Replace accessing list
8683 implemention details with API function.
8684 (match_dll_by_basename): New function.
8685 (dll_is_loaded_by_basename): New function.
8686 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8687 details call to dll_is_loaded_by_basename.
8689 2014-02-19 Doug Evans <dje@google.com>
8691 * dll.h (struct dll_info): Add comment.
8692 * gdbthread.h (struct thread_info): Add comment.
8693 (current_ptid): Simplify.
8694 * inferiors.c (add_process): Update.
8695 (remove_process): Update.
8696 * inferiors.h (struct process_info): Rename member "head" to "entry".
8697 * linux-low.c (delete_lwp): Update.
8699 (last_thread_of_process_p): Update.
8700 (kill_one_lwp_callback, linux_kill): Update.
8701 (status_pending_p_callback): Update.
8702 (wait_for_sigstop): Update. Simplify read of ptid.
8703 (start_step_over): Update.
8704 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8705 (get_lwp_thread): Update.
8706 (struct lwp_info): Rename member "head" to "entry".
8707 * regcache.h (inferior_list_entry): Delete.
8708 * server.c (kill_inferior_callback): Update.
8709 (detach_or_kill_inferior_callback): Update.
8710 (print_started_pid): Update.
8711 (print_attached_pid): Update.
8712 (process_serial_event): Simplify read of ptid.
8713 * thread-db.c (thread_db_create_event): Update.
8714 (thread_db_get_tls_address): Update.
8715 * win32-low.c (current_inferior_ptid): Simplify.
8717 2014-02-19 Tom Tromey <tromey@redhat.com>
8719 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8721 (target_supports_btrace): Update.
8723 2014-02-14 Yao Qi <yao@codesourcery.com>
8725 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8726 (rsp-low-ipa.o): New target.
8728 2014-02-12 Tom Tromey <tromey@redhat.com>
8730 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8731 convert_ascii_to_int.
8732 * regcache.c (registers_to_string): Likewise.
8733 * remote-utils.c (decode_M_packet): Likewise.
8734 * server.c (process_serial_event): Likewise.
8736 2014-02-12 Tom Tromey <tromey@redhat.com>
8738 * server.c (handle_query, handle_v_run): Use hex2bin, not
8740 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8742 2014-02-12 Tom Tromey <tromey@redhat.com>
8744 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8745 convert_int_to_ascii.
8746 * regcache.c (registers_to_string, collect_register_as_string):
8748 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8750 * server.c (process_serial_event): Likewise.
8751 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8752 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8754 2014-02-12 Tom Tromey <tromey@redhat.com>
8756 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8757 bin2hex, not hexify.
8758 * tracepoint.c (cmd_qtstatus): Likewise.
8760 2014-02-12 Tom Tromey <tromey@redhat.com>
8762 * remote-utils.c (monitor_output): Pass explicit length to
8765 2014-02-12 Tom Tromey <tromey@redhat.com>
8767 * tracepoint.c: Include rsp-low.h.
8768 * server.c: Include rsp-low.h.
8769 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8770 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8772 * remote-utils.c: Include rsp-low.h.
8773 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8774 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8775 (convert_int_to_ascii, convert_ascii_to_int): Move to
8777 * regcache.c: Include rsp-low.h.
8778 * ax.c: Include rsp-low.h.
8779 * Makefile.in (SFILES): Add common/rsp-low.c.
8780 (OBS): Add rsp-low.o.
8781 (rsp-low.o): New target.
8783 2014-02-12 Tom Tromey <tromey@redhat.com>
8785 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8786 Include print-utils.h.
8787 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8788 (plongest, thirty_two, phex_nz): Remove.
8789 * Makefile.in (SFILES): Add common/print-utils.c.
8790 (OBS): Add print-utils.o.
8791 (print-utils-ipa.o): New target.
8792 (print-utils.o): New target.
8793 (IPA_OBJS): Add print-utils-ipa.o.
8795 2014-02-06 Tom Tromey <tromey@redhat.com>
8797 * Makefile.in (SFILES): Fix indentation.
8799 2014-02-05 Doug Evans <dje@google.com>
8801 * linux-low.c (linux_wait_for_event): Improve comment.
8802 (linux_wait_1): Keep current_inferior in sync with event_child.
8804 2014-01-22 Doug Evans <dje@google.com>
8806 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8808 2014-01-22 Doug Evans <dje@google.com>
8810 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8811 * configure: Regenerate.
8812 * config.in: Regenerate.
8813 * Makefile.in (SFILES): Add debug.c.
8815 * debug.c: New file.
8816 * debug.h: New file.
8817 * linux-aarch64-low.c (*): Update all debugging printfs to use
8818 debug_printf instead of fprintf.
8819 * linux-arm-low.c (*): Ditto.
8820 * linux-cris-low.c (*): Ditto.
8821 * linux-crisv32-low.c (*): Ditto.
8822 * linux-m32r-low.c (*): Ditto.
8823 * linux-sparc-low.c (*): Ditto.
8824 * linux-x86.c (*): Ditto.
8825 * linux-low.c (*): Ditto.
8826 (linux_wait_1): Add calls to debug_enter, debug_exit.
8827 (linux_wait): Remove redundant debugging printf.
8828 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8829 (linux_resume, unstop_all_lwps): Ditto.
8830 * mem-break.c (*): Update all debugging printfs to use
8831 debug_printf instead of fprintf.
8832 * remote-utils.c (*): Ditto.
8833 * thread-db.c (*): Ditto.
8834 * server.c #include <ctype.h>, "gdb_vecs.h".
8835 (debug_threads): Moved to debug.c.
8836 (*): Update all debugging printfs to use debug_printf instead of
8838 (start_inferior): Replace call to fflush with call to debug_flush.
8839 (monitor_show_help): Mention set debug-format.
8840 (parse_debug_format_options): New function.
8841 (handle_monitor_command): Handle "monitor set debug-format".
8842 (gdbserver_usage): Mention --debug-format.
8843 (main): Parse --debug-format.
8844 * server.h (debug_threads): Declaration moved to debug.h.
8846 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8847 trace_debug_1 that uses debug_printf.
8848 (tracepoint_look_up_symbols): Update all debugging printfs to use
8849 debug_printf instead of fprintf.
8851 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8853 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8856 2014-01-17 Pedro Alves <palves@redhat.com>
8859 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8860 defined after including gdb_proc_service.h.
8862 2014-01-16 Doug Evans <dje@google.com>
8864 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8865 (match_dll): Use it.
8867 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8869 * target.h (target_ops) <read_btrace>: Change parameters and
8870 return type to allow error reporting.
8871 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8872 trace reading errors on.
8873 * linux-low.c (linux_low_read_btrace): Pass trace reading
8875 (linux_low_disable_btrace): New.
8877 2014-01-15 Doug Evans <dje@google.com>
8879 * inferiors.c (thread_id_to_gdb_id): Delete.
8880 * inferiors.h (thread_id_to_gdb_id): Delete.
8882 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8884 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8885 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8888 2014-01-08 Pedro Alves <palves@redhat.com>
8890 * server.c (handle_status): Don't discard previous queued stop
8891 replies or thread's pending status here.
8892 (main) <disconnection>: Do it here instead.
8894 2014-01-08 Pedro Alves <palves@redhat.com>
8896 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8897 * server.c (visit_actioned_threads, handle_pending_status): New
8899 (handle_v_cont): Factor out parts to ...
8900 (resume): ... this new function. If in all-stop, and a thread
8901 being resumed has a pending status, report it without actually
8903 (myresume): Adjust to use the new 'resume' function.
8904 (clear_pending_status_callback, set_pending_status_callback)
8905 (find_status_pending_thread_callback): New functions.
8906 (handle_status): Handle the case of multiple threads having
8907 interesting statuses to report. Report threads' real last signal
8908 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8909 with an interesting thread to report the status for, instead of
8910 always reporting the status of the first thread.
8912 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8914 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8915 * gdbreplay.c (gdbreplay_version): Likewise.
8917 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8919 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8920 iov.iov_len with the real length in use.
8922 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8924 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8925 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8926 for all targets that use win32-low.c.
8927 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8928 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8930 2013-12-13 Pedro Alves <palves@redhat.com>
8932 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8933 if equal to TARGET_WAITKIND_LOADED.
8934 * win32-low.c (cached_status): New static global.
8935 (win32_wait): Add declaration.
8936 (do_initial_child_stuff): Flush all initial pending debug events
8937 up to the initial breakpoint.
8938 (win32_wait): If CACHED_STATUS was set, return that instead
8939 of doing a real wait. Remove the code resuming the execution
8940 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8941 during the initial phase. Also remove the code changing
8942 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8943 TARGET_WAITKIND_STOPPED.
8945 2013-12-11 Yao Qi <yao@codesourcery.com>
8947 * notif.c (handle_notif_ack): Return 0 if no notification
8950 2013-11-20 Doug Evans <dje@google.com>
8952 * linux-low.c (linux_set_resume_request): Fix comment.
8954 2013-11-20 Doug Evans <dje@google.com>
8956 * linux-low.c (resume_status_pending_p): Tweak comment.
8958 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8960 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8961 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8962 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8963 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8964 (srv_amd64_regobj): Add amd64-mpx.o.
8965 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8966 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8967 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8968 * i387-fp.c (num_pl_bnd_register) Added constant.
8969 (num_pl_bnd_cfg_registers) Added constant.
8970 (struct i387_xsave) Added reserved area and MPX fields.
8971 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8972 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8974 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8975 (init_registers_amd64_mpx_linux): Declare new function.
8976 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8977 (x86_64_regmap): Add MPX registers.
8978 (x86_linux_read_description): Add MPX case.
8979 (initialize_low_arch): Initialize MPX targets.
8981 2013-11-18 Tom Tromey <tromey@redhat.com>
8983 * configure: Rebuild.
8984 * configure.ac: Don't check for stdlib.h.
8985 * gdbreplay.c: Unconditionally include stdlib.h.
8987 2013-11-18 Tom Tromey <tromey@redhat.com>
8989 * config.in: Rebuild.
8990 * configure: Rebuild.
8991 * configure.ac: Don't use AC_HEADER_DIRENT.
8993 2013-11-18 Tom Tromey <tromey@redhat.com>
8995 * server.h: Don't check HAVE_STRING_H.
8996 * gdbreplay.c: Don't check HAVE_STRING_H.
8997 * configure: Rebuild.
8999 2013-11-18 Tom Tromey <tromey@redhat.com>
9001 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9004 2013-11-08 Tom Tromey <tromey@redhat.com>
9006 * configure, config.in: Rebuild.
9007 * configure.ac: Remove unused configury.
9009 2013-11-08 Tom Tromey <tromey@redhat.com>
9011 * acinclude.m4: Include common.m4, codeset.m4.
9012 * configure, config.in: Rebuild.
9013 * configure.ac: Use GDB_AC_COMMON.
9015 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9017 * linux-s390-low.c (HWCAP_S390_TE): New define.
9018 (s390_arch_setup): Consider the TE field in the HWCAP for
9019 determining 'have_regset_tdb'.
9021 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9024 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9027 2013-10-02 Pedro Alves <palves@redhat.com>
9029 * server.c (process_serial_event): Don't output "GDBserver
9030 exiting" if GDB is connected through stdio.
9031 * target.c (mywait): Likewise, be silent if GDB is connected
9034 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9036 * lynx-low.c (lynx_add_threads_after_attach): New function.
9037 (lynx_attach): Remove call to add_thread. Add call to
9038 lynx_add_threads_after_attach instead.
9040 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9042 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9043 * config.in, configure: Regenerated.
9045 2013-09-18 Yao Qi <yao@codesourcery.com>
9048 * server.c (start_inferior): Clear 'resume_info'.
9050 2013-09-16 Jiong Wang <jiwang@tilera.com>
9052 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9055 2013-09-16 Jiong Wang <jiwang@tilera.com>
9057 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9058 linux-tile-low.o to srv_tgtobj.
9060 2013-09-16 Will Newton <will.newton@linaro.org>
9062 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9065 2013-09-06 Pedro Alves <palves@redhat.com>
9067 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9068 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9069 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9070 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9071 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9072 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9074 2013-09-06 Pedro Alves <palves@redhat.com>
9076 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9077 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9079 2013-09-06 Pedro Alves <palves@redhat.com>
9081 * linux-amd64-ipa.c: Include tracepoint.h.
9082 * linux-i386-ipa.c: Include tracepoint.h.
9084 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9086 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9087 (ps_get_thread_area): New function.
9089 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9091 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9092 (initialize_low_arch): Call init_registers_crisv32 rather than
9093 init_register_crisv32.
9095 2013-09-05 Pedro Alves <palves@redhat.com>
9097 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9099 * hostio.h: ... this new file.
9100 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9101 win32-low.c: Include hostio.h.
9103 2013-09-05 Pedro Alves <palves@redhat.com>
9105 * server.h (gdb_client_data, handler_func, callback_handler_func)
9106 (delete_file_handler, add_file_handler, append_callback_event)
9107 (delete_callback_event, start_event_loop, initialize_event_loop):
9108 Move to event-loop.h and include it.
9109 * event-loop.h: New file.
9111 2013-09-05 Pedro Alves <palves@redhat.com>
9113 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9114 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9115 (loaded_dll, unloaded_dll): Move to ...
9116 * dll.h: ... this new file.
9117 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9119 2013-09-05 Pedro Alves <palves@redhat.com>
9121 * server.h (current_process, get_thread_process, all_processes)
9122 (add_inferior_to_list, for_each_inferior, current_inferior)
9123 (remove_inferior, add_process, remove_process, find_process_pid)
9124 (have_started_inferiors_p, have_attached_inferiors_p)
9125 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9126 (clear_inferiors, find_inferior, find_inferior_id)
9127 (inferior_target_data, set_inferior_target_data)
9128 (inferior_regcache_data, set_inferior_regcache_data): Move to
9129 inferiors.h, and include it.
9130 * inferiors.h: New file.
9132 2013-09-05 Pedro Alves <palves@redhat.com>
9134 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9138 2013-09-05 Pedro Alves <palves@redhat.com>
9140 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9142 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9143 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9144 (handle_tracepoint_general_set, handle_tracepoint_query)
9145 (tracepoint_finished_step, tracepoint_was_hit)
9146 (release_while_stepping_state_list, current_traceframe)
9147 (in_readonly_region, traceframe_read_mem)
9148 (fetch_traceframe_registers, traceframe_read_sdata)
9149 (traceframe_read_info, struct fast_tpoint_collect_status)
9150 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9151 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9152 (supply_fast_tracepoint_registers)
9153 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9154 (ipa_tdesc, claim_trampoline_space)
9155 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9156 (agent_mem_read, agent_get_trace_state_variable_value)
9157 (agent_set_trace_state_variable_value, agent_tsv_read)
9158 (agent_mem_read_string, get_raw_reg_func_addr)
9159 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9160 * tracepoint.h: ... this new file.
9162 2013-09-05 Pedro Alves <palves@redhat.com>
9164 * server.h (perror_with_name, error, fatal, warning, paddress)
9165 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9167 * utils.h: New file.
9169 2013-09-05 Pedro Alves <palves@redhat.com>
9171 * server.h (remote_debug, noack_mode, transport_is_reliable)
9172 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9173 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9174 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9175 (write_enn, initialize_async_io, enable_async_io)
9176 (disable_async_io, check_remote_input_interrupt_request)
9177 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9178 (dead_thread_notify, prepare_resume_reply)
9179 (decode_address_to_semicolon, decode_address, decode_m_packet)
9180 (decode_M_packet, decode_X_packet, decode_xfer_write)
9181 (decode_search_memory_packet, unhexify, hexify)
9182 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9183 (look_up_one_symbol, relocate_instruction)
9184 (monitor_output): Move to remote-utils.h, and include it.
9185 * remote-utils.h: New file.
9187 2013-09-05 Pedro Alves <palves@redhat.com>
9189 * server.h (_): Delete.
9191 2013-09-02 Pedro Alves <palves@redhat.com>
9193 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9194 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9196 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9198 2013-09-02 Pierre Muller <muller@sourceware.org>
9200 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9201 or WriteProcessMemory complete successfully and handle
9202 ERROR_PARTIAL_COPY error.
9204 2013-09-02 Pedro Alves <palves@redhat.com>
9206 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9207 error instead of EIO.
9209 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9212 * linux-low.c: Include filestuff.h.
9213 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9214 * lynx-low.c: Include filestuff.h.
9215 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9216 * server.c: Include filestuff.h.
9217 (main): Call notice_open_fds.
9218 * spu-low.c: Include filestuff.h.
9219 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9221 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9223 * Makefile.in: Explain why ../target and ../nat are not
9224 listed as include file search paths.
9225 (linux-waitpid.o): New object file rule.
9226 * configure.srv (srv_native_linux_obj): New variable.
9227 Replace all occurrences of linux native object files with
9228 $srv_native_linux_obj.
9229 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9230 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9231 (linux_enable_event_reporting): Remove declaration.
9232 (my_waitpid): Moved to common/linux-waitpid.c.
9233 (linux_wait_for_event): Pass ptid when calling
9234 linux_enable_event_reporting.
9235 (linux_supports_tracefork_flag): Remove.
9236 (linux_enable_event_reporting): Likewise.
9237 (linux_tracefork_grandchild): Remove.
9238 (STACK_SIZE): Moved to common/linux-ptrace.c.
9239 (linux_tracefork_child): Remove.
9240 (linux_test_for_tracefork): Remove.
9241 (linux_look_up_symbols): Call linux_supports_traceclone.
9242 (initialize_low): Remove call to linux_test_for_tracefork.
9243 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9244 common/linux-ptrace.h.
9245 (PTRACE_TYPE_ARG4): Likewise.
9246 Include linux-ptrace.h.
9248 2013-08-21 Pedro Alves <palves@redhat.com>
9250 * config.in: Renegerate.
9252 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9254 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9255 (SFILES): Remove $(srcdir)/common/target-common.c and
9256 add $(srcdir)/target/waitstatus.c.
9257 (OBS): Remove target-common.o and add waitstatus.o.
9258 (server_h): Remove $(srcdir)/../common/target-common.h and
9259 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9260 and $(srcdir)/../target/waitstatus.h.
9261 (target-common.o): Remove.
9262 (waitstatus.o): New target object file.
9263 * target.h: Do not include target-common.h and
9264 include target/resume.h, target/wait.h and
9265 target/waitstatus.h.
9267 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9269 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9270 to PTRACE_TYPE_ARG3.
9271 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9272 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9274 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9275 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9277 2013-07-27 Jie Zhang <jie@codesourcery.com>
9278 Daniel Jacobowitz <dan@codesourcery.com>
9279 Yao Qi <yao@codesourcery.com>
9281 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9282 (mips-linux-watch.o): New rule.
9283 (mips_linux_watch_h): New variable.
9284 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9286 * linux-mips-low.c: Include mips-linux-watch.h.
9287 (struct arch_process_info, struct arch_lwp_info): New.
9288 (update_watch_registers_callback): New function.
9289 (mips_linux_new_process, mips_linux_new_thread) New functions.
9290 (mips_linux_prepare_to_resume, mips_insert_point): New
9292 (mips_remove_point, mips_stopped_by_watchpoint): New
9294 (rsp_bp_type_to_target_hw_bp_type): New function.
9295 (mips_stopped_data_address): New function.
9296 (the_low_target): Add watchpoint support functions.
9298 2013-07-27 Yao Qi <yao@codesourcery.com>
9300 * i386-low.c: Include break-common.h.
9301 (enum target_hw_bp_type): Remove.
9303 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9305 * Makefile.in (SFILES): /common/target-common.c.
9306 (OBS): Add target-common.o.
9307 (server_h): Add $(srcdir)/../common/target-common.h.
9308 (target-common.o): New target.
9309 * server.c (queue_stop_reply_callback): Free
9310 status string after use.
9311 * target.c (target_waitstatus_to_string): Remove.
9312 * target.h: Include target-common.h.
9313 (resume_kind): Likewise.
9314 (target_waitkind): Likewise.
9315 (target_waitstatus): Likewise.
9316 (TARGET_WNOHANG): Likewise.
9318 2013-07-04 Yao Qi <yao@codesourcery.com>
9320 * Makefile.in (host_alias): Use @host_noncanonical@.
9321 (target_alias): Use @target_noncanonical@.
9322 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9323 ACX_NONCANONICAL_HOST.
9324 * configure: Regenerated.
9327 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9329 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9330 * configure: Rebuild.
9331 * Makefile.in (version_host, version_target): Get from configure.
9332 (version.c): Use $(version_host) and $(version_target).
9334 2013-07-03 Pedro Alves <palves@redhat.com>
9336 * Makefile.in (config.status): Depend on development.sh.
9337 * acinclude.m4: Include libmcheck.m4.
9338 * configure: Regenerate.
9340 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9342 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9343 attribute inside the parentheses.
9344 (winapi_DebugSetProcessKillOnExit): Ditto.
9345 (winapi_DebugBreakProcess): Ditto.
9346 (winapi_GenerateConsoleCtrlEvent): Ditto.
9348 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9350 * notif.h (notif_event): Add a dummy member to avoid compiler
9353 2013-07-01 Pedro Alves <palves@redhat.com>
9355 * hostio.c (HOSTIO_PATH_MAX): Define.
9356 (require_filename, handle_open, handle_unlink, handle_readlink):
9359 2013-07-01 Pedro Alves <palves@redhat.com>
9361 * server.h: Include "pathmax.h".
9362 * linux-low.c: Don't include sys/param.h.
9363 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9365 * win32-low.c: Don't include sys/param.h.
9366 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9368 2013-07-01 Pedro Alves <palves@redhat.com>
9370 * event-loop.c: Don't check HAVE_UNISTD_H before including
9372 * gdbreplay.c: Likewise.
9373 * remote-utils.c: Likewise.
9374 * server.c: Likewise.
9375 * configure.ac: Don't check for unistd.h.
9376 * configure: Regenerate.
9378 2013-06-28 Tom Tromey <tromey@redhat.com>
9380 * Makefile.in (version.c): Use version.in, not
9383 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9385 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9386 * configure: Rebuild.
9387 * Makefile.in (version_host, version_target): Get from configure.
9388 (version.c): Use $(version_host) and $(version_target).
9390 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9392 Fix trace-status to output user name without trailing colon.
9393 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9395 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9397 Fix trace-status to output proper start-time and stop-time.
9398 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9399 output start time and stop time in hex as gdb expects.
9401 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9403 * tracepoint.c (build_traceframe_info_xml): Output trace state
9404 variables present in the trace buffer.
9406 2013-06-24 Tom Tromey <tromey@redhat.com>
9408 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9410 (version.o): Remove.
9411 * gdbreplay.c: Include version.h.
9412 (version, host_name): Don't declare.
9413 * server.h: Include version.h.
9414 (version, host_name): Don't declare.
9416 2013-06-12 Pedro Alves <palves@redhat.com>
9418 * linux-x86-low.c (linux_is_elf64): Delete global.
9419 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9420 with local linux_pid_exe_is_elf_64_file use.
9422 2013-06-11 Pedro Alves <palves@redhat.com>
9424 * linux-low.c (regset_disabled, disable_regset): New functions.
9425 (regsets_fetch_inferior_registers)
9426 (regsets_store_inferior_registers): Use them.
9427 (initialize_regsets_info); Don't allocate the disabled_regsets
9429 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9432 2013-06-11 Pedro Alves <palves@redhat.com>
9434 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9437 2013-06-11 Pedro Alves <palves@redhat.com>
9439 * linux-x86-low.c (initialize_low_arch): Call
9440 init_registers_x32_avx_linux.
9442 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9444 Fix compatibility with Android Bionic.
9445 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9448 2013-06-07 Pedro Alves <palves@redhat.com>
9451 * Makefile.in (OBS): Add tdesc.o.
9452 (IPA_OBJS): Add tdesc-ipa.o.
9453 (tdesc-ipa.o): New rule.
9454 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9456 * linux-low.c (new_inferior): Delete.
9457 (disabled_regsets, num_regsets): Delete.
9458 (linux_add_process): Adjust to set the new per-process
9460 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9461 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9462 was a stop. When calling arch_setup, switch the current inferior
9463 to the thread that got an event.
9464 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9465 (regsets_fetch_inferior_registers)
9466 (regsets_store_inferior_registers): New regsets_info parameter.
9468 (linux_register_in_regsets): New regs_info parameter. Adjust to
9470 (register_addr, fetch_register, store_register): New usrregs_info
9471 parameter. Adjust to use it.
9472 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9473 parameter regs_info. Adjust to use it.
9474 (linux_fetch_registers): Get the current inferior's regs_info, and
9476 (linux_store_registers): Ditto.
9477 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9478 (initialize_low): Don't initialize the target_regsets here. Call
9479 initialize_low_arch.
9480 * linux-low.h (target_regsets): Delete declaration.
9481 (struct regsets_info): New.
9482 (struct usrregs_info): New.
9483 (struct regs_info): New.
9484 (struct process_info_private) <new_inferior>: New field.
9485 (struct linux_target_ops): Delete the num_regs, regmap, and
9486 regset_bitmap fields. New field regs_info.
9487 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9488 * i387-fp.c (num_xmm_registers): Delete.
9489 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9490 calls to new interface.
9491 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9492 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9493 Infer the number of xmm registers from the regcache's target
9495 * i387-fp.h (num_xmm_registers): Delete.
9496 * inferiors.c (add_thread): Don't install the thread's regcache
9498 * proc-service.c (gregset_info): Fetch the current inferior's
9499 regs_info. Adjust to use it.
9500 * regcache.c: Include tdesc.h.
9501 (register_bytes, reg_defs, num_registers)
9502 (gdbserver_expedite_regs): Delete.
9503 (get_thread_regcache): If the thread doesn't have a regcache yet,
9504 create one, instead of aborting gdbserver.
9505 (regcache_invalidate_one): Rename to ...
9506 (regcache_invalidate_thread): ... this.
9507 (regcache_invalidate_one): New.
9508 (regcache_invalidate): Only invalidate registers of the current
9510 (init_register_cache): Add target_desc parameter, and use it.
9511 (new_register_cache): Ditto. Assert the target description has a
9512 non zero registers_size.
9513 (regcache_cpy): Add assertions. Adjust.
9514 (realloc_register_cache, set_register_cache): Delete.
9515 (registers_to_string, registers_from_string): Adjust.
9516 (find_register_by_name, find_regno, find_register_by_number)
9517 (register_cache_size): Add target_desc parameter, and use it.
9518 (free_register_cache_thread, free_register_cache_thread_one)
9519 (regcache_release, register_cache_size): New.
9520 (register_size): Add target_desc parameter, and use it.
9521 (register_data, supply_register, supply_register_zeroed)
9522 (supply_regblock, supply_register_by_name, collect_register)
9523 (collect_register_as_string, collect_register_by_name): Adjust.
9524 * regcache.h (struct target_desc): Forward declare.
9525 (struct regcache) <tdesc>: New field.
9526 (init_register_cache, new_register_cache): Add target_desc
9528 (regcache_invalidate_thread): Declare.
9529 (regcache_invalidate_one): Delete declaration.
9530 (regcache_release): Declare.
9531 (find_register_by_number, register_cache_size, register_size)
9532 (find_regno): Add target_desc parameter.
9533 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9535 * remote-utils.c: Include tdesc.h.
9536 (outreg, prepare_resume_reply): Adjust.
9537 * server.c: Include tdesc.h.
9538 (gdbserver_xmltarget): Delete declaration.
9539 (get_features_xml, process_serial_event): Adjust.
9540 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9542 (struct process_info) <tdesc>: New field.
9543 (ipa_tdesc): Declare.
9544 * tdesc.c: New file.
9545 * tdesc.h: New file.
9546 * tracepoint.c: Include tdesc.h.
9547 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9548 (get_context_regcache): Adjust to pass ipa_tdesc down.
9549 (do_action_at_tracepoint): Adjust to get the register cache size
9550 from the context regcache's description.
9551 (traceframe_walk_blocks): Adjust to get the register cache size
9552 from the current trace frame's description.
9553 (traceframe_get_pc): Adjust to get current trace frame's
9554 description and pass it down.
9555 (gdb_collect): Adjust to get the register cache size from the
9557 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9558 (gdbserver_xmltarget): Delete.
9559 (initialize_low_tracepoint): Set the ipa's target description.
9560 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9561 (initialize_low_tracepoint): Set the ipa's target description.
9562 * linux-x86-low.c: Include tdesc.h.
9563 [__x86_64__] (is_64bit_tdesc): New.
9564 (ps_get_thread_area, x86_get_thread_area): Use it.
9565 (i386_cannot_store_register): Rename to ...
9566 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9567 (i386_cannot_fetch_register): Rename to ...
9568 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9569 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9571 (target_regsets): Rename to ...
9572 (x86_regsets): ... this.
9573 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9575 (x86_siginfo_fixup): Use is_64bit_tdesc.
9576 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9577 (tdesc_x32_avx_linux, tdesc_x32_linux)
9578 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9580 (x86_linux_update_xmltarget): Delete.
9581 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9582 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9583 (AMD64_LINUX_USER64_CS): New.
9584 (x86_linux_read_description): New, based on
9585 x86_linux_update_xmltarget.
9586 (same_process_callback): New.
9587 (x86_arch_setup_process_callback): New.
9588 (x86_linux_update_xmltarget): New.
9589 (x86_regsets_info): New.
9590 (amd64_linux_regs_info): New.
9591 (i386_linux_usrregs_info): New.
9592 (i386_linux_regs_info): New.
9593 (x86_linux_regs_info): New.
9594 (x86_arch_setup): Reimplement.
9595 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9596 (x86_emit_ops): Ditto.
9597 (the_low_target): Adjust. Install x86_linux_regs_info,
9598 x86_cannot_fetch_register, and x86_cannot_store_register.
9599 (initialize_low_arch): New.
9600 * linux-ia64-low.c (tdesc_ia64): Declare.
9601 (ia64_fetch_register): Adjust.
9602 (ia64_usrregs_info, regs_info): New globals.
9603 (ia64_regs_info): New function.
9604 (the_low_target): Adjust.
9605 (initialize_low_arch): New function.
9606 * linux-sparc-low.c (tdesc_sparc64): Declare.
9607 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9609 (sparc_arch_setup): New function.
9610 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9611 (the_low_target): Adjust.
9612 (initialize_low_arch): New function.
9613 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9614 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9615 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9616 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9617 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9618 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9619 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9620 (tdesc_powerpc_isa205_vsx64l): Declare.
9621 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9622 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9623 (ppc_set_pc, ppc_get_hwcap): Adjust.
9624 (ppc_usrregs_info): Forward declare.
9625 (!__powerpc64__) ppc_regmap_adjusted: New global.
9626 (ppc_arch_setup): Adjust to the current process'es target
9628 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9629 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9630 (ppc_store_evrregset): Adjust.
9631 (target_regsets): Rename to ...
9632 (ppc_regsets): ... this, and make static.
9633 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9634 (ppc_regs_info): New function.
9635 (the_low_target): Adjust.
9636 (initialize_low_arch): New function.
9637 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9638 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9639 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9640 (tdesc_s390x_linux64v2): Declare.
9641 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9642 (s390_fill_gregset, s390_store_last_break): Adjust.
9643 (target_regsets): Rename to ...
9644 (s390_regsets): ... this, and make static.
9645 (s390_get_pc, s390_set_pc): Adjust.
9646 (s390_get_hwcap): New target_desc parameter, and use it.
9647 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9648 (s390_arch_setup): Adjust to set the current process'es target
9649 description. Don't adjust the regmap.
9650 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9651 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9652 (regs_info_3264): New globals.
9653 (s390_regs_info): New function.
9654 (the_low_target): Adjust.
9655 (initialize_low_arch): New function.
9656 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9657 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9658 [__mips64] (init_registers_mips_linux)
9659 (init_registers_mips_dsp_linux): Delete defines.
9660 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9661 (have_dsp): New global.
9662 (mips_read_description): New, based on mips_arch_setup.
9663 (mips_arch_setup): Reimplement.
9664 (get_usrregs_info): New function.
9665 (mips_cannot_fetch_register, mips_cannot_store_register)
9666 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9667 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9668 (target_regsets): Rename to ...
9669 (mips_regsets): ... this, and make static.
9670 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9671 (dsp_regs_info, regs_info): New globals.
9672 (mips_regs_info): New function.
9673 (the_low_target): Adjust.
9674 (initialize_low_arch): New function.
9675 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9676 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9678 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9679 (arm_read_description): New, with bits factored from
9681 (arm_arch_setup): Reimplement.
9682 (target_regsets): Rename to ...
9683 (arm_regsets): ... this, and make static.
9684 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9685 (arm_regs_info): New function.
9686 (the_low_target): Adjust.
9687 (initialize_low_arch): New function.
9688 * linux-m68k-low.c (tdesc_m68k): Declare.
9689 (target_regsets): Rename to ...
9690 (m68k_regsets): ... this, and make static.
9691 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9692 (m68k_regs_info): New function.
9693 (m68k_arch_setup): New function.
9694 (the_low_target): Adjust.
9695 (initialize_low_arch): New function.
9696 * linux-sh-low.c (tdesc_sharch): Declare.
9697 (target_regsets): Rename to ...
9698 (sh_regsets): ... this, and make static.
9699 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9700 (sh_regs_info, sh_arch_setup): New functions.
9701 (the_low_target): Adjust.
9702 (initialize_low_arch): New function.
9703 * linux-bfin-low.c (tdesc_bfin): Declare.
9704 (bfin_arch_setup): New function.
9705 (bfin_usrregs_info, regs_info): New globals.
9706 (bfin_regs_info): New function.
9707 (the_low_target): Adjust.
9708 (initialize_low_arch): New function.
9709 * linux-cris-low.c (tdesc_cris): Declare.
9710 (cris_arch_setup): New function.
9711 (cris_usrregs_info, regs_info): New globals.
9712 (cris_regs_info): New function.
9713 (the_low_target): Adjust.
9714 (initialize_low_arch): New function.
9715 * linux-cris-low.c (tdesc_crisv32): Declare.
9716 (cris_arch_setup): New function.
9717 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9718 (cris_regs_info): New function.
9719 (the_low_target): Adjust.
9720 (initialize_low_arch): New function.
9721 * linux-m32r-low.c (tdesc_m32r): Declare.
9722 (m32r_arch_setup): New function.
9723 (m32r_usrregs_info, regs_info): New globals.
9724 (m32r_regs_info): Adjust.
9725 (initialize_low_arch): New function.
9726 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9727 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9728 (tic6x_usrregs_info): Forward declare.
9729 (tic6x_read_description): New function, based on ...
9730 (tic6x_arch_setup): ... this. Reimplement.
9731 (target_regsets): Rename to ...
9732 (tic6x_regsets): ... this, and make static.
9733 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9734 (tic6x_regs_info): New function.
9735 (the_low_target): Adjust.
9736 (initialize_low_arch): New function.
9737 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9738 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9739 (target_regsets): Rename to ...
9740 (xtensa_regsets): ... this, and make static.
9741 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9743 (xtensa_arch_setup, xtensa_regs_info): New functions.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9747 (nios2_arch_setup): Set the current process'es tdesc.
9748 (target_regsets): Rename to ...
9749 (nios2_regsets): ... this.
9750 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9751 (nios2_regs_info): New function.
9752 (the_low_target): Adjust.
9753 (initialize_low_arch): New function.
9754 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9755 (aarch64_arch_setup): Set the current process'es tdesc.
9756 (target_regsets): Rename to ...
9757 (aarch64_regsets): ... this.
9758 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9759 (aarch64_regs_info): New function.
9760 (the_low_target): Adjust.
9761 (initialize_low_arch): New function.
9762 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9764 (target_regsets): Rename to ...
9765 (tile_regsets): ... this.
9766 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9767 (tile_regs_info): New function.
9768 (tile_arch_setup): Set the current process'es tdesc.
9769 (the_low_target): Adjust.
9770 (initialize_low_arch): New function.
9771 * spu-low.c (tdesc_spu): Declare.
9772 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9773 * win32-arm-low.c (tdesc_arm): Declare.
9774 (arm_arch_setup): New function.
9775 (the_low_target): Install arm_arch_setup instead of
9777 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9778 (init_windows_x86): Rename to ...
9779 (i386_arch_setup): ... this. Set `win32_tdesc'.
9780 (the_low_target): Adjust.
9781 * win32-low.c (win32_tdesc): New global.
9782 (child_add_thread): Don't create the thread cache here.
9783 (do_initial_child_stuff): Set the new process'es tdesc.
9784 * win32-low.h (struct target_desc): Forward declare.
9785 (win32_tdesc): Declare.
9786 * lynx-i386-low.c (tdesc_i386): Declare global.
9787 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9788 * lynx-low.c (lynx_tdesc): New global.
9789 (lynx_add_process): Set the new process'es tdesc.
9790 * lynx-low.h (struct target_desc): Forward declare.
9791 (lynx_tdesc): Declare global.
9792 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9793 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9794 * nto-low.c (nto_tdesc): New global.
9795 (do_attach): Set the new process'es tdesc.
9796 * nto-low.h (struct target_desc): Forward declare.
9797 (nto_tdesc): Declare.
9798 * nto-x86-low.c (tdesc_i386): Declare.
9799 (nto_x86_arch_setup): Set `nto_tdesc'.
9801 2013-06-04 Gary Benson <gbenson@redhat.com>
9803 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9804 to qSupported response when appropriate.
9805 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9806 with nonzero-length annex.
9807 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9808 arguments supplied in annex.
9810 2013-05-31 Doug Evans <dje@google.com>
9813 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9814 64 bits in 64-cross-32 environment.
9816 2013-05-28 Pedro Alves <palves@redhat.com>
9818 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9819 (aarch64-without-fpu.c): Delete rule.
9820 * configure.srv (aarch64*-*-linux*): Remove references to
9821 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9822 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9825 2013-05-24 Pedro Alves <palves@redhat.com>
9827 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9828 instead of strchr/decode_address. Error if the range isn't split
9829 with a ','. Don't assume there's be a ':' in the action.
9831 2013-05-23 Yao Qi <yao@codesourcery.com>
9832 Pedro Alves <palves@redhat.com>
9834 * linux-low.c (lwp_in_step_range): New function.
9835 (linux_wait_1): If the thread was range stepping and stopped
9836 outside the stepping range, report the stop to GDB. Otherwise,
9837 continue stepping. Add range stepping debug output.
9838 (linux_set_resume_request): Copy the step range from the resume
9840 (linux_supports_range_stepping): New.
9841 (linux_target_ops) <supports_range_stepping>: Set to
9842 linux_supports_range_stepping.
9843 * linux-low.h (struct linux_target_ops)
9844 <supports_range_stepping>: New field.
9845 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9846 * linux-x86-low.c (x86_supports_range_stepping): New.
9847 (the_low_target) <supports_range_stepping>: Set to
9848 x86_supports_range_stepping.
9849 * server.c (handle_v_cont): Handle 'r' action.
9850 (handle_v_requests): Append ";r" if the target supports range
9852 * target.h (struct thread_resume) <step_range_start,
9853 step_range_end>: New fields.
9854 (struct target_ops) <supports_range_stepping>:
9856 (target_supports_range_stepping): New macro.
9858 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9860 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9861 confusion in comment.
9863 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9865 * lynx-low.c (struct process_info_private): New type.
9866 (lynx_add_process): New function.
9867 (lynx_create_inferior, lynx_attach): Replace calls to
9868 add_process by calls to lynx_add_process.
9869 (lynx_resume): If PTID is null, then try using
9870 current_process()->private->last_wait_event_ptid.
9872 (lynx_clear_inferiors): Delete. The contents of that function
9873 has been inlined in lynx_mourn;
9874 (lynx_wait_1): Save the ptid in the process's private data.
9875 (lynx_mourn): Free the process' private data. Replace call
9876 to lynx_clear_inferiors by call to clear_inferiors.
9878 2013-05-17 Yao Qi <yao@codesourcery.com>
9880 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9883 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9885 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9886 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9887 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9888 PT_TEXT_END_ADDR guards. Update comments.
9889 (linux_target_op) <read_offsets>: Conditionally define to
9890 linux_read_offsets if the target is UCLIBC and if it defines
9891 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9893 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9894 Andrew Jenner <andrew@codesourcery.com>
9896 * Makefile.in (SFILES): Add linux-nios2-low.c.
9897 (clean): Add action to delete nios2-linux.c.
9898 (nios2-linux.c): New rule.
9899 * configure.srv: Add nios2*-*-linux*.
9900 * linux-nios2-low.c: New.
9902 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9904 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9906 2013-04-25 Hui Zhu <hui@codesourcery.com>
9909 * ax.c (ax_printf): Add fflush.
9911 2013-04-22 Tom Tromey <tromey@redhat.com>
9913 * Makefile.in (SFILES): Add filestuff.c.
9914 (OBS): Add filestuff.o.
9915 (filestuff.o): New target.
9916 * config.in, configure: Rebuild.
9917 * configure.ac: Check for fdwalk, pipe2.
9919 2013-04-17 Pedro Alves <palves@redhat.com>
9921 * configure.ac (USE_THREAD_DB): Delete variable.
9922 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9923 Don't AC_SUBST USE_THREAD_DB.
9924 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9925 * config.in, configure: Regenerate.
9927 2013-04-16 Pedro Alves <palves@redhat.com>
9929 * linux-low.h (struct lwp_info) <thread_known>: Move under
9930 the USE_THREAD_DB #ifdef.
9932 2013-04-16 Pedro Alves <palves@redhat.com>
9934 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9935 (linux-low.o): Delete rule.
9936 * linux-low.h: Always include "gdb_thread_db.h" instead of
9937 conditionally including thread_db.h.
9938 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9941 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9943 * Makefile.in (install-only): Fix make install regression.
9945 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9947 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9948 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9950 * gdbserver.1: Remove.
9952 2013-03-22 Pedro Alves <palves@redhat.com>
9954 * linux-low.c (handle_extended_wait): Don't call
9955 linux_enable_event_reporting.
9957 2013-03-15 Tony Theodore <tonyt@logyst.com>
9960 * Makefile.in (SHELL): Use @SHELL@.
9962 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9964 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9967 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9969 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9970 Remove extraneous NULL element.
9972 2013-03-13 Yao Qi <yao@codesourcery.com>
9974 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9975 'V' block in trace frame.
9977 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9979 * target.h (struct target_ops): Add btrace ops.
9980 (target_supports_btrace): New macro.
9981 (target_enable_btrace): New macro.
9982 (target_disable_btrace): New macro.
9983 (target_read_btrace): New macro.
9984 * gdbthread.h (struct thread_info): Add btrace field.
9985 * server.c: Include btrace-common.h.
9986 (handle_btrace_general_set): New function.
9987 (handle_btrace_enable): New function.
9988 (handle_btrace_disable): New function.
9989 (handle_general_set): Call handle_btrace_general_set.
9990 (handle_qxfer_btrace): New function.
9991 (struct qxfer qxfer_packets[]): Add btrace entry.
9992 * inferiors.c (remove_thread): Disable btrace.
9993 * linux-low: Include linux-btrace.h.
9994 (linux_low_enable_btrace): New function.
9995 (linux_low_read_btrace): New function.
9996 (linux_target_ops): Add btrace ops.
9997 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9998 Add srv_linux_btrace=yes.
9999 (x86_64-*-linux*): Add linux-btrace.o.
10000 Add srv_linux_btrace=yes.
10001 * configure.ac: Define HAVE_LINUX_BTRACE.
10002 * config.in: Regenerated.
10003 * configure: Regenerated.
10005 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10007 * server.c (handle_qxfer): Preserve error message if -3 is
10009 (qxfer): Document the -3 return value.
10011 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10013 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10014 (linux_btrace_h): New variable.
10015 (linux-btrace.o): New rule.
10017 2013-03-08 Stan Shebs <stan@codesourcery.com>
10018 Hafiz Abid Qadeer <abidh@codesourcery.com>
10020 * tracepoint.c (trace_buffer_size): New global.
10021 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10022 (init_trace_buffer): Change to one-argument function. Allocate
10023 trace buffer memory.
10024 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10025 handle QTBuffer:size packet.
10026 (cmd_bigqtbuffer_size): New function.
10027 (initialize_tracepoint): Call init_trace_buffer with
10028 DEFAULT_TRACE_BUFFER_SIZE.
10029 * server.c (handle_query): Add QTBuffer:size in the
10032 2013-03-07 Yao Qi <yao@codesourcery.com>
10034 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10035 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10037 (cmd_qtsp): Adjust condition. Do post increment.
10038 Set cur_action and cur_step_action back to 0.
10040 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10043 * linux-low.c (linux_write_memory): Return early success if LEN is
10046 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10048 * configure.srv: Add x86_64-*-cygwin* as target.
10050 2013-02-28 Tom Tromey <tromey@redhat.com>
10052 * configure.ac: Invoke AC_SYS_LARGEFILE.
10053 * configure, config.in: Rebuild.
10055 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10057 * win32-low.c: Throughout, fix format strings and casts of
10058 printf-like functions to avoid type related warnings on all
10060 (get_child_debug_event): Print dwDebugEventCode as hex since
10061 that's how it's usually documented.
10063 2013-02-28 Yao Qi <yao@codesourcery.com>
10065 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10068 2013-02-27 Jiong Wang <jiwang@tilera.com>
10070 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10071 (reg-tilegx32.c): New rule.
10072 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10073 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10074 different register info initializer according to elf class.
10075 (init_registers_tilgx32): New function. The tilegx32 register info
10077 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10078 (tile_store_gregset): Likewise.
10080 2013-02-27 Yao Qi <yao@codesourcery.com>
10082 * server.c (process_point_options): Print debug message when
10083 debug_threads is true.
10085 2013-02-26 Yao Qi <yao@codesourcery.com>
10087 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10089 2013-02-19 Pedro Alves <palves@redhat.com>
10090 Kai Tietz <ktietz@redhat.com>
10094 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10095 instead of strtoul to extract address from packet.
10096 (process_serial_event) <'z'>: Likewise.
10098 2013-02-18 Yao Qi <yao@codesourcery.com>
10100 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10102 2013-02-14 Pedro Alves <palves@redhat.com>
10106 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10107 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10109 2013-02-14 Pedro Alves <palves@redhat.com>
10111 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10113 2013-02-14 Pedro Alves <palves@redhat.com>
10115 * tracepoint.c (save_string): Delete.
10116 (add_tracepoint_action): Use savestring instead of save_string.
10118 2013-02-12 Pedro Alves <palves@redhat.com>
10120 * linux-xtensa-low.c: Ditto.
10121 * xtensa-xtregs.c: Ditto.
10123 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10125 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10128 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10130 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10131 aarch64_num_wp_regs and aarch64_num_bp_regs to
10132 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10134 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10136 * linux-aarch64-low.c (ps_get_thread_area): Replace
10137 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10139 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10140 Marcus Shawcroft <marcus.shawcroft@arm.com>
10141 Nigel Stephens <nigel.stephens@arm.com>
10142 Yufeng Zhang <yufeng.zhang@arm.com>
10144 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10145 (aarch64.c, aarch64-without-fpu.c): New targets.
10146 * configure.srv (aarch64*-*-linux*): New.
10147 * linux-aarch64-low.c: New file.
10149 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10151 * linux-low.c (handle_extended_wait, linux_create_inferior)
10152 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10153 (dequeue_one_deferred_signal, linux_resume_one_thread)
10154 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10155 (linux_tracefork_grandchild, linux_test_for_tracefork)
10156 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10157 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10158 where the argument is 0.
10160 2013-01-25 Yao Qi <yao@codesourcery.com>
10162 * event-loop.c: Include "queue.h".
10163 (gdb_event_p): New typedef.
10164 (struct gdb_event) <next_event>: Remove.
10165 (event_queue): Change to QUEUE(gdb_event_p).
10166 (async_queue_event): Remove.
10167 (gdb_event_xfree): New.
10168 (initialize_event_loop): New.
10169 (process_event): Use API from QUEUE.
10170 (wait_for_event): Likewise.
10171 * server.c (main): Call initialize_event_loop.
10172 * server.h (initialize_event_loop): Declare.
10174 2013-01-18 Yao Qi <yao@codesourcery.com>
10176 * ax.h (struct eval_agent_expr_context): New.
10177 (gdb_eval_agent_expr): Update declaration.
10178 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10179 TFRAME. Add new argument CTX.
10180 * server.h (struct eval_agent_expr_context): Declare.
10181 (agent_mem_read, agent_tsv_read): Update declaration.
10182 (agent_mem_read_string): Likewise.
10183 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10184 (add_traceframe_block): Add new argument TPOINT.
10185 Increase TPOINT->traceframe_usage.
10186 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10187 eval_tracepoint_agent_expr.
10188 (condition_true_at_tracepoint): Likewise.
10189 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10190 (agent_mem_read_string, agent_tsv_read): Likewise.
10192 2013-01-16 Yao Qi <yao@codesourcery.com>
10194 * linux-low.c (linux_resume_one_lwp): Don't check
10195 'lwp->bp_reinsert != 0'.
10197 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10198 Pedro Alves <palves@redhat.com>
10200 * lynx-low.c (ptrace_request_to_str): Define a temporary
10201 macro and use it to simplify this function's implementation.
10203 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10205 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10208 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10210 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10212 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10214 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10216 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10218 * lynx-low.c (lynx_resume): Use the resume_info parameter
10219 to determine the ptid for the lynx_ptrace call, unless
10220 it is equal to minus_one_ptid, in which case we use the
10221 ptid of the current_inferior.
10222 (lynx_wait_1): After having received a thread create/exit
10223 event, resume the inferior's execution using the signaling
10224 thread's ptid, rather than the old ptid.
10226 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10228 * lynx-low.c (lynx_resume): Delete variable ret.
10230 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10232 * gdbreplay.c (gdbreplay_version): Update copyright year.
10233 * server.c (gdbserver_version): Likewise.
10235 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10237 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10240 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10242 * lynx-low.c (ptrace_request_to_str): Add handling for
10243 PTRACE_GETTRACESIG.
10245 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10247 * lynx-low.c (lynx_attach): Delete variable new_process.
10249 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10251 * lynx-low.c (lynx_create_inferior): Delete variable
10254 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10256 * lynx-low.c (ptrace_request_to_str): Do not handle
10257 PTRACE_GETTHREADLIST if this macro does not exist.
10259 2012-12-15 Yao Qi <yao@codesourcery.com>
10261 * Makefile.in (OBS): Add notif.o.
10262 * notif.c, notif.h: New.
10263 * server.c: Include "notif.h".
10264 (struct vstop_notif) <next>: Remove.
10266 (queue_stop_reply): Update.
10267 (push_event, send_next_stop_reply): Remove.
10268 (discard_queued_stop_replies): Update.
10269 (notif_stop): New variable.
10270 (handle_v_stopped): Remove.
10271 (handle_v_requests): Don't call handle_v_stopped. Call
10272 handle_ack_notif instead.
10273 (queue_stop_reply_callback): Call notif_event_enque instead
10274 of queue_stop_reply.
10275 (handle_status): Don't call send_next_stop_reply, call
10276 notif_write_event instead.
10277 (kill_inferior_callback): Likewise.
10278 (detach_or_kill_inferior_callback): Likewise.
10279 (main): Call initialize_notif.
10280 (process_serial_event): Call QUEUE_is_empty.
10281 (handle_target_event): Call notif_push instead of push event.
10282 * server.h (push_event): Remove declaration.
10284 2012-12-10 Tom Tromey <tromey@redhat.com>
10286 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10287 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10290 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10291 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10292 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10293 (amd64-linux-ipa.o, ax.o): Rewrite.
10294 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10295 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10296 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10297 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10298 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10299 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10300 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10301 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10302 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10303 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10304 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10305 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10306 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10307 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10308 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10309 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10310 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10311 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10312 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10313 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10314 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10315 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10316 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10317 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10318 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10319 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10320 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10321 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10322 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10323 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10324 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10325 (reg-tilegx.o): Remove.
10326 (all_object_files): New macro.
10327 Include .deps files.
10328 * aclocal.m4, configure: Rebuild.
10329 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10330 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10331 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10333 2012-12-05 Tom Tromey <tromey@redhat.com>
10336 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10338 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10340 * configure.ac: Check for linux/perf_event.h.
10341 * config.in: Regenerated.
10342 * configure: Regenerated.
10344 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10346 * hostio.c (handle_readlink): Decrease buffer size
10347 parameter passed to readlink by one byte.
10349 2012-11-26 Yao Qi <yao@codesourcery.com>
10351 * configure.ac (build_warnings): Append '-Wempty-body'.
10352 * configure: Regenerated.
10353 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10356 2012-11-15 Pierre Muller <muller@sourceware.org>
10358 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10359 * config.in: Regenerate.
10360 * configure: Regenerate.
10361 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10362 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10363 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10364 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10366 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10367 instead of <sys/wait.h> header.
10368 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10370 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10372 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10373 (various make rules): Remove -DGDBSERVER
10375 2012-11-09 Yao Qi <yao@codesourcery.com>
10377 * spu-low.c (current_ptid): Move it to ..
10378 * gdbthread.h: ... here. New.
10379 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10380 * server.c (myresume, process_serial_event): Likewise.
10381 * thread-db.c (thread_db_find_new_threads): Likewise.
10382 * tracepoint.c (run_inferior_command): Likewise.
10384 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10386 * server.c (handle_search_memory_1): Include access length in
10389 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10391 * linux-crisv32-low.c: Fix compile errors.
10393 2012-09-04 Yao Qi <yao@codesourcery.com>
10395 * tracepoint.c (cmd_qtsv): Adjust debug message.
10396 Don't check CUR_TPOINT.
10398 2012-08-28 Yao Qi <yao@codesourcery.com>
10400 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10401 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10402 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10403 Remove declarations of xmalloc, xreallloc, xstrdup and
10405 * Makefile.in (libiberty_h): New.
10406 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10407 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10409 2012-08-23 Yao Qi <yao@codesourcery.com>
10411 * server.h: Remove declaration of 'xsnprintf'.
10413 2012-08-22 Keith Seitz <keiths@redhat.com>
10415 * server.h: Include build-gnulib-gbserver/config.h.
10416 * gdbreplay.c: Likewise.
10418 2012-08-08 Doug Evans <dje@google.com>
10420 * Makefile.in (SFILES): Add gdb_vecs.c.
10421 (OBS): Add gdb_vecs.o.
10422 (gdb_vecs_h, host_defs_h): New variables.
10423 (thread-db.o): Add $(gdb_vecs_h) dependency.
10424 (gdb_vecs.o): New rule.
10425 * thread-db.c: #include "gdb_vecs.h".
10426 (thread_db_load_search): Use a vector to iterate over path elements.
10427 Handle text appearing after "$pdir".
10429 * configure.ac: Add check for strstr.
10430 * config.in: Regenerate.
10431 * configure: Regenerate.
10433 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10435 * hostio.c (handle_pread): If pread fails, fall back to attempting
10437 (handle_pwrite): Likewise for pwrite.
10439 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10441 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10442 between unsupported TYPE and unimplementable ADDR/LEN combination.
10443 (arm_insert_point): Act on new return value.
10445 2012-07-31 Pedro Alves <palves@redhat.com>
10447 * server.c (process_point_options): Only skip tokens if we find
10448 one that is unrecognized. Don't treat 'X' specially while
10449 skipping unrecognized tokens.
10451 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10453 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10454 to 4-byte-align HW breakpoint addresses for Thumb.
10456 2012-07-27 Yao Qi <yao@codesourcery.com>
10460 * server.h: Declare gdb_agent_about_to_close.
10461 * target.c (kill_inferior): Include "agent.h".
10462 New. Send command 'kill'.
10463 * target.h (kill_inferior): Removed macro.
10464 * tracepoint.c (gdb_agent_about_to_close): New.
10465 (gdb_agent_helper_thread): Handle command 'close'.
10466 Wait endlessly until the inferior stops.
10467 Install gdb_agent_remove_socket to atexit hook.
10468 (agent_socket_name): New static variable.
10469 (gdb_agent_socket_init): Replace local variable 'name' with
10470 'agent_socket_name'.
10471 (gdb_agent_remove_socket): New.
10473 2012-07-27 Yao Qi <yao@codesourcery.com>
10475 * server.c (process_point_options): Stop at 'X' when parsing.
10477 2012-07-19 Michael Eager <eager@eagercon.com>
10479 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10481 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10482 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10483 hardware breakpoint.
10485 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10487 * gdbserver/linux-low.c (initialize_low): Call
10488 linux_ptrace_init_warnings.
10490 2012-07-02 Doug Evans <dje@google.com>
10492 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10495 2012-07-02 Stan Shebs <stan@codesourcery.com>
10497 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10498 (ax.o): Add it to build rule.
10500 (OBS): Add format.o.
10501 (IPA_OBS): Add format.o.
10502 * server.c (handle_query): Claim support for breakpoint commands.
10503 (process_point_options): Add command case.
10504 (process_serial_event): Leave running if there are printfs in
10506 * mem-break.h (any_persistent_commands): Declare.
10507 (add_breakpoint_commands): Declare.
10508 (gdb_no_commands_at_breakpoint): Declare.
10509 (run_breakpoint_commands): Declare.
10510 * mem-break.c (struct point_command_list): New struct.
10511 (struct breakpoint): New field command_list.
10512 (any_persistent_commands): New function.
10513 (add_commands_to_breakpoint): New function.
10514 (add_breakpoint_commands): New function.
10515 (gdb_no_commands_at_breakpoint): New function.
10516 (run_breakpoint_commands): New function.
10517 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10519 * ax.c: Include format.h.
10520 (ax_printf): New function.
10521 (gdb_eval_agent_expr): Add printf opcode.
10523 2012-06-13 Yao Qi <yao@codesourcery.com>
10525 * server.c (start_inferior): Remove duplicated writes to fields
10526 'last_resume_kind' and 'last_status' of 'current_inferior'.
10528 2012-06-12 Yao Qi <yao@codesourcery.com>
10529 Pedro Alves <palves@redhat.com>
10531 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10533 * server.c (handle_v_cont): Extend comment.
10535 2012-06-11 Yao Qi <yao@codesourcery.com>
10537 * linux-low.c (linux_attach): Add 'static'.
10539 2012-06-06 Yao Qi <yao@codesourcery.com>
10541 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10543 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10545 Fix gcc -flto compilation warning.
10546 * server.c (main): Make variable multi_mode and attach volatile.
10548 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10550 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10551 if the platform doesn't know about it.
10553 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10555 * Makefile.in (SFILES): Add linux-tile-low.c.
10556 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10557 * configure.srv: Handle tilegx-*-linux*.
10558 * linux-tile-low.c: New file.
10560 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10562 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10564 2012-05-24 Pedro Alves <palves@redhat.com>
10568 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10570 2012-05-24 Pedro Alves <palves@redhat.com>
10574 Replace target_signal with gdb_signal throughout.
10576 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10578 * linux-low.c (linux_store_registers): Avoid the copying sequence
10579 when no data has been retrieved by ptrace.
10581 2012-05-22 Will Deacon <will.deacon@arm.com>
10583 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10584 Include asm/ptrace.h.
10585 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10588 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10590 * linux-low.c (linux_store_registers): Don't re-retrieve data
10591 with ptrace that has already been obtained from /proc. Always
10592 copy any data retrieved with ptrace to the buffer supplied.
10594 2012-05-11 Yao Qi <yao@codesourcery.com>
10595 Pedro Alves <palves@redhat.com>
10597 * linux-low.c (enum stopping_threads_kind): New.
10598 (stopping_threads): Change type to `enum stopping_threads_kind'.
10599 (handle_extended_wait): If stopping and suspending threads, leave
10600 the new_lwp suspended too.
10601 (linux_wait_for_event): Adjust.
10602 (stop_all_lwps): Set `stopping_threads' to
10603 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10604 whether we're suspending threads or just stopping them. Assert no
10607 2012-04-29 Yao Qi <yao@codesourcery.com>
10609 * server.h: Move some code to ...
10610 * gdbthread.h: ... here. New.
10611 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10612 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10613 (nto-low.o, win32-low.o): Likewise.
10614 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10615 * regcache.c, remote-utils.c, server.c: Likewise.
10616 * target.c, tracepoint.c, win32-low.c: Likewise.
10618 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10620 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10621 (PTRACE_ARG4_TYPE): Likewise.
10622 (PTRACE_XFER_TYPE): Likewise.
10623 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10624 ptrace to PTRACE_ARG3_TYPE.
10625 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10626 (PTRACE_ARG4_TYPE): Likewise.
10627 (PTRACE_XFER_TYPE): Likewise.
10628 (linux_detach_one_lwp): Cast fourth argument of
10629 ptrace to long then PTRACE_ARG4_TYPE.
10630 (regsets_fetch_inferior_registers): Cast third argument of
10631 ptrace to long then PTRACE_ARG3_TYPE.
10632 (regsets_store_inferior_registers): Likewise.
10634 2012-04-20 Pedro Alves <palves@redhat.com>
10636 * configure: Regenerate.
10638 2012-04-19 Pedro Alves <palves@redhat.com>
10640 * Makefile.in (GNULIB_BUILDDIR): New.
10641 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10642 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10643 (all, install-only, uninstall, clean-info, all-lib, clean): No
10644 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10645 (maintainer-clean realclean distclean): Use subdir_do.
10647 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10648 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10649 * acinclude.m4: Include acx_configure_dir.m4.
10650 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10651 calls. Call AC_PROG_RANLIB. Configure gnulib using
10654 (GNULIB_STDINT_H): Adjust.
10655 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10656 * gdbreplay.c: Include build-gnulib/config.h.
10657 * server.h: Likewise.
10658 * aclocal.m4: Regenerate.
10659 * config.in: Regenerate.
10660 * configure: Regenerate.
10662 2012-04-19 Pedro Alves <palves@redhat.com>
10664 * Makefile.in (LIBGNU, INCGNU): Adjust.
10665 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10666 (all, install-only, uninstall, clean-info, all-lib, clean)
10667 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10668 * configure.ac: Adjust AC_OUTPUT output.
10669 * aclocal.m4: Regenerate.
10670 * configure: Regenerate.
10672 2012-04-19 Pedro Alves <palves@redhat.com>
10674 * Makefile.in (generated_files): New.
10675 (server_h): Remove the explicit dependency on config.h, and depend
10676 on $generated_files.
10678 2012-04-19 Pedro Alves <palves@redhat.com>
10680 * Makefile.in (INCGNU): Add -Ignulib.
10682 2012-04-19 Pedro Alves <palves@redhat.com>
10684 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10685 (INCGNU): ... this, and spell out -I here.
10686 (GNULIB_LIB): Rename to ...
10687 (LIBGNU): ... this.
10688 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10690 2012-04-19 Pedro Alves <palves@redhat.com>
10692 * config.in: Regenerate.
10694 2012-04-19 Pedro Alves <palves@redhat.com>
10696 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10697 * server.h (memmem): Remove declaration.
10698 * config.in: Regenerate.
10699 * configure: Regenerate.
10701 2012-04-19 Yao Qi <yao@codesourcery.com>
10703 * Makefile.in (SFILES): Add common/vec.c.
10707 2012-04-19 Yao Qi <yao@codesourcery.com>
10709 * remote-utils.c (prepare_resume_reply): Replace with macro
10710 target_core_of_thread.
10711 * server.c (handle_qxfer_threads_proper): Likewise.
10712 * target.h (traget_core_of_thread): New macro.
10714 2012-04-18 Pedro Alves <palves@redhat.com>
10716 * aclocal.m4: Regenerate.
10717 * configure: Regenerate.
10719 2012-04-16 Yao Qi <yao@codesourcery.com>
10721 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10722 duplicated on address.
10724 2012-04-16 Yao Qi <yao@codesourcery.com>
10726 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10727 (struct tracepoint_action_ops) <send>: New field.
10728 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10729 (agent_expr_send, x_tracepoint_action_send): New.
10730 (l_tracepoint_action_send): New.
10731 (cmd_qtdp): Download and install tracepoint
10732 according to `use_agent'.
10733 (run_inferior_command): Add one more parameter `len'.
10735 (tracepoint_send_agent): New.
10736 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10738 2012-04-16 Yao Qi <yao@codesourcery.com>
10740 * tracepoint.c (download_tracepoints): Moved to ...
10741 (cmd_qtstart): ... here.
10743 2012-04-14 Yao Qi <yao@codesourcery.com>
10745 * tracepoint.c: Include inttypes.h.
10746 (struct collect_memory_action): Use sized types.
10747 (struct tracepoint): Likewise.
10748 (cmd_qtdp, stop_tracing): Update print specifiers.
10749 (cmd_qtp, response_tracepoint): Likewise.
10750 (collect_data_at_tracepoint): Likewise.
10751 (collect_data_at_step): Likewise.
10753 2012-04-14 Yao Qi <yao@codesourcery.com>
10755 Import gnulib module inttypes.
10756 * aclocal.m4, config.in, configure: Regenerated.
10758 2012-04-14 Yao Qi <yao@codesourcery.com>
10760 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10761 Makefile and config.status at last.
10763 2012-04-13 Yao Qi <yao@codesourcery.com>
10765 * tracepoint.c: Include stdint.h unconditionally.
10767 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10769 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10770 on BFD_HAVE_SYS_PROCFS_TYPE.
10771 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10772 * configure: Regenerate.
10773 * config.in: Likewise.
10775 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10777 * Makefile.in (clean): Also remove x32.c x32-linux.c
10778 x32-avx.c x32-avx-linux.c.
10779 (x32.o): New target.
10781 (x32-linux.o): Likewise.
10782 (x32-linux.c): Likewise.
10783 (x32-avx.o): Likewise.
10784 (x32-avx.c): Likewise.
10785 (x32-avx-linux.o): Likewise.
10786 (x32-avx-linux.c): Likewise.
10788 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10789 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10790 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10791 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10792 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10793 i386/x32-avx-linux.xml.
10795 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10796 (init_registers_x32_avx_linux): Likwise.
10797 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10798 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10800 2012-04-13 Pedro Alves <palves@redhat.com>
10802 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10803 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10804 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10805 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10808 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10810 * linux-x86-low.c (compat_x32_clock_t): New.
10811 (compat_x32_siginfo_t): Likewise.
10812 (compat_x32_siginfo_from_siginfo): Likewise.
10813 (siginfo_from_compat_x32_siginfo): Likewise.
10814 (linux_is_elf64): Likewise.
10815 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10816 and siginfo_from_compat_x32_siginfo for x32.
10817 (x86_arch_setup): Set linux_is_elf64.
10819 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10822 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10824 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10825 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10826 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10827 compatible with process.
10829 2012-04-12 Yao Qi <yao@codesourcery.com>
10831 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10832 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10833 (install-only, install-info, clean): Handle sub dir gnulib.
10834 (all-lib, am--refresh): New targets.
10835 (memmem.o): Remove target.
10836 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10837 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10838 (AC_REPLACE_FUNCS): Remove memmem.
10839 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10840 (AC_OUTPUT): Generate Makefile in gnulib/.
10841 * aclocal.m4, config.in, configure: Regenerated.
10843 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10845 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10847 2012-04-05 Pedro Alves <palves@redhat.com>
10849 -Werror=strict-aliasing
10851 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10854 2012-04-04 Pedro Alves <palves@redhat.com>
10856 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10857 (sparc_store_gregset_from_stack, sparc_store_gregset)
10858 (sparc_breakpoint_at): Fix formatting.
10860 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10862 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10864 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10865 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10866 * config.in: Regenerate.
10867 * configure: Likewise.
10869 2012-03-29 Pedro Alves <palves@redhat.com>
10871 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10872 Correct ptrace arguments.
10874 2012-03-28 Pedro Alves <palves@redhat.com>
10876 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10877 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10878 (IA64_FR1_REGNUM): New defines.
10879 (ia64_fetch_register): New.
10880 (the_low_target): Install it.
10881 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10883 * linux-low.c (linux_fetch_registers): Try the
10884 the_low_target.fetch_register hook first.
10886 * linux-arm-low.c (the_low_target): Adjust.
10887 * linux-bfin-low.c (the_low_target): Adjust.
10888 * linux-cris-low.c (the_low_target): Adjust.
10889 * linux-crisv32-low.c (the_low_target): Adjust.
10890 * linux-m32r-low.c (the_low_target): Adjust.
10891 * linux-m68k-low.c (the_low_target): Adjust.
10892 * linux-mips-low.c (the_low_target): Adjust.
10893 * linux-ppc-low.c (the_low_target): Adjust.
10894 * linux-s390-low.c (the_low_target): Adjust.
10895 * linux-sh-low.c (the_low_target): Adjust.
10896 * linux-sparc-low.c (the_low_target): Adjust.
10897 * linux-tic6x-low.c (the_low_target): Adjust.
10898 * linux-x86-low.c (the_low_target): Adjust.
10899 * linux-xtensa-low.c (the_low_target): Adjust.
10901 2012-03-26 Pedro Alves <palves@redhat.com>
10903 * server.c (handle_qxfer_libraries): Don't bail early if
10904 the_target->qxfer_libraries_svr4 is not NULL.
10906 2012-03-26 Pedro Alves <palves@redhat.com>
10908 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10910 2012-03-23 Pedro Alves <palves@redhat.com>
10912 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10913 "library-list-svr4" element's start tag when the the DSO list is
10916 2012-03-23 Pedro Alves <palves@redhat.com>
10918 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10919 a variable whose type size is the same as the inferior's pointer
10922 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10924 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10926 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10927 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10928 * linux-low.h: Include <signal.h>.
10929 (struct siginfo): Remove forward declaration.
10930 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10933 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10935 * .gitignore: Ignore more files.
10937 2012-03-19 Pedro Alves <palves@redhat.com>
10938 Jan Kratochvil <jan.kratochvil@redhat.com>
10940 * server.c (cont_thread, general_thread): Add describing comments.
10941 (start_inferior): Clear `cont_thread'.
10942 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10945 2012-03-15 Yao Qi <yao@codesourcery.com>
10947 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10949 (cmd_qtdp): ... here.
10951 2012-03-15 Yao Qi <yao@codesourcery.com>
10953 * tracepoint.c (struct tracepoint_action_ops): New.
10954 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10955 (m_tracepoint_action_download): New.
10956 (r_tracepoint_action_download): New.
10957 (x_tracepoint_action_download): New.
10958 (l_tracepoint_action_download): New.
10959 (add_tracepoint_action): Install `action->ops' according type.
10960 (download_tracepoint_1): Move code `download' function pointer
10961 of various tracepoint_action_ops.
10963 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10965 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10966 linux_ptrace_attach_warnings.
10968 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10970 * Makefile.in (linux-ptrace.o): New.
10971 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10972 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10973 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10974 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10975 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10977 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10979 2012-03-08 Yao Qi <yao@codesourcery.com>
10980 Pedro Alves <palves@redhat.com>
10982 Fix PR server/13392.
10983 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10984 offset of JMP insn.
10985 * tracepoint.c (remove_tracepoint): New.
10986 (cmd_qtdp): Call remove_tracepoint when failed to install.
10988 2012-03-07 Pedro Alves <palves@redhat.com>
10990 * linux-low.c (get_detach_signal): New.
10991 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10992 Pass on pending signals to PTRACE_DETACH. Check the result of the
10994 * server.c (program_signals, program_signals_p): New.
10995 (handle_general_set): Handle QProgramSignals.
10996 * server.h (program_signals, program_signals_p): Declare.
10998 2012-03-05 Pedro Alves <palves@redhat.com>
10999 Jan Kratochvil <jan.kratochvil@redhat.com>
11001 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11004 2012-03-03 Yao Qi <yao@codesourcery.com>
11006 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11007 agent_look_up_symbols.
11009 2012-03-03 Yao Qi <yao@codesourcery.com>
11011 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11012 (linux-x86-low.o): Likewise.
11013 * server.h: Remove in_process_agent_loaded.
11014 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11018 2012-03-03 Yao Qi <yao@codesourcery.com>
11020 * tracepoint.c (gdb_agent_capability): New global.
11021 (in_process_agent_loaded_ust): Renamed to
11022 `in_process_agent_supports_ust'.
11024 (in_process_agent_supports_ust): Call agent_capability_check.
11025 (clear_installed_tracepoints): Assert that agent supports
11028 2012-03-03 Yao Qi <yao@codesourcery.com>
11030 * linux-low.c (linux_supports_agent): New.
11031 (linux_target_ops): Initialize field `supports_agent' with
11032 linux_supports_agent.
11033 * target.h (struct target_ops) <supports_agent>: New.
11034 (target_supports_agent): New macro.
11035 * server.c (handle_general_set): Handle packet 'QAgent'.
11036 (handle_query): Send `QAgent+'.
11037 * Makefile.in (server.o): Depends on agent.h.
11039 2012-03-03 Yao Qi <yao@codesourcery.com>
11041 * Makefile.in (OBS): Add agent.o.
11042 Add new rule for agent.o.
11043 Track dependence of tracepoint.c on agent.h.
11044 * tracepoint.c (run_inferior_command_1):
11045 (run_inferior_command): Call agent_run_command.
11046 (gdb_ust_connect_sync_socket): Deleted. Move it to
11048 (resume_thread, stop_thread): Likewise.
11049 (gdb_ust_socket_init): Renamed to ...
11050 (gdb_agent_socket_init): ... New.
11051 (gdb_ust_thread): Renamed to ...
11052 (gdb_agent_helper_thread): ... New.
11053 (gdb_ust_init): Move some code to ...
11054 (gdb_agent_init): ... here. New.
11055 [HAVE_UST]: Call gdb_ust_init.
11056 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11057 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11058 * config.in, configure: Regenerated.
11060 2012-03-02 Pedro Alves <palves@redhat.com>
11062 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11063 * linux-low.c (struct simple_pid_list): New.
11064 (stopped_pids): New a struct simple_pid_list pointer.
11065 (add_to_pid_list, pull_pid_from_list): New.
11066 (handle_extended_wait): Don't assume the first signal new children
11067 report is SIGSTOP. Adjust call to pull_pid_from_list.
11068 (linux_wait_for_lwp): Adjust.
11070 2012-03-02 Yao Qi <yao@codesourcery.com>
11072 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11075 2012-03-02 Yao Qi <yao@codesourcery.com>
11077 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11078 `stop_pc' and `tpoint'. Update caller.
11080 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11082 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11083 * linux-low.c (use_linux_regsets): New macro.
11084 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11085 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11086 (linux_register_in_regsets): New function.
11087 (usr_fetch_inferior_registers): Skip registers covered by
11089 (usr_store_inferior_registers): Likewise.
11090 (usr_fetch_inferior_registers): New macro.
11091 (usr_store_inferior_registers): Likewise.
11092 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11093 (linux_store_registers): Likewise.
11094 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11096 (init_registers_mips64_dsp_linux): Likewise.
11097 (init_registers_mips_linux): New macro.
11098 (init_registers_mips_dsp_linux): Likewise.
11099 (mips_dsp_num_regs): Likewise.
11100 (DSP_BASE, DSP_CONTROL): New fallback macros.
11101 (mips_base_regs): New macro.
11102 (mips_regmap): Use it. Fix the size.
11103 (mips_dsp_regmap): New variable.
11104 (mips_dsp_regset_bitmap): Likewise.
11105 (mips_arch_setup): New function.
11106 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11108 (mips_cannot_store_register): Likewise.
11109 (the_low_target): Update .arch_setup, .num_regs and .regmap
11110 initializers. Add .regset_bitmap initializer.
11111 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11113 * linux-bfin-low.c (the_low_target): Likewise.
11114 * linux-cris-low.c (the_low_target): Likewise.
11115 * linux-crisv32-low.c (the_low_target): Likewise.
11116 * linux-ia64-low.c (the_low_target): Likewise.
11117 * linux-m32r-low.c (the_low_target): Likewise.
11118 * linux-m68k-low.c (the_low_target): Likewise.
11119 * linux-ppc-low.c (the_low_target): Likewise.
11120 * linux-s390-low.c (the_low_target): Likewise.
11121 * linux-sh-low.c (the_low_target): Likewise.
11122 * linux-sparc-low.c (the_low_target): Likewise.
11123 * linux-tic6x-low.c (the_low_target): Likewise.
11124 * linux-x86-low.c (the_low_target): Likewise.
11125 * linux-xtensa-low.c (the_low_target): Likewise.
11126 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11127 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11128 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11130 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11131 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11133 2012-02-29 Yao Qi <yao@codesourcery.com>
11134 Pedro Alves <palves@redhat.com>
11136 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11137 `step_over_finished' is true.
11139 2012-02-27 Pedro Alves <palves@redhat.com>
11141 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11142 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11144 2012-02-27 Pedro Alves <palves@redhat.com>
11147 * linux-low.c (pid_is_stopped): New.
11148 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11150 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11152 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11155 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11157 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11159 2012-02-24 Luis Machado <lgustavo@codesourcery>
11161 * server.c (handle_query): Advertise support for target-side
11162 breakpoint condition evaluation.
11163 (process_point_options): New function.
11164 (process_serial_event): When inserting a breakpoint, check for
11165 a target-side condition that should be evaluated.
11167 * mem-break.c: Include regcache.h and ax.h.
11168 (point_cond_list_t): New data structure.
11169 (breakpoint) <cond_list>: New field.
11170 (find_gdb_breakpoint_at): Make non-static.
11171 (delete_gdb_breakpoint_at): Clear any target-side
11173 (clear_gdb_breakpoint_conditions): New function.
11174 (add_condition_to_breakpoint): Likewise.
11175 (add_breakpoint_condition): Likewise.
11176 (gdb_condition_true_at_breakpoint): Likewise.
11177 (gdb_breakpoint_here): Return result directly instead
11178 of going through a local variable.
11180 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11181 (clear_gdb_breakpoint_conditions): Likewise.
11182 (add_breakpoint_condition): Likewise.
11183 (gdb_condition_true_at_breakpoint): Likewise.
11185 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11186 (need_step_over_p): Take target-side breakpoint condition into
11189 2012-02-24 Luis Machado <lgustavo@codesourcery>
11191 * server.h: Include tracepoint.h.
11192 (agent_mem_read, agent_get_trace_state_variable_value,
11193 agent_set_trace_state_variable_value,
11194 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11195 get_set_tsv_func_addr): New prototypes.
11197 * ax.h: New include file.
11198 * ax.c: New source file.
11200 * tracepoint.c: Include ax.h.
11201 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11202 agent_expr, eval_result_type): Move to ax.h.
11203 (parse_agent_expr): Rename to ...
11204 (gdb_parse_agent_expr): ... this, make it non-static and move
11206 (unparse_agent_expr) Rename to ...
11207 (gdb_unparse_agent_expr): ... this, make it non-static and move
11209 (eval_agent_expr): Rename to ...
11210 (eval_tracepoint_agent_expr): ... this.
11211 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11212 forward declarations.
11213 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11214 (agent_get_trace_state_variable_value): New function.
11215 (agent_set_trace_state_variable_value): New function.
11216 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11217 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11218 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11219 (condition_true_at_tracepoint): Likewise.
11220 (parse_agent_expr): Rename to ...
11221 (gdb_parse_agent_expr): ... this and move to ax.c.
11222 (unparse_agent_expr): Rename to ...
11223 (gdb_unparse_agent_expr): ... this and move to ax.c.
11224 (gdb_agent_op_name): Move to ax.c.
11225 (eval_agent_expr): Rename to ...
11226 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11228 (eval_tracepoint_agent_expr): New function.
11229 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11231 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11233 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11234 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11235 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11236 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11237 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11238 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11239 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11240 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11241 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11242 (compile_bytecodes): Remove forward declaration.
11243 (is_goto_target): Move to ax.c.
11244 (compile_bytecodes): Move to ax.c and call
11245 agent_get_trace_state_variable_value (...) and
11246 agent_set_trace_state_variable_value (...).
11248 * Makefile.in: Update ax.c and IPA dependencies.
11250 2012-02-24 Pedro Alves <palves@redhat.com>
11252 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11253 (cmd_bigqtbuffer_circular): ... this. Only handle
11254 'QTBuffer:circular:'.
11255 (handle_tracepoint_general_set): Adjust.
11257 2012-02-16 Yao Qi <yao@codesourcery.com>
11259 * inferiors.c: Move code to ...
11260 * dll.c: .... here. New.
11261 * server.h: Declare clear_dlls.
11262 * Makefile.in (SFILES): Add dll.c.
11266 2012-02-11 Yao Qi <yao@codesourcery.com>
11268 * server.c: (handle_monitor_command): Add a new parameter
11270 (handle_query): Update caller.
11272 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11274 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11275 * configure, config.in: Regenerate.
11276 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11279 2012-02-02 Pedro Alves <palves@redhat.com>
11281 Try SIGKILL first, then PTRACE_KILL.
11282 * linux-low.c (linux_kill_one_lwp): New.
11283 (linux_kill_one_lwp): Rename to ...
11284 (kill_one_lwp_callback): ... this. Use the new
11285 linux_kill_one_lwp.
11287 2012-02-02 Pedro Alves <palves@redhat.com>
11289 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11292 2012-01-27 Pedro Alves <palves@redhat.com>
11294 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11295 (elf_64_file_p): Make static.
11296 (linux_pid_exe_is_elf_64_file): New.
11297 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11298 Delete declarations.
11299 (linux_pid_exe_is_elf_64_file): Declare.
11300 * linux-x86-low.c (x86_arch_setup): Use
11301 linux_pid_exe_is_elf_64_file.
11303 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11305 * linux-low.c (linux_wait_for_event_1): Rename to ...
11306 (linux_wait_for_event): ... here and merge it with former
11307 linux_wait_for_event - new variable wait_ptid, use it.
11308 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11310 2012-01-23 Pedro Alves <palves@redhat.com>
11312 * server.c (main): Avoid yet another case of infinite loop while
11313 detaching/killing after a longjmp.
11315 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11318 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11320 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11322 * hostio.c (handle_readlink): New function.
11323 (handle_vFile): Call it to handle "vFile:readlink" packets.
11325 2012-01-20 Pedro Alves <palves@redhat.com>
11326 Ulrich Weigand <ulrich.weigand@linaro.org>
11328 * server.c (handle_v_requests): Only support vAttach and vRun to
11329 start multiple processes when in extended protocol mode.
11331 2012-01-17 Pedro Alves <palves@redhat.com>
11333 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11334 memalign plus mprotect to allocate the scratch buffer.
11336 2012-01-13 Pedro Alves <palves@redhat.com>
11338 * server.c (attach_inferior): Clear `cont_thread'.
11340 2012-01-13 Pedro Alves <palves@redhat.com>
11342 * server.c (main): Avoid infinite loop while detaching/killing
11345 2012-01-09 Doug Evans <dje@google.com>
11347 * server.c (start_inferior): Set last_ptid in --wrapper case.
11349 2012-01-06 Yao Qi <yao@codesourcery.com>
11351 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11353 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11355 2012-01-04 Yao Qi <yao@codesourcery.com>
11357 * tracepoint.c (cmd_qtdp): Print debug message
11358 for static tracepoint.
11360 2012-01-04 Yao Qi <yao@codesourcery.com>
11362 * tracepoint.c (trace_vdebug): Differentiate debug message
11363 between gdbserver and IPA.
11365 2012-01-03 Yao Qi <yao@codesourcery.com>
11367 * tracepoint.c (tracepoint_was_hit): Don't collect for
11370 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11372 * terminal.h: Reformat copyright header.
11374 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11376 * server.c (gdbserver_version): Update copyright year.
11377 * gdbreplay.c (gdbreplay_version): Likewise.
11379 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11381 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11384 2011-12-18 Hui Zhu <teawater@gmail.com>
11385 * linux-low.c (linux_create_inferior): Save return value to ret.
11387 2011-12-18 Hui Zhu <teawater@gmail.com>
11389 * linux-low.c (linux_create_inferior): Save return value to ret.
11391 2011-12-16 Doug Evans <dje@google.com>
11393 * linux-low.c (linux_create_inferior): If stdio connection,
11394 redirect stdin from /dev/null, stdout to stderr.
11395 * remote-utils.c (remote_is_stdio): New static global.
11396 (remote_connection_is_stdio): New function.
11397 (remote_prepare): Handle stdio connection.
11398 (remote_open): Ditto.
11399 (remote_close): Don't close stdin for stdio connections.
11400 (read_prim,write_prim): New functions. Replace all calls to
11401 read/write to these.
11402 * server.c (main): Watch for "-" argument. Move call to
11403 remote_prepare before start_inferior.
11404 * server.h (STDIO_CONNECTION_NAME): New macro.
11405 (remote_connection_is_stdio): Declare.
11407 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11408 in debugging output.
11410 2011-12-15 Yao Qi <yao@codesourcery.com>
11412 * tracepoint.c: Include sys/syscall.h.
11413 (gdb_ust_thread): Remove preprocessor conditional.
11415 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11417 * linux-low.c (linux_detach_one_lwp): Call
11418 the_low_target.prepare_to_resume before detaching.
11420 2011-12-14 Yao Qi <yao@codesourcery.com>
11422 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11425 2011-12-14 Yao Qi <yao@codesourcery.com>
11427 * i386-low.c (i386_low_stopped_data_address): Initialize local
11428 variable `control'.
11430 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11434 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11435 DR_CONTROL unless necessary. Extend comments.
11436 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11437 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11439 2011-12-13 Yao Qi <yao@codesourcery.com>
11441 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11443 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11445 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11447 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11448 Print new debug message for such case.
11450 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11452 Fix overlapping memcpy.
11453 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11454 the read_inferior_memory transfer.
11455 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11456 write_inferior_memory transfer.
11457 (set_fast_tracepoint_jump): New variable buf. Use it for the
11458 read_inferior_memory and write_inferior_memory transfers.
11459 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11460 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11461 Use it for the write_inferior_memory transfer.
11462 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11465 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11467 * linux-low.c (fetch_register, store_register): Make code
11468 consistent, fix formatting.
11470 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11472 * linux-low.c (usr_store_inferior_registers): Factor out code
11473 to handle individual registers into...
11474 (store_register): ... this new function.
11476 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11478 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11479 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11480 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11481 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11482 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11483 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11484 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11485 (srv_xmlfiles): Add new XML files.
11487 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11489 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11490 (init_registers_s390_linux32v1): Add prototype.
11491 (init_registers_s390_linux32v2): Likewise.
11492 (init_registers_s390_linux64v1): Likewise.
11493 (init_registers_s390_linux64v2): Likewise.
11494 (init_registers_s390x_linux64v1): Likewise.
11495 (init_registers_s390x_linux64v2): Likewise.
11496 (s390_num_regs): Increment to 52.
11497 (s390_regmap): Add orig_r2 register.
11498 (s390_num_regs_3264): Increment to 68.
11499 (s390_regmap_3264): Add orig_r2 register.
11500 (s390_collect_ptrace_register): Handle orig_r2 register.
11501 (s390_supply_ptrace_register): Likewise.
11502 (s390_fill_last_break): New function.
11503 (s390_store_last_break): Likewise.
11504 (s390_fill_system_call): New function.
11505 (s390_store_system_call): Likewise.
11506 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11508 (s390_check_regset): New function.
11509 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11510 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11511 Update target_regsets for available register sets.
11513 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11514 Jan Kratochvil <jan.kratochvil@redhat.com>
11516 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11517 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11519 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11520 * linux-low.h (struct process_info_private): New member r_debug.
11521 * server.c (handle_qxfer_libraries): Call
11522 the_target->qxfer_libraries_svr4.
11523 (handle_qxfer_libraries_svr4): New function.
11524 (qxfer_packets): New entry "libraries-svr4".
11525 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11526 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11527 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11528 PACKET_qXfer_libraries_svr4.
11530 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11532 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11533 PSW address/mask between 8-byte and 16-byte formats.
11534 (s390_supply_ptrace_register): Likewise.
11535 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11536 basic addressing mode bit.
11538 2011-11-24 Stan Shebs <stan@codesourcery.com>
11540 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11542 2011-11-17 Stan Shebs <stan@codesourcery.com>
11544 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11545 (tracing_start_time): New global.
11546 (tracing_stop_time): New global.
11547 (tracing_user_name): New global.
11548 (tracing_notes): New global.
11549 (tracing_stop_note): New global.
11550 (cmd_qtstart): Set traceframe_usage, start_time.
11551 (stop_tracing): Set stop_time.
11552 (cmd_qtstatus): Report additional status.
11553 (cmd_qtp): New function.
11554 (handle_tracepoint_query): Call it.
11555 (cmd_qtnotes): New function.
11556 (handle_tracepoint_general_set): Call it.
11557 (get_timestamp): Rename from tsv_get_timestamp.
11559 2011-11-14 Stan Shebs <stan@codesourcery.com>
11560 Kwok Cheung Yeung <kcy@codesourcery.com>
11562 * linux-x86-low.c (small_jump_insn): New.
11563 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11564 trampoline and error message, build a trampoline and issue a small
11565 jump instruction to it.
11566 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11567 trampoline and error message.
11568 (x86_get_min_fast_tracepoint_insn_len): New.
11569 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11570 * linux-low.h (struct linux_target_ops): Add arguments to
11571 install_fast_tracepoint_jump_pad operation, add new operation.
11572 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11574 (linux_get_min_fast_tracepoint_insn_len): New function.
11575 (linux_target_op): Add new operation.
11576 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11577 (gdb_trampoline_buffer_end): Ditto.
11578 (gdb_trampoline_buffer_error): Ditto.
11579 (struct ipa_sym_addresses): Add fields for new IPA variables.
11580 (symbol_list): Add entries for new IPA variables.
11581 (struct tracepoint): Add fields to hold the address range of the
11582 trampoline used by the tracepoint.
11583 (trampoline_buffer_head): New static variable.
11584 (trampoline_buffer_tail): Ditto.
11585 (claim_trampoline_space): New function.
11586 (have_fast_tracepoint_trampoline_buffer): New function.
11587 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11589 (install_fast_tracepoint): Ditto, also add error buffer argument.
11590 (cmd_qtminftpilen): New function.
11591 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11592 (fast_tracepoint_from_trampoline_address): New function.
11593 (fast_tracepoint_collecting): Handle trampoline as part of jump
11595 (set_trampoline_buffer_space): New function.
11596 (initialize_tracepoint): Initialize new IPA variables.
11597 * target.h (struct target_ops): Add arguments to
11598 install_fast_tracepoint_jump_pad operation, add new
11599 get_min_fast_tracepoint_insn_len operation.
11600 (target_get_min_fast_tracepoint_insn_len): New.
11601 (install_fast_tracepoint_jump_pad): Add arguments.
11602 * server.h (IPA_BUFSIZ): Define.
11603 * linux-i386-ipa.c: Include extra header files.
11604 (initialize_fast_tracepoint_trampoline_buffer): New function.
11605 (initialize_low_tracepoint): Call it.
11606 * server.h (set_trampoline_buffer_space): Declare.
11607 (claim_trampoline_space): Ditto.
11608 (have_fast_tracepoint_trampoline_buffer): Ditto.
11610 2011-11-14 Yao Qi <yao@codesourcery.com>
11612 * server.c (handle_query): Handle InstallInTrace for qSupported.
11613 * tracepoint.c (add_tracepoint): Sort list.
11614 (install_tracepoint, download_tracepoint): New.
11615 (cmd_qtdp): Call them to install and download tracepoints.
11616 (sort_tracepoints): Removed.
11617 (cmd_qtstart): Update.
11619 2011-11-14 Yao Qi <yao@codesourcery.com>
11621 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11622 * mem-break.h: Declare.
11623 * tracepoint.c (cmd_qtstart): Move some code to ...
11624 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11626 (download_tracepoints): Move some code to ...
11627 (download_tracepoint_1): ... here. New.
11629 2011-11-08 Yao Qi <yao@codesourcery.com>
11631 * remote-utils.c (relocate_instruction): A comment fix.
11633 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11635 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11636 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11637 dr_status_mirror and dr_control_mirror from debug_reg_state.
11638 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11639 (i386_initial_stuff): Remove use of deleted globals.
11640 (i386_get_thread_context, i386_set_thread_context,
11641 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11642 from debug_reg_state.
11644 2011-11-05 Yao Qi <yao@codesourcery.com>
11646 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11647 address as TPOINT's.
11649 2011-11-02 Stan Shebs <stan@codesourcery.com>
11651 * tracepoint.c (agent_mem_read_string): New function.
11652 (eval_agent_expr): Call it for tracenz.
11653 * server.c (handle_query): Report support for tracenz.
11655 2011-11-02 Yao Qi <yao@codesourcery.com>
11657 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11659 2011-11-02 Yao Qi <yao@codesourcery.com>
11661 * target.h: Fix a typo in comment.
11663 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11665 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11666 clobber the breakpoints' shadows with fast tracepoint jumps.
11667 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11668 * target.c (write_inferior_memory): Also pass MYADDR down to
11671 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11673 * configure.ac: Check support for personality routine.
11674 * configure: Regenerate.
11675 * config.in: Likewise.
11676 * linux-low.c: Include <sys/personality.h>.
11677 Define ADDR_NO_RANDOMIZE if necessary.
11678 (linux_create_inferior): Disable address space randomization when
11679 forking inferior, if requested.
11680 (linux_supports_disable_randomization): New function.
11681 (linux_target_ops): Install it.
11682 * server.h (disable_randomization): Declare.
11683 * server.c (disable_randomization): New global variable.
11684 (handle_general_set): Handle QDisableRandomization.
11685 (handle_query): Likewise for qSupported.
11686 (main): Support --disable-randomization and --no-disable-randomization
11687 command line arguments.
11688 * target.h (struct target_ops): Add supports_disable_randomization.
11689 (target_supports_disable_randomization): New macro.
11691 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11693 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11695 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11696 [!PT_GETDSBT] (target_loadmap): New definition.
11697 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11698 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11699 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11700 and PT_GETDSBT to LINUX_LOADMAP.
11701 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11702 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11704 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11706 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11707 (arm_linux_hwbp_cap): New static variable.
11708 (arm_linux_get_hwbp_cap): Replace by ...
11709 (arm_linux_init_hwbp_cap): ... this new function.
11710 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11711 (arm_linux_get_hw_watchpoint_count): Likewise.
11712 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11713 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11714 (arm_prepare_to_resume): Use perror_with_name instead of error.
11716 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11718 * linux-arm-low.c: Include <signal.h>.
11719 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11720 (struct arm_linux_hwbp_cap): New data type.
11721 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11722 (struct arm_linux_hw_breakpoint): New data type.
11723 (MAX_BPTS, MAX_WPTS): Define.
11724 (struct arch_process_info, struct arch_lwp_info): New data types.
11725 (arm_linux_get_hwbp_cap): New function.
11726 (arm_linux_get_hw_breakpoint_count): Likewise.
11727 (arm_linux_get_hw_watchpoint_count): Likewise.
11728 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11729 (arm_hwbp_control_initialize): Likewise.
11730 (arm_hwbp_control_is_enabled): Likewise.
11731 (arm_hwbp_control_is_initialized): Likewise.
11732 (arm_hwbp_control_disable): Likewise.
11733 (arm_linux_hw_breakpoint_equal): Likewise.
11734 (arm_linux_hw_point_initialize): Likewise.
11735 (struct update_registers_data): New data structure.
11736 (update_registers_callback: New function.
11737 (arm_insert_point): Likewise.
11738 (arm_remove_point): Likewise.
11739 (arm_stopped_by_watchpoint): Likewise.
11740 (arm_stopped_data_address): Likewise.
11741 (arm_new_process): Likewise.
11742 (arm_new_thread): Likewise.
11743 (arm_prepare_to_resume): Likewise.
11744 (the_low_target): Register arm_insert_point, arm_remove_point,
11745 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11746 arm_new_thread, and arm_prepare_to_resume.
11748 2011-09-15 Stan Shebs <stan@codesourcery.com>
11750 * server.h (struct emit_ops): Add compare-goto fields.
11751 * tracepoint.c (gdb_agent_op_sizes): New table.
11752 (emit_eq_goto): New function.
11753 (emit_ne_goto): New function.
11754 (emit_lt_goto): New function.
11755 (emit_le_goto): New function.
11756 (emit_gt_goto): New function.
11757 (emit_ge_goto): New function.
11758 (is_goto_target): New function.
11759 (compile_bytecodes): Recognize special cases of compare-goto
11760 combinations and call specialized emitters for them.
11761 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11762 (amd64_emit_ne_goto): New function.
11763 (amd64_emit_lt_goto): New function.
11764 (amd64_emit_le_goto): New function.
11765 (amd64_emit_gt_goto): New function.
11766 (amd64_emit_ge_goto): New function.
11767 (amd64_emit_ops): Add the new functions.
11768 (i386_emit_eq_goto): New function.
11769 (i386_emit_ne_goto): New function.
11770 (i386_emit_lt_goto): New function.
11771 (i386_emit_le_goto): New function.
11772 (i386_emit_gt_goto): New function.
11773 (i386_emit_ge_goto): New function.
11774 (i386_emit_ops): Add the new functions.
11776 2011-09-08 Stan Shebs <stan@codesourcery.com>
11778 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11779 (i386_emit_epilogue): Restore %ebx.
11781 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11783 * server.c (step_thread): Remove definition.
11784 (process_serial_event): Don't handle Hs.
11785 * server.h (step_thread): Remove declaration.
11786 * target.c (set_desired_inferior): Remove use of step_thread.
11788 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11790 * linux-low.c: Include linux-procfs.h.
11791 (linux_attach_lwp_1): Update comments.
11792 (linux_attach): Scan for existing threads when attaching to a
11793 process that is the tgid.
11794 * Makefile.in: Update dependencies.
11796 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11798 * configure.srv: Add linux-procfs.o dependencies.
11800 2011-08-14 Yao Qi <yao@codesourcery.com>
11802 * target.h (struct target_ops): Fix indent.
11803 * win32-low.c (win32_target_ops): Fix comment.
11805 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11806 Yao Qi <yao@codesourcery.com>
11808 * Makefile.in (clean): Remove tic6x-*.c files.
11809 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11810 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11811 (tic6x-c64xp-linux.c): Likewise.
11812 * configure.srv: Add support for tic6x-*-uclinux.
11813 * linux-tic6x-low.c: New.
11814 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11816 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11817 Yao Qi <yao@codesourcery.com>
11819 * target.h (struct target_ops): Add read_loadmap.
11820 * linux-low.c (struct target_loadseg): New type.
11821 (struct target_loadmap): New type.
11822 (linux_read_loadmap): New function.
11823 (linux_target_ops): Add linux_read_loadmap.
11824 * server.c (handle_query): Support qXfer:fdpic:read packet.
11825 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11828 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11830 * win32-low.c: Include <stdint.h>.
11832 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11834 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11835 to the inferior here.
11836 (i386_remove_aligned_watchpoint): Ditto.
11837 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11838 fit part of the watchpoint in the debug registers.
11839 (i386_update_inferior_debug_regs): New.
11840 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11841 registers, and only update the inferior on success.
11842 (i386_low_remove_watchpoint): Ditto.
11844 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11846 * linux-low.c (compare_ints, unique, list_threads, show_process,
11847 linux_core_of_thread): Delete.
11848 (linux_target_ops): Change linux_core_of_thread to
11849 linux_common_core_of_thread.
11850 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11851 * utils.c (malloc_failure): Change type of argument.
11852 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11853 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11854 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11855 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11856 (IPA_OBJS): Add common-utils-ipa.o.
11857 (ptid_h, linux_osdata_h): New macros.
11858 (server_h): Add common/common-utils.h, common/xml-utils.h,
11859 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11861 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11862 ptid.o, buffer.o): New rules.
11863 (linux-low.o): Add common/linux-osdata.h as a dependency.
11864 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11865 * configure.ac: Add AC_HEADER_DIRENT check.
11866 * config.in: Regenerate.
11867 * configure: Regenerate.
11868 * remote-utils.c (xml_escape_text): Delete.
11869 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11870 buffer_xml_printf): Move to common/buffer.c.
11871 * server.c (main): Remove call to initialize_inferiors.
11872 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11873 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11874 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11875 internal_error, gdb_assert, gdb_assert_fail): Delete.
11876 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11877 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11879 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11880 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11881 initialize_inferiors): Delete.
11883 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11885 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11888 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11890 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11892 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11894 2011-05-26 Yao Qi <yao@codesourcery.com>
11896 * Makefile.in (thread-db.o): Track dependence to
11897 common/gdb_thread_db.h.
11898 * thread-db.c: include gdb_thread_db.h from right place.
11900 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11902 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11903 __FILE__ and __LINE__ to internal_error.
11905 2011-05-13 Doug Evans <dje@google.com>
11907 * thread-db.c (try_thread_db_load_from_sdir): New function.
11908 (try_thread_db_load_from_dir): New function.
11909 (thread_db_load_search): Handle $sdir, ignore $pdir.
11910 Remove trying of system directories if search of
11911 libthread-db-search-path fails, that is now done via $sdir.
11913 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11915 * server.c (handle_query): Add EnableDisableTracepoints to the list
11916 of supported features.
11917 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11919 (cmd_qtenable_disable): New.
11920 (cmd_qtstart): Install tracepoints even if disabled.
11921 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11922 receiving a QTEnable or QTDisable packet.
11923 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11924 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11926 (gdb_probe): Skip data collection if static tracepoint is disabled.
11928 2011-05-10 Doug Evans <dje@google.com>
11930 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11932 2011-05-04 Doug Evans <dje@google.com>
11934 * linux-low.c (linux_join): Skip process lookup.
11935 * spu-low.c (spu_join): Ditto.
11936 * server.c (join_inferiors_callback): Delete.
11937 (process_serial_event): For 'D' packet (detach) call join_inferior
11940 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11942 * README: Don't mention xscale*-*-linux*.
11943 * configure.srv (xscale*-*-linux*): Don't handle target.
11945 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11947 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11949 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11950 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11951 (i386_emit_void_call_2): Likewise.
11953 2011-04-26 Yao Qi <yao@codesourcery.com>
11955 * linux-low.c: Move common macros to linux-ptrace.h.
11956 Include linux-ptrace.h.
11957 * Makefile.in (linux_ptrace_h): New.
11958 (linux-low.o): Depends on linux-ptrace.h.
11960 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11962 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11963 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11964 (remote_prepare): New function with most of the TCP code from ...
11965 (remote_open): ... here. Detect PORT here unconditionally. Move also
11966 setting transport_is_reliable.
11967 * server.c (run_once): New variable.
11968 (gdbserver_usage): Document it.
11969 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11970 the first run if RUN_ONCE.
11971 * server.h (run_once, remote_prepare): New declarations.
11973 2011-04-19 Tom Tromey <tromey@redhat.com>
11975 * win32-low.c (handle_load_dll): Remove duplicate "the".
11977 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11979 Remove support for old Cygwin 1.5 versions.
11980 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11981 function to avoid warning.
11982 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11985 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11987 * gdbserver/server.h (Macro _): Define it if not available.
11989 2011-03-14 Michael Snyder <msnyder@vmware.com>
11991 * hostio.c (handle_close): Remove unnecessary null test.
11993 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11995 * Makefile.in (maintainer-clean realclean distclean): Remove
11996 "make ... subdir_do" command.
11998 2011-03-10 Michael Snyder <msnyder@vmware.com>
12000 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12002 * server.c (handle_v_run): Free alloced buffer on early return.
12004 2011-03-09 Yao Qi <yao@codesourcery.com>
12007 2011-03-04 Yao Qi <yao@codesourcery.com>
12009 * Makefile.in: Remove GNU make feature --directory.
12011 2011-03-05 Yao Qi <yao@codesourcery.com>
12013 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12014 (subdir_do): New make target. Copied from gdb/Makefile.
12015 (maintainer-clean, realclean, distclean, clean): Call corresponding
12016 make targets in common/Makefile.
12018 2011-02-11 Yao Qi <yao@codesourcery.com>
12020 * configure.ac: Call AC_PROG_RANLIB.
12021 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12022 * configure: Regenerate.
12024 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12026 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12028 2011-03-06 Yao Qi <yao@codesourcery.com>
12030 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12032 2011-03-05 Yao Qi <yao@codesourcery.com>
12034 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12035 (subdir_do): New make target. Copied from gdb/Makefile.
12036 (maintainer-clean, realclean, distclean, clean): Call corresponding
12037 make targets in common/Makefile.
12039 2011-03-04 Yao Qi <yao@codesourcery.com>
12041 * Makefile.in: Remove GNU make feature --directory.
12043 2011-03-04 Michael Snyder <msnyder@vmware.com>
12045 * server.c (queue_stop_reply): Call xmalloc not malloc.
12047 2011-03-02 Michael Snyder <msnyder@vmware.com>
12049 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12051 2011-02-28 Michael Snyder <msnyder@vmware.com>
12053 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12054 (cmd_qtframe): Ditto.
12055 (cmd_qtbuffer): Ditto.
12056 (cmd_bigqtbuffer): Ditto.
12058 * utils.c (decimal2str): Initialize 'width' to nine, then
12059 don't mess with it.
12061 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12063 * hostio.c (require_data): Free *data, not data.
12065 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12067 * hostio.c (require_data): Use free, not xfree.
12069 2011-02-27 Michael Snyder <msnyder@vmware.com>
12071 * server.c (handle_query): Discard unused value.
12073 * hostio.c (require_data): Free malloc memory before returning
12076 2011-02-26 Michael Snyder <msnyder@vmware.com>
12078 * linux-low.c (list_threads): Call closedir for dirent.
12080 2011-02-27 Michael Snyder <msnyder@vmware.com>
12082 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12083 a case statement falls through.
12085 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12087 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12090 2011-02-26 Michael Snyder <msnyder@vmware.com>
12092 * utils.c (decimal2str): Eliminate dead code and dead param.
12093 (pulongest): Drop dead param from call to decimal2str.
12096 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12098 Revert the following patch (not approved yet):
12099 2011-02-21 Hui Zhu <teawater@gmail.com>
12100 * tracepoint.c (tp_printf): New function.
12101 (eval_agent_expr): Handle gdb_agent_op_printf.
12103 2011-02-21 Hui Zhu <teawater@gmail.com>
12105 * tracepoint.c (tp_printf): New function.
12106 (eval_agent_expr): Handle gdb_agent_op_printf.
12108 2011-02-18 Tom Tromey <tromey@redhat.com>
12110 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12111 (tracepoint.o): Likewise.
12112 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12113 (gdb_agent_op_names): Likewise.
12115 2011-02-18 Tom Tromey <tromey@redhat.com>
12117 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12118 gdb_agent_op_rot>: New constants.
12119 (gdb_agent_op_names): Add pick and roll.
12120 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12123 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12125 * aclocal.m4: Regenerated with aclocal-1.11.1.
12127 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12129 * server.c (handle_qxfer_traceframe_info): New.
12130 (qxfer_packets): Register "traceframe-info".
12131 (handle_query): Report support for qXfer:traceframe-info:read+.
12132 * tracepoint.c (match_blocktype): New.
12133 (traceframe_find_block_type): Rename to ...
12134 (traceframe_walk_blocks): ... this. Add callback filter argument,
12136 (traceframe_find_block_type): New, reimplemented on top of
12137 traceframe_walk_blocks.
12138 (build_traceframe_info_xml): New.
12139 (traceframe_read_info): New.
12140 * server.h (traceframe_read_info): Declare.
12142 2011-02-11 Yao Qi <yao@codesourcery.com>
12144 * configure.ac: Call AC_PROG_RANLIB.
12145 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12146 * configure: Regenerate.
12148 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12150 * server.c (gdb_read_memory): Change return semantics to allow
12152 (handle_search_memory_1): Adjust.
12153 (process_serial_event) <'m' packet>: Handle partial transfers.
12154 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12156 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12158 * regcache.c (init_register_cache): Initialize
12159 regcache->register_status.
12160 (free_register_cache): Release regcache->register_status.
12161 (regcache_cpy): Copy register_status.
12162 (registers_to_string): Print 'x's for unavailable registers.
12163 (supply_register): Mark the register's status valid or
12164 unavailable, depending on whether a buffer was passed in or not.
12165 (supply_register_zeroed): New.
12166 (supply_regblock): Mark the registers' status valid or
12167 unavailable, depending on whether a buffer was passed in or not.
12168 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12169 (struct regcache): New `register_status' field.
12170 (supply_register_zeroed): Declare.
12171 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12172 supply_register_zeroed, rather than passing a NULL buffer to
12174 * tracepoint.c (fetch_traceframe_registers): Update comment.
12176 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12178 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12181 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12183 * server.h (decode_xfer_write): Change prototype.
12184 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12185 and don't extract the annex here.
12186 * server.c (decode_xfer_read): Remove `annex' parameter,
12187 and don't extract the annex here.
12188 (decode_xfer): New.
12189 (struct qxfer): New.
12190 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12191 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12192 (handle_qxfer_statictrace): New functions, abstracted out from
12193 handle_query, and made to use the struct qxfer interface.
12194 (handle_threads_qxfer_proper): Rename to ...
12195 (handle_qxfer_threads_proper): ... this.
12196 (handle_threads_qxfer): Rename to ...
12197 (handle_qxfer_threads): ... this. Adjust.
12198 (qxfer_packets): New array.
12199 (handle_qxfer): New function.
12200 (handle_query): Use handle_qxfer.
12202 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12204 * gdbreplay.c: Shorten lines of >= 80 columns.
12205 * linux-low.c: Ditto.
12206 * linux-ppc-low.c: Ditto.
12207 * linux-s390-low.c: Ditto.
12208 * linux-sparc-low.c: Ditto.
12209 * linux-x86-low.c: Ditto.
12210 * linux-xtensa-low.c: Ditto.
12211 * mem-break.c: Ditto.
12212 * nto-low.c: Ditto.
12213 * regcache.h: Ditto.
12214 * remote-utils.c: Ditto.
12217 * thread-db.c: Ditto.
12218 * tracepoint.c: Ditto.
12220 * win32-low.h: Ditto.
12222 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12224 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12227 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12229 * server.c (gdbserver_version): Update copyright year in version
12231 * gdbreplay.c (gdbreplay_version): Ditto.
12233 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12235 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12236 * linux-bfin-low.c: New file.
12237 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12238 PT_DATA_ADDR for BFIN targets.
12239 * Makefile.in (SFILES): Add linux-bfin-low.c.
12240 (clean): Remove reg-bfin.c.
12241 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12242 * README: Mention supported Blackfin targets.
12244 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12246 * .gitignore: New file.
12248 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12250 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12252 2010-10-22 Jie Zhang <jie@codesourcery.com>
12254 * Makefile.in: Add FLAGS_TO_PASS variable.
12255 (install): Remove dependency of install-only and recursively
12256 invoke make for install-only.
12258 2010-10-04 Doug Evans <dje@google.com>
12260 * Makefile.in (uninstall): Use $(DESTDIR).
12262 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12266 * linux-x86-low.c (compat_siginfo_from_siginfo)
12267 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12268 si_code is < 0. Check for si_code == SI_TIMER before checking for
12271 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12273 * lynx-i386-low.c: New file.
12274 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12276 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12278 * lynx-low.c (ptrace_request_to_str): Remove handling for
12279 request values that have been removed in LynxOS 5.x.
12281 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12283 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12286 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12288 * configure.ac: Add --enable-inprocess-agent option.
12289 * configure: Rebuilt.
12291 2010-09-06 Yao Qi <yao@codesourcery.com>
12293 * linux-low.c (linux_kill): Remove unused variable.
12294 (linux_stabilize_threads): Likewise.
12295 * server.c (start_inferior): Likewise.
12296 (queue_stop_reply_callback): Likewise.
12297 * tracepoint.c (do_action_at_tracepoint): Likewise.
12299 2010-09-06 Yao Qi <yao@codesourcery.com>
12301 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12304 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12306 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12308 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12310 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12313 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12315 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12316 gdbserver/lynx-ppc-low.c: New files.
12317 * Makefile.in (lynx_low_h): New variable.
12318 (lynx-low.o, lynx-ppc-low.o): New rules.
12319 * configure.ac: On LynxOS, link with -lnetinet.
12320 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12321 * configure: regenerate.
12323 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12325 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12326 * configure.ac: Add check for vasprintf and vsnprintf.
12327 * configure, config.in: Regenerate.
12328 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12330 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12332 * gdbreplay.c: Move include of alloca.h up, next to include of
12334 * server.h: Add include of malloc.h.
12335 * mem-break.c: Remove include of malloc.h.
12336 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12338 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12340 * Makefile.in (memmem.o): Build with -Wno-error.
12342 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12344 * utils.c (xsnprintf): Make non-static.
12345 * server.h: Add xsnprintf declaration.
12346 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12347 replace calls to snprintf by calls to xsnprintf throughout.
12349 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12351 * configure.ac: Add configure check for alloca.
12352 * configure, config.in: Regenerate.
12353 * server.h: Include alloca.h if it exists.
12354 * gdbreplay.c: Include alloca.h if it exists.
12356 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12358 * linux-low.c (__SIGRTMIN): Define if not already defined.
12359 (linux_create_inferior): Check for __ANDROID__ rather than
12361 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12362 are already deferred.
12363 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12364 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12365 stopped and already has a pending signal to report.
12366 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12367 a pending signal to report or is moving out of a jump pad.
12368 (linux_init_signals): Check for __ANDROID__ rather than
12371 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12373 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12374 debug_threads check. Avoid a linear search when not doing debug
12377 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12379 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12380 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12381 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12382 (process_event): Change local fd's type to gdb_fildes_t.
12383 (create_file_handler): Adjust prototype.
12384 (delete_file_handler): Adjust prototype.
12385 (handle_file_event): Adjust prototype. Use pfildes.
12386 (create_file_event): Adjsut prototype.
12387 * remote-utils.c (remote_desc, listen_desc): Change type to
12389 * server.h: New gdb_fildes_t typedef.
12390 [USE_WIN32API]: Include winsock2.h.
12391 (delete_file_handler, add_file_handler): Adjust prototypes.
12392 (pfildes): Declare.
12393 * utils.c (pfildes): New.
12395 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12397 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12398 * configure: Regenerate.
12400 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12402 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12403 (linux_done_accessing_memory): ... this.
12404 (linux_target_ops): Adjust.
12405 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12406 * nto-low.c (nto_target_ops): Adjust comment.
12407 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12408 * spu-low.c (spu_target_ops): Adjust comment.
12409 * target.h (target_ops): Rename unprepare_to_access_memory field
12410 to done_accessing_memory.
12411 (unprepare_to_access_memory): Rename to ...
12412 (done_accessing_memory): ... this.
12414 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12416 * linux-low.c (linux_prepare_to_access_memory): New.
12417 (linux_unprepare_to_access_memory): New.
12418 (linux_target_ops): Install them.
12419 * server.c (read_memory): Rename to ...
12420 (gdb_read_memory): ... this. Use
12421 prepare_to_access_memory/prepare_to_access_memory.
12422 (write_memory): Rename to ...
12423 (gdb_write_memory): ... this. Use
12424 prepare_to_access_memory/prepare_to_access_memory.
12425 (handle_search_memory_1): Adjust.
12426 (process_serial_event): Adjust.
12427 * target.h (struct target_ops): New fields
12428 prepare_to_access_memory and unprepare_to_access_memory.
12429 (prepare_to_access_memory, unprepare_to_access_memory): New.
12430 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12431 prepare_to_access_memory/prepare_to_access_memory.
12432 * nto-low.c (nto_target_ops): Adjust.
12433 * spu-low.c (spu_target_ops): Adjust.
12434 * win32-low.c (win32_target_ops): Adjust.
12436 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12438 * Makefile.in (WARN_CFLAGS): Get it from configure.
12439 (WERROR_CFLAGS): New.
12440 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12441 * configure.ac: Introduce --enable-werror, which adds -Werror to
12442 the compiler command line. Enabled by default. Disable with
12443 --disable-werror. Add -Wdeclaration-after-statement
12444 Wpointer-arith and -Wformat-nonliteral to warning flags.
12445 * configure: Regenerate.
12447 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12449 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12451 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12453 * gdbreplay.c (remote_error): New.
12455 (expect): Use gdbchar. Check for error reading from GDB.
12456 Clarify sync error output.
12457 (play): Check for errors writing to GDB.
12458 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12459 * remote-utils.c (getpkt): Check for errors writing to the remote
12462 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12464 * linux-low.c (linux_wait_1): Move non-debugging code out of
12465 `debug_threads' control.
12467 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12469 * linux-low.c (linux_wait_1): Don't set last_status here.
12470 * server.c (push_event, queue_stop_reply_callback): Assert we're
12471 not pushing a TARGET_WAITKIND_IGNORE event.
12472 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12473 (myresume, handle_target_event): Set the thread's last_resume_kind
12474 and last_status from the target returned status.
12476 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12480 * linux-x86-low.c (update_debug_registers_callback): New.
12481 (i386_dr_low_set_addr): Use it.
12482 (i386_dr_low_get_addr): New.
12483 (i386_dr_low_set_control): Use update_debug_registers_callback.
12484 (i386_dr_low_get_control): New.
12485 (i386_dr_low_get_status): Adjust.
12486 * linux-low.c (linux_stop_lwp): New.
12487 * linux-low.h (linux_stop_lwp): Declare.
12489 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12490 argument instead of a i386_debug_reg_state.
12491 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12492 a i386_debug_reg_state.
12493 (i386_insert_aligned_watchpoint): Adjust.
12494 (i386_remove_aligned_watchpoint): Adjust.
12495 (i386_low_stopped_data_address): Read the debug registers from the
12496 inferior instead of from the mirrors.
12497 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12498 (i386_dr_low_get_addr): Declare.
12499 (i386_dr_low_get_control): Declare.
12500 (i386_dr_low_get_status): Change prototype.
12502 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12503 (i386_dr_low_get_addr): New.
12504 (i386_dr_low_get_control): New.
12505 (i386_dr_low_get_status): Adjust prototype. Return
12507 (i386_initial_stuff): Clear dr_status_mirror and
12509 (i386_get_thread_context): Adjust.
12510 (i386_set_thread_context): Adjust.
12511 (i386_thread_added): Adjust.
12513 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12515 * linux-low.h (linux_thread_area): Delete declaration.
12517 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12519 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12520 after its termination.
12522 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12524 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12525 (gdb_wants_all_stopped): Delete.
12526 (linux_wait_1): Don't call them.
12527 * server.c (handle_v_cont): Tag all threads as want-stopped.
12528 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12529 stopped as "client-wants-stopped".
12531 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12533 * Makefile.in (signals_h): New.
12534 (server_h): Depend on it.
12535 (server.o): Don't depend on $(signals_def).
12536 (signals.o): Depend on $(signals_def).
12538 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12540 * Makefile.in (signals_def): New.
12541 (server_h): Append include/gdb/signals.h and signals_def.
12542 (server.o): Append signals_def.
12544 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12546 * server.c (handle_target_event): Use target_signal_to_host for
12547 resume_info.sig initialization.
12548 * target.h (struct thread_resume) <sig>: New comment.
12550 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12552 * server.c (handle_query): strcpy() the returned string from paddress()
12553 instead of sprintf().
12554 * utils.c (paddress): Return phex_nz().
12556 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12558 * server.c (handle_v_cont): Call mourn_inferior if process
12560 (myresume): Likewise.
12562 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12564 Static tracepoints, and integration with UST.
12566 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12567 * mem-break.c (uninsert_all_breakpoints)
12568 (reinsert_all_breakpoints): New.
12569 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12570 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12571 (gdb_agent_ust_loaded, helper_thread_id)
12572 (gdb_agent_helper_thread_id): New macros.
12573 (struct ipa_sym_addresses): Add addr_ust_loaded,
12574 addr_helper_thread_id, addr_cmd_buf.
12575 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12576 (in_process_agent_loaded_ust): New.
12577 (write_e_ust_not_loaded): New.
12578 (maybe_write_ipa_ust_not_loaded): New.
12579 (struct collect_static_trace_data_action): New.
12580 (enum tracepoint_type) <static_tracepoint>: New.
12581 (struct tracepoint) <handle>: Mention static tracepoints.
12582 (struct static_tracepoint_ctx): New.
12583 (CMD_BUF_SIZE): New.
12584 (add_tracepoint_action): Handle static tracepoint actions.
12585 (unprobe_marker_at): New.
12586 (clear_installed_tracepoints): Handle static tracepoints.
12587 (cmd_qtdp): Handle static tracepoints.
12588 (probe_marker_at): New.
12589 (cmd_qtstart): Handle static tracepoints.
12590 (response_tracepoint): Handle static tracepoints.
12591 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12592 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12593 (get_context_regcache): Handle static tracepoints.
12594 (do_action_at_tracepoint): Handle static tracepoint actions.
12595 (traceframe_find_block_type): Handle static trace data blocks.
12596 (traceframe_read_sdata): New.
12597 (download_tracepoints): Download static tracepoint actions.
12598 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12599 (GDB_PROBE_NAME): New.
12601 (GET_UST_SYM): New.
12604 (ust_marker_to_static_tracepoint): New.
12606 (collect_ust_data_at_tracepoint): New.
12607 (gdb_ust_probe): New.
12608 (UNIX_PATH_MAX, SOCK_DIR): New.
12609 (gdb_ust_connect_sync_socket): New.
12610 (resume_thread, stop_thread): New.
12611 (run_inferior_command): New.
12612 (init_named_socket): New.
12613 (gdb_ust_socket_init): New.
12614 (cstr_to_hexstr): New.
12616 (first_marker, next_marker): New.
12617 (response_ust_marker): New.
12618 (cmd_qtfstm, cmd_qtsstm): New.
12619 (unprobe_marker_at, probe_marker_at): New.
12620 (cmd_qtstmat, gdb_ust_thread): New.
12621 (gdb_ust_init): New.
12622 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12623 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12624 (ST_REGENTRY): New.
12625 (x86_64_st_collect_regmap): New.
12626 (X86_64_NUM_ST_COLLECT_GREGS): New.
12627 (AMD64_RIP_REGNUM): New.
12628 (supply_static_tracepoint_registers): New.
12629 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12630 (ST_REGENTRY): New.
12631 (i386_st_collect_regmap): New.
12632 (i386_NUM_ST_COLLECT_GREGS): New.
12633 (supply_static_tracepoint_registers): New.
12634 * server.c (handle_query): Handle qXfer:statictrace:read.
12635 <qSupported>: Report support for StaticTracepoints, and
12636 qXfer:statictrace:read features.
12637 * server.h (traceframe_read_sdata)
12638 (supply_static_tracepoint_registers): Declare.
12639 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12640 (unpack_varlen_hex): Include in IPA build.
12641 * Makefile.in (ustlibs, ustinc): New.
12642 (IPA_OBJS): Add remote-utils-ipa.o.
12643 ($(IPA_LIB)): Link -ldl and -lpthread.
12645 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12646 * config.in, configure: Regenerate.
12648 2010-06-20 Ian Lance Taylor <iant@google.com>
12649 Pedro Alves <pedro@codesourcery.com>
12651 * linux-x86-low.c (always_true): Delete.
12652 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12653 trying to fool the compiler with always_true.
12655 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12657 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12658 conditions in gdbserver.
12660 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12662 * spu-low.c (spu_read_memory): Wrap around local store limit.
12663 (spu_write_memory): Likewise.
12665 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12667 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12668 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12670 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12672 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12673 uses with LONGEST uses.
12675 2010-06-14 Stan Shebs <stan@codesourcery.com>
12676 Pedro Alves <pedro@codesourcery.com>
12680 * linux-x86-low.c: Include limits.h.
12682 (always_true): New.
12685 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12686 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12687 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12688 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12689 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12690 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12691 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12692 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12693 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12694 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12695 (amd64_emit_void_call_2): New.
12696 (amd64_emit_ops): New.
12697 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12698 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12699 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12700 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12701 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12702 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12703 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12704 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12705 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12706 (i386_emit_stack_adjust, i386_emit_int_call_1)
12707 (i386_emit_void_call_2): New.
12708 (i386_emit_ops): New.
12709 (x86_emit_ops): New.
12710 (the_low_target): Install x86_emit_ops.
12711 * server.h (struct emit_ops): New.
12712 (get_raw_reg_func_addr): Declare.
12713 (current_insn_ptr, emit_error): Declare.
12714 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12715 (set_trace_state_variable_value): New defines.
12716 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12717 addr_get_trace_state_variable_value and
12718 addr_set_trace_state_variable_value.
12719 (symbol_list): New fields for get_raw_reg,
12720 get_trace_state_variable_value and set_trace_state_variable_value.
12721 (condfn): New typedef.
12722 (struct tracepoint): New field `compiled_cond'.
12723 (do_action_at_tracepoint): Clear compiled_cond.
12724 (get_trace_state_variable_value, set_trace_state_variable_value):
12726 (condition_true_at_tracepoint): If there's a compiled condition,
12728 (current_insn_ptr, emit_error): New globals.
12729 (struct bytecode_address): New.
12730 (get_raw_reg_func_addr): New.
12731 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12732 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12733 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12734 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12735 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12736 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12737 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12738 (compile_tracepoint_condition, compile_bytecodes): New.
12739 * target.h (emit_ops): Forward declare.
12740 (struct target_ops): New field emit_ops.
12741 (target_emit_ops): New.
12742 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12743 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12744 * linux-low.c (linux_emit_ops): New.
12745 (linux_target_ops): Install it.
12746 * linux-low.h (struct linux_target_ops): New field emit_ops.
12748 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12750 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12751 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12753 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12754 Stan Shebs <stan@codesourcery.com>
12756 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12757 (all): Depend on $(extra_libraries).
12758 (install-only): Install the IPA.
12759 (IPA_OBJS, IPA_LIB): New.
12760 (clean): Remove the IPA lib.
12761 (IPAGENT_CFLAGS): New.
12762 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12763 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12764 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12765 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12766 * configure.ac: Check for atomic builtins support in the compiler.
12767 (IPA_DEPFILES, extra_libraries): Define.
12768 * configure.srv (ipa_obj): Add description.
12769 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12770 (i[34567]86-*-linux*): Set ipa_obj.
12771 (x86_64-*-linux*): Set ipa_obj.
12772 * linux-low.c (stabilizing_threads): New.
12773 (supports_fast_tracepoints): New.
12774 (linux_detach): Stabilize threads before detaching.
12775 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12776 the lwp is either not stabilizing, or is moving out of a jump pad.
12777 (linux_fast_tracepoint_collecting): New.
12778 (maybe_move_out_of_jump_pad): New.
12779 (enqueue_one_deferred_signal): New.
12780 (dequeue_one_deferred_signal): New.
12781 (linux_wait_for_event_1): If moving out of a jump pad, defer
12782 pending signals to later.
12783 (linux_stabilize_threads): New.
12784 (linux_wait_1): Check if threads need moving out of jump pads, and
12786 (stuck_in_jump_pad_callback): New.
12787 (move_out_of_jump_pad_callback): New.
12788 (lwp_running): New.
12789 (linux_resume_one_lwp): Handle moving out of jump pads.
12790 (linux_set_resume_request): Dequeue deferred signals.
12791 (need_step_over_p): Also step over fast tracepoint jumps.
12792 (start_step_over): Also uninsert fast tracepoint jumps.
12793 (finish_step_over): Also reinsert fast tracepoint jumps.
12794 (linux_install_fast_tracepoint_jump): New.
12795 (linux_target_ops): Install linux_stabilize_threads and
12796 linux_install_fast_tracepoint_jump_pad.
12797 * linux-low.h (linux_target_ops) <get_thread_area,
12798 install_fast_tracepoint_jump_pad>: New fields.
12799 (struct lwp_info) <collecting_fast_tracepoint,
12800 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12801 (linux_get_thread_area): Declare.
12802 * linux-x86-low.c (jump_insn): New.
12803 (x86_get_thread_area): New.
12804 (append_insns): New.
12805 (push_opcode): New.
12806 (amd64_install_fast_tracepoint_jump_pad): New.
12807 (i386_install_fast_tracepoint_jump_pad): New.
12808 (x86_install_fast_tracepoint_jump_pad): New.
12809 (the_low_target): Install x86_get_thread_area and
12810 x86_install_fast_tracepoint_jump_pad.
12811 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12812 (struct fast_tracepoint_jump): New.
12813 (fast_tracepoint_jump_insn): New.
12814 (fast_tracepoint_jump_shadow): New.
12815 (find_fast_tracepoint_jump_at): New.
12816 (fast_tracepoint_jump_here): New.
12817 (delete_fast_tracepoint_jump): New.
12818 (set_fast_tracepoint_jump): New.
12819 (uninsert_fast_tracepoint_jumps_at): New.
12820 (reinsert_fast_tracepoint_jumps_at): New.
12821 (set_breakpoint_at): Use write_inferior_memory.
12822 (uninsert_raw_breakpoint): Use write_inferior_memory.
12823 (check_mem_read): Mask out fast tracepoint jumps.
12824 (check_mem_write): Mask out fast tracepoint jumps.
12825 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12826 (set_fast_tracepoint_jump): Declare.
12827 (delete_fast_tracepoint_jump)
12828 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12829 (reinsert_fast_tracepoint_jumps_at): Declare.
12830 * regcache.c: Don't compile many functions when building the
12831 in-process agent library.
12832 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12833 the register buffer in the heap.
12834 (free_register_cache): If the register buffer isn't owned by the
12835 regcache, don't free it.
12836 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12837 pre-existing register caches.
12838 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12840 (convert_ascii_to_int): : Constify `from' parameter type.
12841 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12842 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12843 the needed buffer in-place.
12844 (relocate_instruction): New.
12845 * server.c (handle_query) <qSymbols>: If the target supports
12846 tracepoints, give it a chance of looking up symbols. Report
12847 support for fast tracepoints.
12848 (handle_status): Stabilize threads.
12849 (process_serial_event): Adjust.
12850 * server.h (struct fast_tracepoint_jump): Forward declare.
12851 (struct process_info) <fast_tracepoint_jumps>: New field.
12852 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12853 (decode_X_packet, decode_M_packet): Adjust.
12854 (relocate_instruction): Declare.
12855 (in_process_agent_loaded): Declare.
12856 (tracepoint_look_up_symbols): Declare.
12857 (struct fast_tpoint_collect_status): Declare.
12858 (fast_tracepoint_collecting): Declare.
12859 (force_unlock_trace_buffer): Declare.
12860 (handle_tracepoint_bkpts): Declare.
12861 (initialize_low_tracepoint)
12862 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12863 * target.h (struct target_ops) <stabilize_threads,
12864 install_fast_tracepoint_jump_pad>: New fields.
12865 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12866 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12867 [HAVE_STDINT_H]: Include stdint.h.
12868 (trace_debug_1): Rename to ...
12869 (trace_vdebug): ... this.
12870 (trace_debug): Rename to ...
12871 (trace_debug_1): ... this. Add `level' parameter.
12872 (trace_debug): New.
12873 (ATTR_USED, ATTR_NOINLINE): New.
12874 (IP_AGENT_EXPORT): New.
12875 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12876 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12877 (about_to_request_buffer_space, trace_buffer_is_full)
12878 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12879 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12880 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12881 (traceframe_write_count, traceframes_created)
12882 (trace_state_variables)
12883 New renaming defines.
12884 (struct ipa_sym_addresses): New.
12885 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12886 (symbol_list): New.
12887 (ipa_sym_addrs): New.
12888 (all_tracepoint_symbols_looked_up): New.
12889 (in_process_agent_loaded): New.
12890 (write_e_ipa_not_loaded): New.
12891 (maybe_write_ipa_not_loaded): New.
12892 (tracepoint_look_up_symbols): New.
12893 (debug_threads) [IN_PROCESS_AGENT]: New.
12894 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12895 (UNKNOWN_SIDE_EFFECTS): New.
12896 (stop_tracing): New.
12897 (flush_trace_buffer): New.
12898 (stop_tracing_bkpt): New.
12899 (flush_trace_buffer_bkpt): New.
12900 (read_inferior_integer): New.
12901 (read_inferior_uinteger): New.
12902 (read_inferior_data_pointer): New.
12903 (write_inferior_data_pointer): New.
12904 (write_inferior_integer): New.
12905 (write_inferior_uinteger): New.
12906 (struct collect_static_trace_data_action): Delete.
12907 (enum tracepoint_type): New.
12908 (struct tracepoint) <type>: New field `type'.
12909 <actions_str, step_actions, step_actions_str>: Only include in
12911 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12912 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12913 (tracepoints): Use IP_AGENT_EXPORT.
12914 (last_tracepoint): Don't include in the IPA.
12915 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12916 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12917 (alloced_trace_state_variables): New.
12918 (trace_state_variables): Use IP_AGENT_EXPORT.
12919 (traceframe_t): Delete unused variable.
12920 (circular_trace_buffer): Don't include in the IPA.
12921 (trace_buffer_start): Delete.
12922 (struct trace_buffer_control): New.
12923 (trace_buffer_free): Delete.
12924 (struct ipa_trace_buffer_control): New.
12925 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12926 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12928 (trace_buffer_ctrl): New.
12929 (TRACE_BUFFER_CTRL_CURR): New.
12930 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12931 Reimplement as macros.
12932 (trace_buffer_wrap): Delete.
12933 (traceframe_write_count, traceframe_read_count)
12934 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12935 (struct tracepoint_hit_ctx) <type>: New field.
12936 (struct fast_tracepoint_ctx): New.
12937 (memory_barrier): New.
12939 (record_tracepoint_error): Update atomically in the IPA.
12940 (clear_inferior_trace_buffer): New.
12941 (about_to_request_buffer_space): New.
12942 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12943 updating the same buffer.
12944 (add_tracepoint): Default the tracepoint's type to trap
12945 tracepoint, and orig_size to -1.
12946 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12947 internal variables.
12948 (create_trace_state_variable): New parameter `gdb'. Handle it.
12949 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12950 (cmd_qtdp): Handle fast tracepoints.
12951 (cmd_qtdv): Adjust.
12952 (max_jump_pad_size): New.
12953 (gdb_jump_pad_head): New.
12954 (get_jump_space_head): New.
12955 (claim_jump_space): New.
12956 (sort_tracepoints): New.
12957 (MAX_JUMP_SIZE): New.
12958 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12960 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12961 support. Upload fast traceframes, and delete internal IPA
12963 (stop_tracing_handler): New.
12964 (flush_trace_buffer_handler): New.
12965 (cmd_qtstop): Upload fast tracepoints.
12966 (response_tracepoint): Handle fast tracepoints.
12967 (tracepoint_finished_step): Upload fast traceframes. Set the
12968 tracepoint hit context's tracepoint type.
12969 (handle_tracepoint_bkpts): New.
12970 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12971 type. Add comment about fast tracepoints.
12972 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12973 non-existing action_str field.
12974 (get_context_regcache): Handle fast tracepoints.
12975 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12977 (fast_tracepoint_from_jump_pad_address): New.
12978 (fast_tracepoint_from_ipa_tpoint_address): New.
12979 (collecting_t): New.
12980 (force_unlock_trace_buffer): New.
12981 (fast_tracepoint_collecting): New.
12983 (gdb_collect): New.
12984 (write_inferior_data_ptr): New.
12985 (target_tp_heap): New.
12986 (target_malloc): New.
12987 (download_agent_expr): New.
12989 (download_tracepoints): New.
12990 (download_trace_state_variables): New.
12991 (upload_fast_traceframes): New.
12992 (IPA_FIRST_TRACEFRAME): New.
12993 (IPA_NEXT_TRACEFRAME_1): New.
12994 (IPA_NEXT_TRACEFRAME): New.
12995 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12996 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12997 (gdb_jump_pad_buffer_end): New.
12998 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12999 (initialize_tracepoint): Adjust.
13000 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13001 buffer. Initialize the low module.
13002 * utils.c (PREFIX, TOOLNAME): New.
13003 (malloc_failure): Use PREFIX.
13004 (error): In the IPA, an error causes an exit.
13005 (fatal, warning): Use PREFIX.
13006 (internal_error): Use TOOLNAME.
13007 (NUMCELLS): Increase to 10.
13008 * configure, config.in: Regenerate.
13010 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13012 * server.c (handle_query) <qSupported>: Do two passes over the
13013 qSupported string to avoid nesting strtok.
13015 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13017 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13019 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13020 -Wl,--dynamic-list.
13021 * configure: Regenerate.
13022 * proc-service.list: New.
13024 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13026 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13029 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13031 * gdbreplay.c (remote_open): Check error return from socket() call by
13032 its equality to -1 not by it being negative.
13033 * remote-utils.c (remote_open): Likewise.
13035 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13037 * config.h: Regenerate.
13039 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13041 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13042 doesn't provide PTRACE_GET_THREAD_AREA.
13044 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13046 * linux-m68k-low.c: Include <asm/ptrace.h>
13047 (ps_get_thread_area): Implement.
13049 2010-05-03 Doug Evans <dje@google.com>
13051 * event-loop.c (struct callback_event): New struct.
13052 (callback_list): New global.
13053 (append_callback_event, delete_callback_event): New functions.
13054 (process_callback): New function.
13055 (start_event_loop): Call it.
13056 * remote-utils.c (NOT_SCHEDULED): Define.
13057 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13058 moved out of readchar.
13059 (readchar): Rewrite. Call reschedule before returning.
13060 (reset_readchar): New function.
13061 (remote_close): Call it.
13062 (process_remaining, reschedule): New functions.
13063 * server.h (callback_handler_func): New typedef.
13064 (append_callback_event, delete_callback_event): Declare.
13066 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13068 * proc-service.c (ps_pglobal_lookup): Use
13069 thread_db_look_up_one_symbol.
13070 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13071 parameter. Use it instead of all_symbols_looked_up.
13072 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13074 (all_symbols_looked_up): Don't declare.
13075 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13076 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13078 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13079 Set all_symbols_looked_up here.
13080 (thread_db_look_up_one_symbol): New.
13081 (thread_db_get_tls_address): Adjust.
13082 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13083 thread_db object on the heap, and tentatively set it in the
13085 (thread_db_init): Don't set all_symbols_looked_up here.
13086 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13088 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13090 * linux-low.c (linux_kill, linux_detach): Adjust.
13091 (status_pending_p_callback): Remove redundant statement. Check
13092 for !TARGET_WAITIKIND_IGNORE, instead of
13093 TARGET_WAITKIND_STOPPED.
13094 (handle_tracepoints): Make sure LWP is locked. Adjust.
13095 (linux_wait_for_event_1): Adjust.
13096 (linux_cancel_breakpoints): New.
13097 (unsuspend_one_lwp): New.
13098 (unsuspend_all_lwps): New.
13099 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13100 (send_sigstop_callback): Change return type to int, add new
13101 `except' parameter and handle it.
13102 (suspend_and_send_sigstop_callback): New.
13103 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13104 pass them down. If SUSPEND, also increment the lwp's suspend
13106 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13107 (need_step_over_p): Don't consider suspended LWPs.
13108 (start_step_over): Adjust.
13109 (proceed_one_lwp): Change return type to int, add new `except'
13110 parameter and handle it.
13111 (unsuspend_and_proceed_one_lwp): New.
13112 (proceed_all_lwps): Use find_inferior instead of
13114 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13115 also decrement the suspend count of LWPs. Pass `except' down,
13116 instead of hacking its suspend count.
13117 (linux_pause_all): Add `freeze' parameter. Adjust.
13118 (linux_unpause_all): New.
13119 (linux_target_ops): Install linux_unpause_all.
13120 * server.c (handle_status): Adjust.
13121 * target.h (struct target_ops): New fields `unpause_all' and
13122 `cancel_breakpoints'. Add new parameter to `pause_all'.
13123 (pause_all): Add new `freeze' parameter.
13124 (unpause_all): New.
13125 (cancel_breakpoints): New.
13126 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13127 cancel breakpoints.
13128 (cmd_qtstart): Pause threads.
13129 (stop_tracing): Pause threads, and cancel breakpoints.
13130 * win32-low.c (win32_target_ops): Adjust.
13132 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13134 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13135 the inferior right away from here...
13136 (linux_wait_1): ... to here, and adjust to check the thread's
13137 last_resume_kind instead of the lwp's step or stop_expected flags.
13139 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13141 * README: Use consistent `GDB' and `GDBserver' spellings.
13143 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13145 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13146 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13147 (linux_detach_one_lwp): Assume the lwp is stopped.
13148 (any_thread_of): Delete.
13149 (linux_detach): Stop all lwps here. Don't blindly delete all
13151 (delete_lwp_callback): New.
13152 (linux_mourn): Delete all lwps of the process that is gone.
13153 (linux_wait_1): Don't delete the last lwp of the process here.
13154 * mem-break.h (mark_breakpoints_out): Declare.
13155 * mem-break.c (mark_breakpoints_out): New.
13156 (free_all_breakpoints): Use it.
13157 * server.c (handle_target_event): If the process is gone, mark
13159 * thread-db.c (struct thread_db) <create_bp>: New field.
13160 (thread_db_enable_reporting): Fix prototype. Store a thread event
13161 breakpoint reference in the thread_db struct.
13162 (thread_db_load_search): Clear the thread_db object.
13163 (try_thread_db_load_1): Ditto.
13164 (switch_to_process): New.
13165 (disable_thread_event_reporting): Use it.
13166 (remove_thread_event_breakpoints): New.
13167 (thread_db_detach, thread_db_mourn): Use it.
13169 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13171 * linux-low.c (linux_enable_event_reporting): New.
13172 (linux_wait_for_event_1, handle_extended_wait): Use it.
13174 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13176 * linux-low.c (linux_kill_one_lwp, linux_kill)
13177 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13178 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13179 SIGSTOP even if the LWP is stopped.
13180 (send_sigstop_callback): New.
13181 (stop_all_lwps): Use send_sigstop_callback instead.
13182 (linux_resume_one_thread): Adjust.
13183 (proceed_one_lwp): Still proceed an LWP that the client has
13184 requested to stop, if we haven't reported it as stopped yet. Make
13185 sure that LWPs the client want stopped, have a pending SIGSTOP.
13187 2010-04-26 Doug Evans <dje@google.com>
13189 * server.c (handle_general_set): Make static.
13191 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13192 Print received char after testing for error/eof instead of before.
13193 (input_interrupt): Tweak comment.
13195 2010-04-23 Doug Evans <dje@google.com>
13197 * server.c (start_inferior): Print inferior argv if --debug.
13199 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13201 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13202 * nto-x86-low.c: Include server.h
13204 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13206 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13207 be consistent with other sources of this directory.
13208 (init_registers_amd64): Correct name of source file of this function
13211 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13213 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13214 64-bit executables.
13216 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13218 * win32-i386-low.c: Add 64-bit support.
13219 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13220 (init_registers_amd64): Declare.
13221 (mappings): Add 64-bit version of array.
13222 (init_windows_x86): New function.
13223 (the_low_target): Change init_arch field to init_windows_x86.
13225 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13227 * win32-low.c: Adapt to support also 64-bit architecture.
13228 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13229 (get_image_name): Use SIZE_T type for local variable `done'.
13230 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13231 (toolhelp_get_dll_name): Idem.
13232 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13233 Use uintptr_t typecast to avoid warning.
13234 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13235 (handle_exception): Use phex_nz to avoid warning.
13236 (win32_wait): Remove unused local variable `process'.
13238 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13240 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13243 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13245 * configure.ac: Use `ws2_32' library for srv_mingw.
13246 * configure: Regenerate.
13247 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13248 * remote-utils.c: Likewise.
13250 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13252 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13253 if __x86_64__ is defined.
13255 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13257 * configure: Regenerate.
13259 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13261 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13262 * target.h (target_ops): New get_tib_address field.
13263 * win32-low.h (win32_thread_info): Add thread_local_base field.
13264 * win32-low.c (child_add_thread): Add tlb argument.
13265 Set thread_local_base field to TLB.
13266 (get_child_debug_event): Adapt to child_add_thread change.
13267 (win32_get_tib_address): New function.
13268 (win32_target_ops): Set get_tib_address field to
13269 win32_get_tib_address.
13270 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13272 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13274 * linux-low.c (linux_mourn): Also remove the process.
13275 * server.c (handle_target_event): Don't remove the process here.
13276 * nto-low.c (nto_mourn): New.
13277 (nto_target_ops): Install it.
13278 * spu-low.c (spu_mourn): New.
13279 (spu_target_ops): Install it.
13280 * win32-low.c (win32_mourn): New.
13281 (win32_target_ops): Install it.
13283 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13285 * server.h (buffer_xml_printf): Remove redundant `;'.
13287 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13289 * regcache.c (set_register_cache): Invalidate regcaches before
13290 changing the register cache layout.
13291 (regcache_invalidate_one): Allow a NULL regcache.
13292 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13293 regcaches before changing the register cache layout or the target
13296 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13298 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13299 variable warning on Linux/x86-64.
13301 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13303 GDBserver disconnected tracing support.
13305 * linux-low.c (linux_remove_process): Delete.
13306 (add_lwp): Don't set last_resume_kind here.
13307 (linux_kill): Use `mourn'.
13308 (linux_detach): Use `thread_db_detach', and `mourn'.
13309 (linux_mourn): New.
13310 (linux_attach_lwp_1): Adjust comment.
13311 (linux_attach): last_resume_kind moved the thread_info; adjust.
13312 (status_pending_p_callback): Adjust.
13313 (linux_wait_for_event_1): Adjust.
13314 (count_events_callback, select_singlestep_lwp_callback)
13315 (select_event_lwp_callback, cancel_breakpoints_callback)
13316 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13317 (proceed_one_lwp): Adjust.
13318 (linux_async): Add debug output.
13319 (linux_thread_stopped): New.
13320 (linux_pause_all): New.
13321 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13323 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13324 (thread_db_free): Delete declaration.
13325 (thread_db_detach, thread_db_mourn): Declare.
13326 * thread-db.c (thread_db_init): Use thread_db_mourn.
13327 (thread_db_free): Delete, split in two.
13328 (disable_thread_event_reporting): New.
13329 (thread_db_detach): New.
13330 (thread_db_mourn): New.
13332 * server.h (struct thread_info) <last_resume_kind>: New field.
13333 <attached>: Add comment.
13334 <gdb_detached>: New field.
13335 (handler_func): Change return type to int.
13336 (handle_serial_event, handle_target_event): Ditto.
13337 (gdb_connected): Declare.
13339 (disconnected_tracing): Declare.
13340 (stop_tracing): Declare.
13342 * server.c (handle_query) <qSupported>: Report support for
13343 disconnected tracing.
13344 (queue_stop_reply_callback): Account for running threads.
13345 (gdb_wants_thread_stopped): New.
13346 (gdb_wants_all_threads_stopped): New.
13347 (gdb_reattached_process): New.
13348 (handle_status): Clear the `gdb_detached' flag of all processes.
13349 In all-stop, stop all threads.
13350 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13351 (process_serial_event): If the remote connection breaks, or if an
13352 exit was forced with "monitor exit", force an event loop exit.
13353 Handle disconnected tracing on detach.
13354 (handle_serial_event): Adjust.
13355 (handle_target_event): If GDB isn't connected, forward events back
13356 to the inferior, unless the last process exited, in which case,
13357 exit gdbserver. Adjust interface.
13359 * remote-utils.c (remote_open): Don't block in accept. Instead
13360 register an event loop source on the listen socket file
13361 descriptor. Refactor bits into ...
13362 (listen_desc): ... this new global.
13363 (gdb_connected): ... this new function.
13364 (enable_async_notification): ... this new function.
13365 (handle_accept_event): ... this new function.
13366 (remote_close): Clear remote_desc.
13368 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13370 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13372 (mourn_inferior): Define.
13373 (target_process_qsupported): Avoid the dangling else problem.
13374 (thread_stopped): Define.
13375 (pause_all): Define.
13376 (target_waitstatus_to_string): Declare.
13377 * target.c (target_waitstatus_to_string): New.
13379 * tracepoint.c (tracing): Make extern.
13380 (disconnected_tracing): New.
13381 (stop_tracing): Make extern. Handle tracing stops due to GDB
13383 (cmd_qtdisconnected): New.
13384 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13385 (handle_tracepoint_general_set): Handle QTDisconnected.
13387 * event-loop.c (event_handler_func): Change return type to int.
13388 (process_event): Bail out if the event handler wants the event
13390 (handle_file_event): Ditto.
13391 (start_event_loop): Bail out if the event handler wants the event
13394 * nto-low.c (nto_target_ops): Adjust.
13395 * spu-low.c (spu_wait): Don't remove the process here.
13396 (spu_target_ops): Adjust.
13397 * win32-low.c (win32_wait): Don't remove the process here.
13398 (win32_target_ops): Adjust.
13400 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13402 * regcache.c (realloc_register_cache): Invalidate inferior's
13403 regcache before recreating it.
13405 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13407 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13409 2010-04-09 Stan Shebs <stan@codesourcery.com>
13410 Pedro Alves <pedro@codesourcery.com>
13412 * server.h (LONGEST): New.
13413 (struct thread_info) <while_stepping>: New field.
13414 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13416 (initialize_tracepoint, handle_tracepoint_general_set)
13417 (handle_tracepoint_query, tracepoint_finished_step)
13418 (tracepoint_was_hit, release_while_stepping_state_list):
13419 (current_traceframe): Declare.
13420 * server.c (handle_general_set): Handle tracepoint packets.
13421 (read_memory): New.
13422 (write_memory): New.
13423 (handle_search_memory_1): Use read_memory.
13424 (handle_query): Report support for conditional tracepoints, trace
13425 state variables, and tracepoint sources. Handle tracepoint
13427 (main): Initialize the tracepoints module.
13428 (process_serial_event): Handle traceframe reads/writes.
13430 * linux-low.c (handle_tracepoints): New.
13431 (linux_wait_1): Call it.
13432 (linux_resume_one_lwp): Handle while-stepping.
13433 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13434 (linux_target_ops): Install them.
13435 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13437 * linux-x86-low.c (x86_supports_tracepoints): New.
13438 (the_low_target). Install it.
13440 * mem-break.h (delete_breakpoint): Declare.
13441 * mem-break.c (delete_breakpoint): Make external.
13443 * target.h (struct target_ops): Add `supports_tracepoints',
13444 `read_pc', and `write_pc' fields.
13445 (target_supports_tracepoints): Define.
13446 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13449 * regcache.h (struct regcache) <registers_owned>: New field.
13450 (init_register_cache, regcache_cpy): Declare.
13451 (regcache_read_pc, regcache_write_pc): Declare.
13452 (register_cache_size): Declare.
13453 (supply_regblock): Declare.
13454 * regcache.c (init_register_cache): New.
13455 (new_register_cache): Use it.
13456 (regcache_cpy): New.
13457 (register_cache_size): New.
13458 (supply_regblock): New.
13459 (regcache_read_pc, regcache_write_pc): New.
13461 * tracepoint.c: New.
13463 * Makefile.in (OBS): Add tracepoint.o.
13464 (tracepoint.o): New rule.
13466 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13468 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13470 (i386-mmx.c): Likewise.
13471 (i386-mmx-linux.o): Likewise.
13472 (i386-mmx-linux.c): Likewise.
13474 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13475 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13476 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13477 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13479 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13480 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13481 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13483 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13485 * Makefile.in (clean): Updated.
13487 (i386-avx.c): Likewise.
13488 (i386-avx-linux.o): Likewise.
13489 (i386-avx-linux.c): Likewise.
13490 (amd64-avx.o): Likewise.
13491 (amd64-avx.c): Likewise.
13492 (amd64-avx-linux.o): Likewise.
13493 (amd64-avx-linux.c): Likewise.
13495 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13496 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13497 (srv_amd64_regobj): Add amd64-avx.o.
13498 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13499 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13500 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13501 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13502 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13503 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13504 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13506 * i387-fp.c: Include "i386-xstate.h".
13508 (i387_cache_to_xsave): Likewise.
13509 (i387_xsave_to_cache): Likewise.
13510 (x86_xcr0): Likewise.
13512 * i387-fp.h (i387_cache_to_xsave): Likewise.
13513 (i387_xsave_to_cache): Likewise.
13514 (x86_xcr0): Likewise.
13516 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13517 * linux-crisv32-low.c (target_regsets): Likewise.
13518 * linux-m68k-low.c (target_regsets): Likewise.
13519 * linux-mips-low.c (target_regsets): Likewise.
13520 * linux-ppc-low.c (target_regsets): Likewise.
13521 * linux-s390-low.c (target_regsets): Likewise.
13522 * linux-sh-low.c (target_regsets): Likewise.
13523 * linux-sparc-low.c (target_regsets): Likewise.
13524 * linux-xtensa-low.c (target_regsets): Likewise.
13526 * linux-low.c: Include <sys/uio.h>.
13527 (regsets_fetch_inferior_registers): Support nt_type.
13528 (regsets_store_inferior_registers): Likewise.
13529 (linux_process_qsupported): New.
13530 (linux_target_ops): Add linux_process_qsupported.
13532 * linux-low.h (regset_info): Add nt_type.
13533 (linux_target_ops): Add process_qsupported.
13535 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13537 (init_registers_i386_avx_linux): New.
13538 (init_registers_amd64_avx_linux): Likewise.
13539 (xmltarget_i386_linux_no_xml): Likewise.
13540 (xmltarget_amd64_linux_no_xml): Likewise.
13541 (PTRACE_GETREGSET): Likewise.
13542 (PTRACE_SETREGSET): Likewise.
13543 (x86_fill_xstateregset): Likewise.
13544 (x86_store_xstateregset): Likewise.
13545 (use_xml): Likewise.
13546 (x86_linux_update_xmltarget): Likewise.
13547 (x86_linux_process_qsupported): Likewise.
13548 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13549 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13550 init_registers_i386_linux here. Call
13551 x86_linux_update_xmltarget.
13552 (the_low_target): Add x86_linux_process_qsupported.
13554 * server.c (handle_query): Call target_process_qsupported.
13556 * target.h (target_ops): Add process_qsupported.
13557 (target_process_qsupported): New.
13559 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13561 * inferiors.c (add_thread): Set last_status kind to
13562 TARGET_WAITKIND_IGNORE.
13563 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13564 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13565 (linux_wait_1): Move `thread' local definition to block that uses
13566 it. Don't NULL initialize `event_child'.
13567 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13568 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13569 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13571 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13573 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13574 an extended waitstatus, or by a watchpoint.
13575 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13576 thread was stepping or has been stopped by a watchpoint.
13578 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13580 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13581 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13582 of another, then delete the previous, and validate all
13584 (validate_inserted_breakpoint): New.
13585 (delete_disabled_breakpoints): New.
13586 (validate_breakpoints): New.
13587 (check_mem_read): Validate breakpoints before trusting their
13588 shadow. Delete disabled breakpoints.
13589 (check_mem_write): Validate breakpoints before trusting they
13590 should be inserted. Delete disabled breakpoints.
13591 * mem-break.h (validate_breakpoints):
13592 * server.c (handle_query): Validate breakpoints when we see a
13595 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13597 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13598 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13599 if we could tell there's a GDB breakpoint at stop_pc.
13600 (need_step_over_p): Don't do a step over if we find a GDB
13601 breakpoint at the resume PC.
13603 * mem-break.c (struct raw_breakpoint): New.
13604 (enum bkpt_type): New type `gdb_breakpoint'.
13605 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13606 fields. New field `raw'.
13607 (find_raw_breakpoint_at): New.
13608 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13609 breakpoint instead.
13610 (set_breakpoint_at): Adjust.
13611 (delete_raw_breakpoint): New.
13612 (release_breakpoint): New.
13613 (delete_breakpoint): Rename to...
13614 (delete_breakpoint_1): ... this. Add proc parameter. Use
13615 release_breakpoint. Return ENOENT.
13616 (delete_breakpoint): Reimplement.
13617 (find_breakpoint_at): Delete.
13618 (find_gdb_breakpoint_at): New.
13619 (delete_breakpoint_at): Delete.
13620 (set_gdb_breakpoint_at): New.
13621 (delete_gdb_breakpoint_at): New.
13622 (gdb_breakpoint_here): New.
13623 (set_reinsert_breakpoint): Use release_breakpoint.
13624 (uninsert_breakpoint): Rename to ...
13625 (uninsert_raw_breakpoint): ... this.
13626 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13627 (reinsert_raw_breakpoint): Change parameter type to
13629 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13631 (check_breakpoints): Adjust. Use release_breakpoint.
13632 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13633 (breakpoint_inserted_here): Ditto.
13634 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13635 Don't trust the breakpoint's shadow if it is not inserted.
13636 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13637 (delete_all_breakpoints): Adjust.
13638 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13639 use delete_breakpoint_1.
13641 * mem-break.h (breakpoints_supported): Delete declaration.
13642 (set_gdb_breakpoint_at): Declare.
13643 (gdb_breakpoint_here): Declare.
13644 (delete_breakpoint_at): Delete.
13645 (delete_gdb_breakpoint_at): Declare.
13647 * server.h (struct raw_breakpoint): Forward declare.
13648 (struct process_info): New field `raw_breakpoints'.
13650 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13653 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13655 * linux-low.c (status_pending_p_callback): Fix comment.
13656 (linux_wait_for_event_1): Move most of the internal breakpoint
13657 handling from here...
13658 (linux_wait_1): ... to here.
13659 (count_events_callback): New.
13660 (select_singlestep_lwp_callback): New.
13661 (select_event_lwp_callback): New.
13662 (cancel_breakpoints_callback): New.
13663 (select_event_lwp): New.
13664 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13665 priority to all LWPs that have had events that should be reported
13666 to the client. Cancel breakpoints when about to reporting the
13667 event to the client, not while stopping lwps. No longer cancel
13668 finished single-steps here.
13669 (cancel_finished_single_step): Delete.
13670 (cancel_finished_single_steps): Delete.
13672 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13674 * mem-break.c (enum bkpt_type): New.
13675 (struct breakpoint): New field `type'.
13676 (set_breakpoint_at): Change return type to struct breakpoint
13677 pointer. Set type to `other_breakpoint' by default.
13678 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13679 in the breakpoint list.
13680 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13681 (reinsert_breakpoint): Rename to ...
13682 (reinsert_raw_breakpoint): ... this.
13683 (reinsert_breakpoints_at): Adjust.
13684 * mem-break.h (struct breakpoint): Declare.
13685 (set_breakpoint_at): Change return type to struct breakpoint
13688 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13690 * server.c (handle_query): Assign, not compare.
13692 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13694 Teach linux gdbserver to step-over-breakpoints.
13696 * linux-low.c (can_hardware_single_step): New.
13697 (supports_breakpoints): New.
13698 (handle_extended_wait): If stopping threads, read the stop pc of
13699 the new cloned LWP.
13701 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13702 low target doesn't support retrieving the PC.
13703 (add_lwp): Set last_resume_kind to resume_continue.
13704 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13705 (linux_attach): Don't clear stop_expected. Set the lwp's
13706 last_resume_kind to resume_stop.
13707 (linux_detach_one_lwp): Don't check for removed breakpoints.
13708 (check_removed_breakpoint): Delete.
13709 (status_pending_p): Rename to ...
13710 (status_pending_p_callback): ... this. Don't check for removed
13711 breakpoints. Don't consider threads that are stopped from GDB's
13713 (linux_wait_for_lwp): Always read the stop_pc here.
13714 (cancel_breakpoint): New.
13715 (step_over_bkpt): New global.
13716 (linux_wait_for_event_1): Implement stepping over breakpoints.
13717 (gdb_wants_lwp_stopped): New.
13718 (gdb_wants_all_stopped): New.
13719 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13720 single-step traps here. Store the thread's last reported target
13722 (send_sigstop): Don't clear stop_expected. Always set it,
13724 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13725 (cancel_finished_single_step): New.
13726 (cancel_finished_single_steps): New.
13727 (wait_for_sigstop): Don't cancel finished single-step traps here.
13728 (linux_resume_one_lwp): Don't check for removed breakpoints.
13729 Don't set `step' on non-hardware step archs.
13730 (linux_set_resume_request): Ignore resume_stop requests if already
13731 stopping or stopped. Set the lwp's last_resume_kind.
13732 (resume_status_pending_p): Don't check for removed breakpoints.
13733 (need_step_over_p): New.
13734 (start_step_over): New.
13735 (finish_step_over): New.
13736 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13737 requests. Clear the thread's last reported target waitstatus.
13738 Don't use the `suspended' flag. Don't consider pending breakpoints.
13739 (linux_resume): Start a step-over if necessary.
13740 (proceed_one_lwp): New.
13741 (proceed_all_lwps): New.
13742 (unstop_all_lwps): New.
13743 * linux-low.h (struct lwp_info): Rewrite comment for the
13744 `suspended' flag. Add the `stop_pc' field. Delete the
13745 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13746 Add `'last_resume_kind' and `need_step_over' fields.
13747 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13748 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13749 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13750 (set_raw_breakpoint_at): New.
13751 (set_breakpoint_at): Rewrite to use it.
13752 (reinsert_breakpoint_handler): Delete.
13753 (set_reinsert_breakpoint): New.
13754 (reinsert_breakpoint_by_bp): Delete.
13755 (delete_reinsert_breakpoints): New.
13756 (uninsert_breakpoint): Rewrite.
13757 (uninsert_breakpoints_at): New.
13758 (reinsert_breakpoint): Rewrite.
13759 (reinsert_breakpoints_at): New.
13760 (check_breakpoints): Rewrite.
13761 (breakpoint_here): New.
13762 (breakpoint_inserted_here): New.
13763 (check_mem_read): Adjust.
13764 * mem-break.h (breakpoints_supported, breakpoint_here)
13765 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13766 (reinsert_breakpoint_by_bp): Delete declaration.
13767 (delete_reinsert_breakpoints): Declare.
13768 (reinsert_breakpoint): Delete declaration.
13769 (reinsert_breakpoints_at): Declare.
13770 (uninsert_breakpoint): Delete declaration.
13771 (uninsert_breakpoints_at): Declare.
13772 (check_breakpoints): Adjust prototype.
13773 * server.h: Adjust include order.
13774 (struct thread_info): Declare here. Add a `last_status' field.
13776 2010-03-23 Michael Snyder <msnyder@vmware.com>
13778 * server.c (crc32): New function.
13779 (handle_query): Add handling for 'qCRC:' request.
13781 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13783 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13784 lwp had been stopped by a watchpoint.
13786 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13788 * server.h (internal_error): Declare.
13789 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13790 * utils.c (internal_error): New function.
13792 2010-03-15 Andreas Schwab <schwab@redhat.com>
13794 * configure.srv: Fix typo setting srv_regobj.
13796 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13798 * linux-low.c (fetch_register): Avoid passing a non string literal
13800 (usr_store_inferior_registers): Ditto.
13802 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13804 * linux-low.c (linux_write_memory): Bail out early if peeking
13807 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13809 * linux-low.h (struct lwp_info): New fields
13810 `stopped_by_watchpoint' and `stopped_data_address'.
13811 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13812 here, and cache them in the lwp object.
13813 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13815 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13817 (linux_stopped_by_watchpoint): Rewrite.
13818 (linux_stopped_data_address): Rewrite.
13820 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13822 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13823 switching the current inferior, not before.
13825 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13827 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13828 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13829 i386-linux.c and amd64-linux.c.
13830 (reg-i386.o): Removed.
13831 (reg-i386.c): Likewise.
13832 (reg-i386-linux.o): Likewise.
13833 (reg-i386-linux.c): Likewise.
13834 (reg-x86-64.o): Likewise.
13835 (reg-x86-64.c): Likewise.
13836 (reg-x86-64-linux.o): Likewise.
13837 (reg-x86-64-linux.c): Likewise.
13839 (i386.c): Likewise.
13840 (i386-linux.o): Likewise.
13841 (i386-linux.c): Likewise.
13842 (amd64.o): Likewise.
13843 (amd64.c): Likewise.
13844 (amd64-linux.o): Likewise.
13845 (amd64-linux.c): Likewise.
13847 * configure.srv (srv_i386_regobj): New.
13848 (srv_i386_linux_regobj): Likewise.
13849 (srv_amd64_regobj): Likewise.
13850 (srv_amd64_linux_regobj): Likewise.
13851 (srv_i386_32bit_xmlfiles): Likewise.
13852 (srv_i386_64bit_xmlfiles): Likewise.
13853 (srv_i386_xmlfiles): Likewise.
13854 (srv_amd64_xmlfiles): Likewise.
13855 (srv_i386_linux_xmlfiles): Likewise.
13856 (srv_amd64_linux_xmlfiles): Likewise.
13857 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13858 srv_xmlfiles to $srv_i386_xmlfiles.
13859 (i[34567]86-*-mingw32ce*): Likewise.
13860 (i[34567]86-*-mingw*): Likewise.
13861 (i[34567]86-*-nto*): Likewise.
13862 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13863 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13864 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13865 (x86_64-*-linux*): Likewise.
13867 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13868 (init_registers_amd64_linux): New.
13869 (x86_arch_setup): Replace init_registers_x86_64_linux with
13870 init_registers_amd64_linux.
13872 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13874 * configure.ac: Check for libdl. If it is not available link against
13875 static libthread_db.
13876 * configure: Regenerate.
13878 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13882 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13883 handing a read watchpoint.
13884 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13886 2010-02-12 Doug Evans <dje@google.com>
13888 * linux-low.c (linux_supports_tracefork_flag): Document.
13889 (linux_look_up_symbols): Add comment.
13891 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13893 * regcache.c (supply_register): Clear regcache if buf is NULL.
13895 2010-02-02 Nicolas Roche <roche@sourceware.org>
13896 Joel Brobecker <brobecker@adacore.com>
13898 * inferiors.c (find_inferior): Add function documentation.
13899 (unloaded_dll): Handle the case where the unloaded dll has not
13900 been previously registered in the dll list.
13902 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13904 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13905 (thumb2_breakpoint): New.
13906 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13908 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13910 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13911 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13914 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13916 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13918 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13920 * linux-s390-low.c (s390_collect_ptrace_register)
13921 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13923 2010-01-21 Doug Evans <dje@google.com>
13925 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13926 (PTRACE_ARG4_TYPE): New macro.
13927 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13928 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13929 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13930 (usr_store_inferior_registers): Ditto.
13931 (linux_read_memory, linux_write_memory): Ditto.
13932 (linux_test_for_tracefork): Ditto.
13934 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13935 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13937 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13939 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13942 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13944 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13945 prototype to take a regcache. Adjust.
13947 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13949 * regcache.h (struct thread_info): Forward declare.
13950 (struct regcache): New.
13951 (new_register_cache): Adjust prototype.
13952 (get_thread_regcache): Declare.
13953 (free_register_cache): Adjust prototype.
13954 (registers_to_string, registers_from_string): Ditto.
13955 (supply_register, supply_register_by_name, collect_register)
13956 (collect_register_as_string, collect_register_by_name): Ditto.
13957 * regcache.c (struct inferior_regcache_data): Delete.
13958 (get_regcache): Rename to ...
13959 (get_thread_regcache): ... this. Adjust. Switch inferior before
13960 fetching registers.
13961 (regcache_invalidate_one): Adjust.
13962 (regcache_invalidate): Fix prototype.
13963 (new_register_cache): Return the new register cache.
13964 (free_register_cache): Change prototype.
13965 (realloc_register_cache): Adjust.
13966 (registers_to_string): Change prototype to take a regcache. Adjust.
13967 (registers_from_string): Ditto.
13968 (register_data): Ditto.
13969 (supply_register): Ditto.
13970 (supply_register_by_name): Ditto.
13971 (collect_register): Ditto.
13972 (collect_register_as_string): Ditto.
13973 (collect_register_by_name): Ditto.
13974 * server.c (process_serial_event): Adjust.
13975 * linux-low.h (regset_fill_func, regset_store_func): Change
13977 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13979 * linux-low.c (get_stop_pc): Adjust.
13980 (check_removed_breakpoint): Adjust.
13981 (linux_wait_for_event): Adjust.
13982 (linux_resume_one_lwp): Adjust.
13983 (fetch_register): Add regcache parameter. Adjust.
13984 (usr_store_inferior_registers): Ditto.
13985 (regsets_fetch_inferior_registers): Ditto.
13986 (regsets_store_inferior_registers): Ditto.
13987 (linux_fetch_registers, linux_store_registers): Ditto.
13988 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13990 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13992 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13993 prototype to take a regcache.
13994 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13995 * remote-utils.c (convert_ascii_to_int, outreg)
13996 (prepare_resume_reply): Change prototype to take a regcache.
13998 * target.h (struct target_ops) <fetch_registers, store_registers>:
13999 Change prototype to take a regcache.
14000 (fetch_inferior_registers, store_inferior_registers): Change
14001 prototype to take a regcache. Adjust.
14002 * proc-service.c (ps_lgetregs): Adjust.
14003 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14004 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14005 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14006 take a regcache. Adjust.
14007 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14008 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14009 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14010 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14011 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14012 (cris_cannot_fetch_register):
14013 (cris_breakpoint_at): Change prototype to take a regcache.
14015 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14016 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14017 to take a regcache. Adjust.
14018 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14020 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14021 take a regcache. Adjust.
14022 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14023 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14024 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14025 * linux-mips-low.c (mips_get_pc):
14026 (mips_set_pc): Change prototype to take a regcache. Adjust.
14027 (mips_reinsert_addr): Adjust.
14028 (mips_collect_register): Change prototype to take a regcache.
14030 (mips_supply_register):
14031 (mips_collect_register_32bit, mips_supply_register_32bit)
14032 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14033 (mips_store_fpregset): Ditto.
14034 * linux-ppc-low.c (ppc_supply_ptrace_register)
14035 (ppc_supply_ptrace_register): Ditto.
14036 (parse_spufs_run): Adjust.
14037 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14038 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14039 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14040 take a regcache. Adjust.
14041 * linux-s390-low.c (s390_collect_ptrace_register)
14042 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14043 (s390_set_pc): Change prototype to take a regcache. Adjust.
14044 (s390_arch_setup): Adjust.
14045 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14046 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14047 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14048 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14049 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14051 (sparc_breakpoint_at): Adjust.
14052 * linux-xtensa-low.c (xtensa_fill_gregset):
14053 (xtensa_store_gregset):
14054 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14055 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14056 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14057 prototype to take a regcache. Adjust.
14058 * win32-arm-low.c (arm_fetch_inferior_register)
14059 (arm_store_inferior_register): Change prototype to take a
14061 * win32-i386-low.c (i386_fetch_inferior_register)
14062 (i386_store_inferior_register): Change prototype to take a
14064 * win32-low.c (child_fetch_inferior_registers)
14065 (child_store_inferior_registers): Change prototype to take a
14067 (win32_wait): Adjust.
14068 (win32_fetch_inferior_registers): Change prototype to take a
14070 (win32_store_inferior_registers): Adjust.
14071 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14072 store_inferior_register>: Change prototype to take a regcache.
14074 2010-01-20 Doug Evans <dje@google.com>
14076 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14078 (linux_wait_for_event1, linux_init_signals): Ditto.
14079 (W_STOPCODE): Provide definition if missing.
14081 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14083 * linux-low.c (linux_core_of_thread): New.
14084 (compare_ints, show_process, list_threads): New.
14085 (linux_qxfer_osdata): Report threads and cores.
14086 (linux_target_op): Register linux_core_of_thread.
14087 * remote-utils.c (prepare_resume_reply): Report the core.
14088 (buffer_xml_printf): Support %d specifier.
14089 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14091 (handle_query): Handle qXfer:threads. Announce availability
14093 * target.h (struct target_ops): New field core_of_thread.
14095 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14097 * Makefile.in (clean): Remove new generated files.
14098 (reg-s390.o, reg-s390.c): Remove rules.
14099 (reg-s390x.o, reg-s390x.c): Likewise.
14100 (s390-linux32.o, s390-linux32.c): Add rules.
14101 (s390-linux64.o, s390-linux64.c): Likewise.
14102 (s390x-linux64.o, s390x-linux64.c): Likewise.
14103 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14104 * linux-s390-low.c: Include <elf.h>.
14105 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14106 (init_registers_s390): Remove prototype.
14107 (init_registers_s390x): Likewise.
14108 (init_registers_s390_linux32): Add prototype.
14109 (init_registers_s390_linux64): Likewise.
14110 (init_registers_s390x_linux64): Likewise.
14111 (s390_num_regs_3264): New define.
14112 (s390_regmap_3264): New global variable.
14113 (s390_cannot_fetch_register): Remove obsolete check.
14114 (s390_cannot_store_register): Likewise.
14115 (s390_collect_ptrace_register): Handle upper/lower register halves.
14116 (s390_supply_ptrace_register): Likewise.
14117 (s390_fill_gregset): Update to register number changes.
14118 (s390_get_hwcap): New routine.
14119 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14120 Install appropriate regmap and register set.
14122 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14124 * server.c (gdbserver_version): Update copyright year to 2010.
14125 * gdbreplay.c (gdbreplay_version): Likewise.
14127 2009-12-28 Doug Evans <dje@google.com>
14129 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14130 elf/external.h. Include <elf.h> instead but only if necessary.
14132 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14134 * linux-low.c (linux_remove_process): Remove `detaching'
14135 parameter. Don't release/detach from thread_db here.
14136 (linux_kill): Release/detach from thread_db here, ...
14137 (linux_detach): ... and here, before actually detaching.
14138 (linux_wait_1): ... and here, when a process exits.
14139 * thread-db.c (any_thread_of): New.
14140 (thread_db_free): Switch the current inferior to a thread of the
14143 2009-12-21 Doug Evans <dje@google.com>
14145 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14147 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14148 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14149 warning ifndef __NR_tkill. Move setting of errno there too.
14150 Delete unnecessary resetting of errno after syscall.
14151 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14153 * configure.ac: Check for dladdr.
14154 * config.in: Regenerate.
14155 * configure: Regenerate.
14156 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14157 (try_thread_db_load): Update.
14159 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14161 2009-12-18 Doug Evans <dje@google.com>
14163 * event-loop.c: Include unistd.h if it exists.
14165 * linux-low.c (my_waitpid): Move definition away from being in
14166 between linux_tracefork_child/linux_test_for_tracefork.
14168 * gdb_proc_service.h (psaddr_t): Fix type.
14169 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14170 signature to match glibc.
14172 2009-12-16 Doug Evans <dje@google.com>
14174 * linux-low.c (linux_read_memory): Fix argument to read.
14176 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14178 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14179 events, don't leave current_inferior pointing at null.
14181 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14183 * win32-low.c (LOG): Delete.
14184 (OUTMSG): Output to stderr.
14185 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14186 on compile time LOG macro.
14187 (win32_wait): Fix debug output.
14189 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14191 * win32-low.c (win32_add_one_solib): If the dll name is
14192 "ntdll.dll", prepend the system directory to the dll path.
14194 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14196 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14198 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14199 Vladimir Prus <vladimir@codesourcery.com>
14201 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14202 * configure.ac: Check for __mcoldfire__ and set
14203 gdb_cv_m68k_is_coldfire.
14204 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14205 reg-cf.o and reg-m68k.o.
14206 * configure: Regenerated.
14208 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14210 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14211 Pass it to thread_db_free.
14212 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14213 proper `detaching' argument to linux_remove_process.
14214 * linux-low.h (thread_db_free): Add `detaching' parameter.
14215 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14217 (thread_db_free): Add `detaching' parameter. Only
14218 call td_ta_clear_event if detaching from process.
14220 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14222 * thread-db.c (thread_db_free): Fix typo.
14224 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14227 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14229 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14231 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14232 with an i686 compiler.
14233 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14235 * configure: Rebuilt.
14237 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14241 * server.c (handle_search_memory_1): Correct read_addr initialization
14242 in loop for searching subsequent chunks.
14244 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14246 * configure.ac: New --with-libthread-db option.
14247 * thread-db.c: Allow direct dependence on libthread_db.
14248 (thread_db_free): Adjust.
14249 * config.in: Regenerate.
14250 * configure: Likewise.
14252 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14255 * thread-db.c (attach_thread): New function.
14256 (maybe_attach_thread): Return success/failure.
14257 (find_new_threads_callback): Adjust.
14258 (thread_db_find_new_threads): Loop until no new threads.
14260 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14262 * proc-service.c (ps_lgetregs): Formatting.
14264 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14266 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14267 * configure.ac: Adjust.
14268 * linux-low.h (struct process_info_private): Move members to struct
14270 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14271 * linux-low.c (linux_remove_process): Adjust.
14272 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14273 * server.c (handle_query): Move code ...
14274 (handle_monitor_command): ... here. New function.
14275 * target.h (struct target_ops): New member.
14276 * thread-db.c (struct thread_db): New.
14277 (libthread_db_search_path): New variable.
14278 (thread_db_create_event, thread_db_enable_reporting)
14279 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14280 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14281 (try_thread_db_load_1, dladdr_to_soname): New functions.
14282 (try_thread_db_load, thread_db_load_search): New functions.
14283 (thread_db_init): Search for libthread_db.
14284 (thread_db_free): New function.
14285 (thread_db_handle_monitor_command): Likewise.
14286 * config.in: Regenerate.
14287 * configure: Regenerate.
14289 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14291 * spu-low.c (spu_kill): Wait for inferior to terminate.
14292 Call clear_inferiors.
14293 (spu_detach): Call clear_inferiors.
14295 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14297 * aclocal.m4: Regenerate.
14298 * config.in: Likewise.
14299 * configure: Likewise.
14301 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14303 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14304 (parse_spufs_run): New function.
14305 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14306 (ppc_breakpoint_at): Handle SPU breakpoints.
14308 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14310 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14311 (SPUFS_MAGIC): Define.
14312 (spu_enumerate_spu_ids): New function.
14313 (linux_qxfer_spu): New function.
14314 (linux_target_ops): Install linux_qxfer_spu.
14316 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14318 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14319 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14320 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14321 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14322 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14323 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14324 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14325 (init_registers_powerpc_cell32l): Add prototype.
14326 (init_registers_powerpc_cell64l): Likewise.
14327 (ppc_arch_setup): Detect Cell/B.E. architecture.
14329 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14331 * Makefile.in (datarootdir): New variable.
14333 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14335 * linux-low.c (linux_write_memory): Update debugging output.
14336 * Makefile.in (clean): Add new descriptions.
14337 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14338 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14339 * configure.srv: Add new files for arm*-*-linux*.
14340 * linux-arm-low.c: Add new declarations.
14341 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14342 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14343 (HWCAP_VFPv3D16): New.
14344 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14345 instead of __IWMMXT__.
14346 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14347 (arm_arch_setup): New.
14348 (target_regsets): Remove #ifdef. Add VFP regset.
14349 (the_low_target): Use arm_arch_setup.
14351 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14353 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14354 the main thread again.
14356 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14358 Adding Neutrino gdbserver.
14359 * configure: Regenerated.
14360 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14361 * configure.srv (i[34567]86-*-nto*): New target.
14362 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14363 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14364 (nto_comctrl) [__QNX__]: New function.
14365 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14367 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14369 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14372 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14373 Pedro Alves <pedro@codesourcery.com>
14375 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14376 don't support CONTEXT_EXTENDED_REGISTERS.
14377 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14378 (the_low_target): Install them.
14379 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14380 failing with ERROR_PIPE_NOT_CONNECTED.
14382 2009-06-30 Doug Evans <dje@google.com>
14383 Pierre Muller <muller@ics.u-strasbg.fr>
14385 Add h/w watchpoint support to x86-linux, win32-i386.
14386 * Makefile.in (SFILES): Add i386-low.c
14387 (i386_low_h): Define.
14388 (i386-low.o): Add dependencies.
14389 (linux-x86-low.o): Add i386-low.h dependency.
14390 (win32-i386-low.o): Ditto.
14391 * i386-low.c: New file.
14392 * i386-low.h: New file.
14393 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14394 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14395 * linux-low.c (linux_add_process): Initialize arch_private.
14396 (linux_remove_process): Free arch_private.
14397 (add_lwp): Initialize arch_private.
14398 (delete_lwp): Free arch_private.
14399 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14401 * linux-low.h (process_info_private): New member arch_private.
14402 (lwp_info): New member arch_private.
14403 (linux_target_ops): New members new_process, new_thread,
14405 (ptid_of): New macro.
14406 * linux-x86-low.c: Include stddef.h, i386-low.h.
14407 (arch_process_info): New struct.
14408 (arch_lwp_info): New struct.
14409 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14410 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14411 (i386_dr_low_get_status): New function.
14412 (x86_insert_point, x86_remove_point): New functions.
14413 (x86_stopped_by_watchpoint): New function.
14414 (x86_stopped_data_address): New function.
14415 (x86_linux_new_process, x86_linux_new_thread): New functions.
14416 (x86_linux_prepare_to_resume): New function.
14417 (the_low_target): Add entries for insert_point, remove_point,
14418 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14420 * server.c (debug_hw_points): New global.
14421 (monitor_show_help): Document set debug-hw-points.
14422 (handle_query): Process "set debug-hw-points".
14423 * server.h (debug_hw_points): Declare.
14424 (paddress): Declare.
14425 * utils.c (NUMCELLS, CELLSIZE): New macros.
14426 (get_sell, xsnprintf, paddress): New functions.
14427 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14428 remove_point, stopped_by_watchpoint, stopped_data_address.
14429 * win32-i386-low.c: Include i386-low.h.
14430 (debug_reg_state): Replaces dr.
14431 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14432 (i386_dr_low_get_status): New function.
14433 (i386_insert_point, i386_remove_point): New functions.
14434 (i386_stopped_by_watchpoint): New function.
14435 (i386_stopped_data_address): New function.
14436 (i386_initial_stuff): Update.
14437 (get_thread_context,set_thread_context,i386_thread_added): Update.
14438 (the_low_target): Add entries for insert_point,
14439 remove_point, stopped_by_watchpoint, stopped_data_address.
14440 * win32-low.c (win32_insert_watchpoint): New function.
14441 (win32_remove_watchpoint): New function.
14442 (win32_stopped_by_watchpoint): New function.
14443 (win32_stopped_data_address): New function.
14444 (win32_target_ops): Add entries for insert_watchpoint,
14445 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14446 * win32-low.h (win32_target_ops): New members insert_point,
14447 remove_point, stopped_by_watchpoint, stopped_data_address.
14449 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14451 * server.c (process_serial_event): Re-return unsupported, not
14452 error, if the type isn't recognized. Re-allow supporting only
14453 insert or remove packets. Also call require_running for
14454 breakpoints. Add missing break statement to default case. Tidy.
14455 * target.h (struct target_ops): Rename insert_watchpoint to
14456 insert_point, and remove_watchpoint to remove_point.
14458 * linux-low.h (struct linux_target_ops): Likewise.
14459 * linux-low.c (linux_insert_watchpoint): Rename to ...
14460 (linux_insert_point): ... this. Adjust.
14461 (linux_remove_watchpoint): Rename to ...
14462 (linux_remove_point): ... this. Adjust.
14463 (linux_target_ops): Adjust.
14464 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14465 (cris_insert_point): ... this.
14466 (cris_remove_watchpoint): Rename to ...
14467 (cris_remove_point): ... this.
14468 (the_low_target): Adjust.
14470 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14472 * server.c (handle_v_kill): Pass signal_pid to
14473 kill_inferior if multi_process is zero.
14475 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14477 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14478 * target.h (target_ops): Comment for *_watchpoint to make it clear
14479 the functions can get types '0' and '1'.
14481 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14483 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14484 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14485 * regcache.c (get_regcache): Likewise.
14486 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14487 * win32-low.c (child_fetch_inferior_registers): Remove check for
14490 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14491 Pedro Alves <pedro@codesourcery.com>
14493 * target.h (struct target_ops) <supports_multi_process>: New
14495 (target_supports_multi_process): New.
14496 * server.c (handle_query): Even if GDB reports support, only
14497 enable multi-process if the target also supports it. Report
14498 multi-process support only if the target backend supports it.
14499 * linux-low.c (linux_supports_multi_process): New function.
14500 (linux_target_ops): Install it as target_supports_multi_process
14503 2009-05-24 Doug Evans <dje@google.com>
14505 Global renaming of find_thread_pid to find_thread_ptid.
14506 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14507 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14508 All callers updated.
14510 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14511 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14514 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14515 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14516 (linux_resume_one_lwp): Ditto.
14518 2009-05-23 Doug Evans <dje@google.com>
14520 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14521 from struct inferior_list_entry * to struct lwp_info *.
14522 All callers updated.
14524 2009-05-13 Doug Evans <dje@google.com>
14526 * linux-x86-low.c: Don't include assert.h.
14527 (x86_siginfo_fixup): Use fatal, not assert.
14528 (x86_arch_setup): Fix comment.
14530 2009-05-12 Doug Evans <dje@google.com>
14532 Biarch support for i386/amd64 gdbserver.
14533 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14534 Add linux-x86-low.c.
14535 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14536 (linux-x86-low.o): Add.
14537 * linux-x86-64-low.c: Delete.
14538 * linux-i386-low.c: Delete.
14539 * linux-x86-low.c: New file.
14540 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14542 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14544 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14545 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14546 (linux_child_pid_to_exec_file): New function.
14547 (elf_64_header_p, elf_64_file_p): New functions.
14548 (siginfo_fixup): New function.
14549 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14550 give target a chance to convert layout.
14551 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14552 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14554 2009-05-07 Doug Evans <dje@google.com>
14556 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14557 (regsets_store_inferior_registers): Ditto.
14559 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14563 * linux-low.c (must_set_ptrace_flags): Delete.
14564 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14566 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14567 `lwp->must_set_ptrace_flags' instead.
14568 (linux_wait_for_event_1): Set ptrace options here.
14569 (linux_wait_1): ... not here.
14571 2009-04-30 Doug Evans <dje@google.com>
14573 * inferiors.c (started_inferior_callback): New function.
14574 (attached_inferior_callback): New function.
14575 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14576 * server.c (print_started_pid, print_attached_pid): New functions.
14577 (detach_or_kill_for_exit): New function.
14578 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14579 * server.h (have_started_inferiors_p): Declare.
14580 (have_attached_inferiors_p): Declare.
14582 * inferiors.c (remove_process): Fix memory leak, free process.
14583 * linux-low.c (linux_remove_process): New function.
14584 (linux_kill): Call it instead of remove_process.
14585 (linux_detach, linux_wait_1): Ditto.
14587 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14589 * configure.srv: Add x86 Windows CE target.
14591 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14593 * inferiors.c (get_thread_process): Make global.
14594 * server.h (get_thread_process): Add prototype.
14595 * thread-db.c (find_one_thread): Use get_thread_process
14596 instead of current_process.
14597 (thread_db_get_tls_address): Do not crash if called when
14598 thread layer is not yet initialized.
14600 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14602 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14603 * spu-low.c (current_tid): Rename to ...
14604 (current_ptid): ... this.
14605 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14606 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14607 ptid_get_lwp (current_ptid) instead of current_tid.
14608 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14609 instead of current_tid. Use find_process_pid to verify pid
14610 argument is valid. Pass proper argument to remove_process.
14611 (spu_thread_alive): Compare current_ptid instead of current_tid.
14612 (spu_resume): Likewise.
14614 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14616 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14619 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14621 Implement the multiprocess extensions, and add linux multiprocess
14624 * server.h (ULONGEST): Declare.
14625 (struct ptid, ptid_t): New.
14626 (minus_one_ptid, null_ptid): Declare.
14627 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14628 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14629 (struct inferior_list_entry): Change `id' type from unsigned from
14631 (struct sym_cache, struct breakpoint, struct
14632 process_info_private): Forward declare.
14633 (struct process_info): Declare.
14634 (current_process): Declare.
14635 (all_processes): Declare.
14636 (initialize_inferiors): Declare.
14637 (add_thread): Adjust to use ptid_t.
14638 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14639 (add_process, remove_process, find_thread_pid): Declare.
14640 (find_inferior_id): Adjust to use ptid_t.
14641 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14642 (multi_process): Declare.
14643 (push_event): Adjust to use ptid_t.
14644 (read_ptid, write_ptid): Declare.
14645 (prepare_resume_reply): Adjust to use ptid_t.
14646 (clear_symbol_cache): Declare.
14647 * inferiors.c (all_processes): New.
14648 (null_ptid, minus_one_ptid): New.
14649 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14650 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14651 (add_thread): Change unsigned long to ptid. Remove gdb_id
14653 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14654 (gdb_id_to_thread): Rename to ...
14655 (find_thread_pid): ... this. Change unsigned long to ptid.
14656 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14657 (loaded_dll, pull_pid_from_list): Adjust.
14658 (add_process, remove_process, find_process_pid)
14659 (get_thread_process, current_process, initialize_inferiors): New.
14660 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14661 (struct target_waitstatus) <related_pid>: Ditto.
14662 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14663 return type to int.
14664 (struct target_ops) <join>: Add `pid' argument.
14665 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14666 (struct target_ops) <wait>: Add `ptid' field. Change return type
14668 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14669 (mywait): Add `ptid' argument. Change return type to ptid_t.
14670 (target_pid_to_str): Declare.
14671 * target.c (set_desired_inferior): Adjust to use ptids.
14672 (mywait): Add new `ptid' argument. Adjust.
14673 (target_pid_to_str): New.
14674 * mem-break.h (free_all_breakpoints): Declare.
14675 * mem-break.c (breakpoints): Delelete.
14676 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14677 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14678 to use per-process breakpoint list.
14679 (free_all_breakpoints): New.
14680 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14681 (symbol_cache, all_symbols_looked_up): Delete.
14683 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14685 (prepare_resume_reply): Change ptid argument's type from unsigned
14686 long to ptid_t. Adjust. Implement W;process and X;process.
14687 (free_sym_cache, clear_symbol_cache): New.
14688 (look_up_one_symbol): Adjust to per-process symbol cache. *
14689 * server.c (cont_thread, general_thread, step_thread): Change type
14691 (attached): Delete.
14692 (multi_process): New.
14693 (last_ptid): Change type to ptid_t.
14694 (struct vstop_notif) <ptid>: Change type to ptid_t.
14695 (queue_stop_reply, push_event): Change `ptid' argument's type to
14697 (discard_queued_stop_replies): Add `pid' argument.
14698 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14699 changes. Don't reference the `attached' global.
14700 (attach_inferior): Adjust to mywait interface changes.
14701 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14702 features. Handle and report "multiprocess+". Handle
14704 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14706 (handle_v_kill): New.
14707 (handle_v_stopped): Adjust to use target_pid_to_str.
14708 (handle_v_requests): Allow multiple attaches and runs when
14709 multiprocess extensions are in effect. Handle "vKill".
14710 (myresume): Adjust to use ptids.
14711 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14712 (handle_status): Adjust to discard_queued_stop_replies interface
14714 (first_thread_of, kill_inferior_callback)
14715 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14716 (main): Call initialize_inferiors. Adjust to use ptids, killing
14717 and detaching from all inferiors. Handle multiprocess packet
14719 * linux-low.h: Include gdb_proc_service.h.
14720 (struct process_info_private): New.
14721 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14722 <lwpid_of>: Use ptid_get_lwp.
14723 (get_lwp_thread): Adjust.
14724 (struct lwp_info): Add `dead' member.
14725 (find_lwp_pid): Declare.
14726 * linux-low.c (thread_db_active): Delete.
14727 (new_inferior): Adjust comment.
14728 (inferior_pid): Delete.
14729 (linux_add_process): New.
14730 (handle_extended_wait): Adjust.
14731 (add_lwp): Change unsigned long to ptid.
14732 (linux_create_inferior): Add process to processes table. Adjust
14733 to use ptids. Don't set new_inferior here.
14734 (linux_attach_lwp): Rename to ...
14735 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14736 it. Adjust to use ptids.
14737 (linux_attach_lwp): New.
14738 (linux_attach): Add process to processes table. Don't set
14740 (struct counter): New.
14741 (second_thread_of_pid_p, last_thread_of_process_p): New.
14742 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14743 multiple processes.
14744 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14745 processes. Remove process from process table.
14746 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14747 to multiple processes.
14748 (any_thread_of): New.
14749 (linux_detach): Add `pid' argument, and handle it. Remove process
14750 from processes table.
14751 (linux_join): Add `pid' argument. Handle it.
14752 (linux_thread_alive): Change unsighed long argument to ptid_t.
14753 Consider dead lwps as not being alive.
14754 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14755 threads we're not interested in.
14756 (same_lwp, find_lwp_pid): New.
14757 (linux_wait_for_lwp): Change `pid' argument's type from int to
14759 (linux_wait_for_event): Rename to ...
14760 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14761 from int to ptid_t. Adjust.
14762 (linux_wait_for_event): New.
14763 (linux_wait_1): Add `ptid' argument. Change return type to
14764 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14765 that exit from the process table.
14766 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14768 (mark_lwp_dead): New.
14769 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14770 stopping all threads, mark its main lwp as dead.
14771 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14773 (fetch_register, usr_store_inferior_registers)
14774 (regsets_fetch_inferior_registers)
14775 (regsets_store_inferior_registers, linux_read_memory)
14776 (linux_write_memory): Inline `inferior_pid'.
14777 (linux_look_up_symbols): Adjust to use per-process
14778 `thread_db_active'.
14779 (linux_request_interrupt): Adjust to use ptids.
14780 (linux_read_auxv): Inline `inferior_pid'.
14781 (initialize_low): Don't reference thread_db_active.
14782 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14783 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14784 (ps_getpid): Return the pid of the current inferior.
14785 * thread-db.c (proc_handle, thread_agent): Delete.
14786 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14788 (find_one_thread): Change argument type to ptid_t. Adjust to
14790 (maybe_attach_thread): Adjust to per-process data and ptids.
14791 (thread_db_find_new_threads): Ditto.
14792 (thread_db_init): Ditto.
14793 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14794 processes table. Adjust to use ptids.
14795 (spu_kill, spu_detach): Adjust interface. Remove process from
14797 (spu_join, spu_thread_alive): Adjust interface.
14798 (spu_wait): Adjust interface. Remove process from processes
14799 table. Adjust to use ptids.
14800 * win32-low.c (current_inferior_tid): Delete.
14801 (current_inferior_ptid): New.
14802 (debug_event_ptid): New.
14803 (thread_rec): Take a ptid. Adjust.
14804 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14805 (child_delete_thread): Ditto.
14806 (do_initial_child_stuff): Add `attached' argument. Add process to
14808 (child_fetch_inferior_registers, child_store_inferior_registers):
14810 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14811 (win32_attach): Pass 1 to do_initial_child_stuff.
14812 (win32_kill): Adjust interface. Remove process from processes
14814 (win32_detach): Ditto.
14815 (win32_join): Adjust interface.
14816 (win32_thread_alive): Take a ptid.
14817 (win32_resume): Adjust to use ptids.
14818 (get_child_debug_event): Ditto.
14819 (win32_wait): Adjust interface. Remove exiting process from
14822 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14824 Non-stop mode support.
14826 * server.h (non_stop): Declare.
14827 (gdb_client_data, handler_func): Declare.
14828 (delete_file_handler, add_file_handler, start_event_loop):
14830 (handle_serial_event, handle_target_event, push_event)
14831 (putpkt_notif): Declare.
14832 * target.h (enum resume_kind): New.
14833 (struct thread_resume): Replace `step' field by `kind' field.
14834 (TARGET_WNOHANG): Define.
14835 (struct target_ops) <wait>: Add `options' argument.
14836 <supports_non_stop, async, start_non_stop>: New fields.
14837 (target_supports_non_stop, target_async): New.
14838 (start_non_stop): Declare.
14839 (mywait): Add `options' argument.
14840 * target.c (mywait): Add `options' argument. Print child exit
14841 notifications here.
14842 (start_non_stop): New.
14843 * server.c (non_stop, own_buf, mem_buf): New globals.
14844 (struct vstop_notif): New.
14845 (notif_queue): New global.
14846 (queue_stop_reply, push_event, discard_queued_stop_replies)
14847 (send_next_stop_reply): New.
14848 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14850 (attach_inferior): In non-stop mode, don't wait for the target
14852 (handle_general_set): Handle QNonStop.
14853 (handle_query): When handling qC, return the current general
14854 thread, instead of the first thread of the list.
14855 (handle_query): If the backend supports non-stop mode, include
14856 QNonStop+ in the qSupported query response.
14857 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14859 (handle_v_attach, handle_v_run): Handle non-stop mode.
14860 (handle_v_stopped): New.
14861 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14862 (myresume): Adjust to use resume_kind. Handle non-stop.
14863 (queue_stop_reply_callback): New.
14864 (handle_status): Handle non-stop mode.
14865 (main): Clear non_stop flag on reconnection. Use the event-loop.
14866 Refactor serial protocol handling from here ...
14867 (process_serial_event): ... to this new function. When GDB
14868 selects any thread, select one here. In non-stop mode, wait until
14869 GDB acks all pending events before exiting.
14870 (handle_serial_event, handle_target_event): New.
14871 * remote-utils.c (remote_open): Install remote_desc in the event
14873 (remote_close): Remove remote_desc from the event loop.
14874 (putpkt_binary): Rename to...
14875 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14876 (putpkt_binary): New as wrapper around putpkt_binary_1.
14877 (putpkt_notif): New.
14878 (prepare_resume_reply): In non-stop mode, don't change the
14880 * event-loop.c: New.
14881 * Makefile.in (OBJ): Add event-loop.o.
14882 (event-loop.o): New rule.
14884 * linux-low.h (pid_of): Moved here.
14886 (get_lwp_thread): Use lwpid_of.
14887 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14888 * linux-low.c (pid_of): Delete.
14889 (inferior_pid): Use lwpid_of.
14890 (linux_event_pipe): New.
14891 (target_is_async_p): New.
14893 (handle_extended_wait): Use lwpid_of.
14894 (add_lwp): Don't set lwpid field.
14895 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14896 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14897 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14898 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14899 first. Adjust to linux_wait_for_event interface changes. Use
14901 (linux_detach): Don't delete the main lwp here.
14902 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14903 (status_pending_p): Don't consider explicitly suspended lwps.
14904 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14905 pointer. Add OPTIONS argument. Change return type to int. Use
14906 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14907 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14908 pointer. Add status pointer argument. Return a pid instead of a
14909 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14910 changes. In non-stop mode, don't switch to a random thread.
14911 (linux_wait): Rename to...
14912 (linux_wait_1): ... this. Add target_options argument, and handle
14913 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14914 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14915 clean exit and signal exit code. Don't stop all threads in
14916 non-stop mode. In all-stop mode, only stop all threads when
14917 reporting a stop to GDB. Handle explicit thread stop requests.
14918 (async_file_flush, async_file_mark): New.
14920 (send_sigstop): Use lwpid_of.
14921 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14922 interface changes. In non-stop mode, don't switch to a random
14924 (linux_resume_one_lwp): Use lwpid_of.
14925 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14926 (linux_resume_one_thread): ... this. Handle resume_stop. In
14927 non-stop mode, don't look for pending flag in all threads.
14928 (resume_status_pending_p): Don't consider explicitly suspended
14930 (my_waitpid): Reimplement. Emulate __WALL.
14931 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14933 (sigchld_handler, linux_supports_non_stop, linux_async)
14934 (linux_start_non_stop): New.
14935 (linux_target_ops): Register linux_supports_non_stop, linux_async
14936 and linux_start_non_stop.
14937 (initialize_low): Install SIGCHLD handler.
14938 * thread-db.c (thread_db_create_event, find_one_thread)
14939 (thread_db_get_tls_address): Use lwpid_of.
14940 * win32-low.c (win32_detach): Adjust to use resume_kind.
14941 (win32_wait): Add `options' argument.
14942 * spu-low.c (spu_resume): Adjust to use resume_kind.
14943 (spu_wait): Add `options' argument.
14945 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14947 Decouple target code from remote protocol.
14949 * target.h (enum target_waitkind): New.
14950 (struct target_waitstatus): New.
14951 (struct target_ops) <wait>: Return an unsigned long. Take a
14952 target_waitstatus pointer instead of a char pointer.
14953 (mywait): Likewise.
14954 * target.c (mywait): Change prototype to return an unsigned long.
14955 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14956 * server.h (thread_from_wait, old_thread_from_wait): Delete
14958 (prepare_resume_reply): Change prototype to take a
14960 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14961 (last_status, last_ptid): New.
14962 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14963 pid instead of a signal.
14964 (attach_inferior): Remove "status" and "signal" parameters.
14966 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14968 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14969 (handle_v_requests, myresume): Remove "status" and "signal"
14970 parameters. Adjust.
14971 (handle_status): New.
14972 (main): Delete local `status'. Adjust.
14973 * remote-utils.c: Include target.h.
14974 (prepare_resume_reply): Change prototype to take a
14975 target_waitstatus. Adjust.
14977 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14979 * spu-low.c (spu_wait): Adjust.
14980 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14982 (win32_wait): Adjust.
14984 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14986 * target.h (struct thread_resume): Delete leave_stopped member.
14987 (struct target_ops): Add a `n' argument to the `resume' callback.
14988 * server.c (start_inferior): Adjust.
14989 (handle_v_cont, myresume): Adjust.
14990 * linux-low.c (check_removed_breakpoint): Adjust to resume
14991 interface change, and to removed leave_stopped field.
14992 (resume_ptr): Delete.
14993 (struct thread_resume_array): New.
14994 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14995 resume interface change.
14996 (linux_continue_one_thread, linux_queue_one_thread)
14997 (resume_status_pending_p): Check if the resume field is NULL
14998 instead of checking the leave_stopped member.
14999 (linux_resume): Adjust to the target resume interface change.
15000 * spu-low.c (spu_resume): Adjust to the target resume interface
15002 * win32-low.c (win32_detach, win32_resume): Ditto.
15004 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15006 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15008 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15010 (linux_continue_one_thread): Only preserve the stepping flag if
15011 there's a pending breakpoint.
15013 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15015 * server.c (main): After the inferior having exited, call
15016 remote_close before exiting gdbserver.
15018 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15020 Fix size of FPSCR in Power 7 processors.
15021 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15022 (PPC_FEATURE_HAS_DFP): New #define.
15023 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15026 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15028 * server.c (handle_query) Whitespace and formatting.
15030 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15032 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15033 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15034 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15035 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15036 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15037 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15038 Makefile.in, configure.ac: Fix whitespace throughout.
15039 * configure: Regenerate.
15041 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15043 * inferiors.c (find_inferior): Make it safe for the callback
15044 function to delete the currently iterated inferior.
15046 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15048 * Makefile.in (linuw_low_h): Move higher.
15049 (thread-db.o): Depend on $(linux_low_h).
15051 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15053 Rename "process" to "lwp" throughout.
15055 * linux-low.c (all_processes): Rename to...
15056 (all_lwps): ... this.
15057 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15058 (add_process): Rename to ...
15059 (add_lwp): ... this. Adjust.
15060 (linux_create_inferior): Adjust.
15061 (linux_attach_lwp): Adjust.
15062 (linux_attach): Adjust.
15063 (linux_kill_one_process): Rename to ...
15064 (linux_kill_one_lwp): ... this. Adjust.
15065 (linux_kill): Adjust.
15066 (linux_detach_one_process): Rename to ...
15067 (linux_detach_one_lwp): ... this. Adjust.
15068 (linux_detach): Adjust.
15069 (check_removed_breakpoint): Adjust.
15070 (status_pending_p): Adjust.
15071 (linux_wait_for_process): Rename to ...
15072 (linux_wait_for_lwp): ... this. Adjust.
15073 (linux_wait_for_event): Adjust.
15074 (send_sigstop): Adjust.
15075 (wait_for_sigstop): Adjust.
15076 (stop_all_processes): Rename to ...
15077 (stop_all_lwps): ... this.
15078 (linux_resume_one_process): Rename to ...
15079 (linux_resume_one_lwp): ... this. Adjust.
15080 (linux_set_resume_request, linux_continue_one_thread)
15081 (linux_queue_one_thread, resume_status_pending_p)
15082 (usr_store_inferior_registers, regsets_store_inferior_registers)
15083 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15085 * linux-low.h (get_process): Rename to ...
15086 (get_lwp): ... this. Adjust.
15087 (get_thread_process): Rename to ...
15088 (get_thread_lwp): ... this. Adjust.
15089 (get_process_thread): Rename to ...
15090 (get_lwp_thread): ... this. Adjust.
15091 (struct process_info): Rename to ...
15092 (struct lwp_info): ... this.
15093 (all_processes): Rename to ...
15094 (all_lwps): ... this.
15095 * proc-service.c (ps_lgetregs): Adjust.
15096 * thread-db.c (thread_db_create_event, find_one_thread)
15097 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15099 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15101 * server.c (handle_query): Handle "qAttached".
15103 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15105 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15106 GPLv3, update license URL.
15108 2009-03-01 Doug Evans <dje@google.com>
15110 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15111 (server_h): Add gdb_signals.h.
15112 (signals.o): Update.
15113 * server.h (target_signal_from_host,target_signal_to_host_p)
15114 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15116 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15118 * remote-utils.c (getpkt): Also generate remote-debug
15119 information if noack_mode is set.
15121 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15123 * server.c (handle_query): Report qXfer:siginfo:read and
15124 qXfer:siginfo:write as supported and handle them.
15125 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15126 * linux-low.c (linux_xfer_siginfo): New.
15127 (linux_target_ops): Set it.
15129 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15131 * server.c (gdbserver_usage): Mention --remote-debug.
15132 (main): Accept '--remote-debug' switch.
15134 2009-01-18 Doug Evans <dje@google.com>
15136 * regcache.c (new_register_cache): No need to check result of xcalloc.
15137 * server.c (handle_search_memory): Back out calls to xmalloc,
15138 result is checked and error is returned to user upon failure.
15139 (handle_query): Ditto. Add more checks for result of malloc.
15140 (handle_v_cont): Check result of malloc, report error back to
15142 (handle_v_run): Ditto. Call freeargv.
15143 * server.h (freeargv): Declare.
15144 * utils.c (freeargv): New fn.
15146 2009-01-15 Doug Evans <dje@google.com>
15148 * gdbreplay.c (perror_with_name): Make arg const char *.
15149 * server.h (target_signal_to_name): Make return type const char *.
15150 * thread-db.c (thread_db_err_str): Make return type const char *.
15151 * utils.c (perror_with_name): Make arg const char *.
15153 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15155 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15156 when handling a EXIT_PROCESS_DEBUG_EVENT.
15158 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15160 * gdbreplay.c (gdbreplay_version): Update copyright year.
15161 * server.c (gdbserver_version): Likewise.
15163 2009-01-05 Doug Evans <dje@google.com>
15165 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15166 (handle_extended_wait): Improve comment.
15168 2008-12-13 Doug Evans <dje@google.com>
15170 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15171 * server.h (ATTR_MALLOC): New macro.
15172 (xmalloc,xcalloc,xstrdup): Declare.
15173 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15174 * inferiors.c: Ditto.
15175 * linux-low.c: Ditto.
15176 * mem-break.c: Ditto.
15177 * regcache.c: Ditto.
15178 * remote-utils.c: Ditto.
15181 * win32-low.c: Ditto.
15183 2008-12-12 Doug Evans <dje@google.com>
15185 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15186 in debugging printf.
15188 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15190 2008-12-09 Doug Evans <dje@google.com>
15192 * linux-low.h (struct process_info): Delete member tid, unused.
15193 * thread-db.c (find_one_thread): Update.
15194 (maybe_attach_thread): Update.
15196 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15198 * target.h (struct target_ops): Add qxfer_osdata member.
15199 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15201 (linux_qxfer_osdata): New functions.
15202 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15204 * server.c (handle_query): Handle "qXfer:osdata:read:".
15205 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15206 (buffer_xml_printf): New functions.
15207 * server.h (struct buffer): New.
15208 (buffer_grow_str, buffer_grow_str0): New macros.
15209 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15210 (buffer_xml_printf): Declare.
15212 2008-11-24 Doug Evans <dje@google.com>
15214 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15216 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15218 * server.c (handle_v_run): Always use the supplied argument list.
15220 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15222 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15223 (xtensa_regmap_table): Add entry for scompare1.
15225 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15227 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15228 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15229 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15230 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15231 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15232 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15233 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15234 XML target descriptions.
15235 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15236 when inferior is running on an ISA 2.05 or later processor. Add
15237 special case to return offset for full 64-bit slot of FPSCR when
15240 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15242 * Makefile.in (SFILES, clean): Added sparc64 files.
15243 (reg-sparc64.o, reg-sparc64.c): New.
15244 * configure.srv (sparc*-*-linux*): New configuration.
15245 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15246 syscall arguments for SPARC.
15247 (regsets_store_inferior_registers): Likewise.
15248 * linux-sparc-low.c: New file.
15250 2008-10-21 Doug Evans <dje@google.com>
15252 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15253 (READLINE_DIR,READLINE_DEP): Delete.
15254 (INTERNAL_CFLAGS): Update.
15255 (LINTFLAGS): Update.
15257 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15259 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15260 whole argv from the last run, not just argv[0].
15262 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15264 * regcache.c (new_register_cache): Return NULL if the register
15265 cache size isn't known yet.
15266 (free_register_cache): Avoid dereferencing a NULL regcache.
15268 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15270 * configure.srv: Merge MIPS and MIPS64.
15272 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15274 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15276 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15278 * Makefile.in: Add required vsx dependencies.
15280 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15281 Declare init_registers_powerpc_vsx32l.
15282 Declare init_registers_powerpc_vsx64l.
15283 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15284 (ppc_arch_setup): Check for VSX in hwcap.
15285 (ppc_fill_vsxregset): New function.
15286 (ppc_store_vsxregset): New function.
15287 Add new VSX entry in regset_info target_regsets.
15289 * configure.srv: Add new VSX dependencies.
15291 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15293 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15294 (remote_open): Set or clear transport_is_reliable.
15295 (putpkt_binary): Don't expect acks in noack mode.
15296 (getpkt): Don't send ack/nac in noack mode.
15297 * server.c (handle_general_set): Handle QStartNoAckMode.
15298 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15300 (main): Reset noack_mode on every connection.
15301 * server.h (noack_mode): Declare.
15303 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15305 * Makefile.in (GDBREPLAY_OBS): New variable.
15306 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15308 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15309 Daniel Jacobowitz <dan@codesourcery.com>
15311 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15312 (usr_store_inferior_registers): Likewise.
15313 (regsets_store_inferior_registers): Likewise.
15315 2008-07-31 Rolf Jansen <rj@surtec.com>
15316 Pedro Alves <pedro@codesourcery.com>
15318 * configure.ac: Check for memmem declaration.
15319 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15320 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15321 (disable_packet_qfThreadInfo): Unconditionally compile.
15322 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15323 * configure, config.in: Regenerate.
15325 2008-07-28 Doug Kwan <dougkwan@google.com>
15327 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15328 (linux_write_memory): Remove declaration of errno.
15330 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15332 * linux-low.c (handle_extended_wait): Do not use "status"
15333 variable uninitialized.
15335 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15337 * server.c (handle_v_attach): Inhibit reporting dll changes.
15339 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15341 * remote-utils.c (prepare_resume_reply): If requested, don't
15342 output "thread:TID" in the T stop reply.
15344 * server.c (disable_packet_vCont, disable_packet_Tthread)
15345 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15346 (handle_query): If requested, disable support for qC, qfThreadInfo
15348 (handle_v_requests): If requested, disable support for vCont.
15349 (gdbserver_show_disableable): New.
15350 (main): Handle --disable-packet and --disable-packet=LIST.
15352 * server.h (disable_packet_vCont, disable_packet_Tthread)
15353 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15355 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15357 * server.c (gdbserver_usage): Mention --version.
15359 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15361 * Makefile.in (gdbreplay.o): New rule.
15363 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15365 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15366 message, not gdbserver.
15368 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15369 Nathan Sidwell <nathan@codesourcery.com>
15370 Joseph Myers <joseph@codesourcery.com>
15372 * acinclude.m4: Include ../../config/acx.m4.
15373 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15374 * configure, config.in: Regenerate.
15375 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15376 * server.c (gdbserver_version): Print PKGVERSION.
15377 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15378 (main): Adjust gdbserver_usage calls.
15379 * gdbreplay.c (version, host_name): Add declarations.
15380 (gdbreplay_version, gdbreplay_usage): New.
15381 (main): Accept --version and --help options.
15383 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15385 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15386 (arm_breakpoint_at): Handle Thumb.
15387 (the_low_target): Add comment.
15389 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15391 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15393 2008-05-09 Doug Evans <dje@google.com>
15395 * server.h (decode_search_memory_packet): Declare.
15396 * remote-utils.c (decode_search_memory_packet): New fn.
15397 * server.c (handle_search_memory_1): New fn.
15398 (handle_search_memory): New fn.
15399 (handle_query): Process qSearch:memory packets.
15401 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15403 * regcache.c (registers_length): Remove.
15404 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15405 full register packet.
15406 * regcache.h (registers_length): Remove prototype.
15407 * server.h (PBUFSIZ): Define to 16384.
15409 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15411 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15412 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15413 powerpc-64l.o, and powerpc-altivec64l.o.
15414 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15415 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15416 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15417 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15418 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15421 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15422 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15423 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15424 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15425 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15426 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15427 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15428 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15429 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15430 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15433 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15434 (init_registers_powerpc_32l): ... this new prototype.
15435 (init_registers_powerpc_32): Remove, replace by ...
15436 (init_registers_powerpc_altivec32l): ... this new prototype.
15437 (init_registers_powerpc_e500): Remove, replace by ...
15438 (init_registers_powerpc_e500l): ... this new prototype.
15439 (init_registers_ppc64): Remove, replace by ...
15440 (init_registers_powerpc_64l): ... this new prototype.
15441 (init_registers_powerpc_64): Remove, replace by ...
15442 (init_registers_powerpc_altivec64l): ... this new prototype.
15443 (ppc_num_regs): Set to 73.
15444 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15445 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15446 (ppc_cannot_store_register): Handle orig_r3 and trap.
15447 (ppc_arch_setup): Update init_registers_... calls.
15448 (ppc_fill_gregset): Handle orig_r3 and trap.
15450 * inferiors.c (clear_inferiors): Reset current_inferior.
15452 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15454 * acinclude.m4: Add override.m4.
15455 * configure: Regenerate.
15457 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15459 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15460 initial call to init_register_ppc64.
15462 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15464 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15465 single powerpc*-*-linux* case.
15466 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15468 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15470 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15471 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15473 * linux-ppc-low.c: Include <elf.h>.
15474 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15475 (ppc_hwcap): New global variable.
15476 (ppc_regmap): Remove __SPE__ #ifdef sections.
15477 (ppc_regmap_e500): New global variable.
15478 (ppc_cannot_store_register): Update __SPE__ special case.
15479 (ppc_get_hwcap): New function.
15480 (ppc_arch_setup): Use it to determine whether inferior supports
15481 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15482 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15483 Do not access registers if target does not support AltiVec.
15484 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15485 Do not access registers if target does not support SPE.
15486 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15488 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15490 * linux-low.c (disabled_regsets, num_regsets): New.
15491 (use_regsets_p): Delete.
15492 (linux_wait_for_process): Clear disabled_regsets.
15493 (regsets_fetch_inferior_registers): Check and set it.
15494 (regsets_store_inferior_registers): Likewise.
15495 (linux_fetch_registers, linux_store_registers): Do not use
15497 (initialize_low): Allocate disabled_regsets.
15499 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15501 * Makefile.in (LIBOBJS): New.
15502 (OBS): Use LIBOBJS.
15503 (memmem.o): New rule.
15504 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15505 * configure: Regenerated.
15507 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15509 * server.c (handle_query): Never return "unsupported" for
15510 qXfer:features:read queries.
15512 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15514 * server.c (get_features_xml): Fix inverted condition.
15515 (handle_query): Always support qXfer:feature:read.
15517 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15519 * server.c (wrapper_argv): New.
15520 (start_inferior): Handle wrapper_argv. If set, expect an extra
15522 (gdbserver_usage): Document --wrapper.
15523 (main): Parse --wrapper.
15525 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15527 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15528 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15529 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15530 (ppc_set_pc): Likewise.
15531 (ppc_arch_setup): New function.
15532 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15533 of collect_register.
15534 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15536 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15538 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15539 instead of linux-ppc64-low.o.
15540 * linux-ppc64-low.c: Remove file.
15541 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15542 (linux-ppc64-low.o): Remove rule.
15544 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15545 (init_registers_powerpc_64): Likewise.
15546 (ppc_regmap): Conditionally define depending on __powerpc64__.
15547 (ppc_cannot_store_register): Do not special-case "fpscr" when
15548 compiled on __powerpc64__.
15549 (ppc_collect_ptrace_register): New function.
15550 (ppc_supply_ptrace_register): New function.
15551 (ppc_breakpoint): Change type to "unsigned int".
15552 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15553 (the_low_target): Conditionally provide initializers for the
15554 arch_setup member depending on __powerpc64__. Install
15555 collect_ptrace_register and supply_ptrace_register members.
15557 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15559 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15560 * server.c (gdbserver_xmltarget): Define.
15561 (get_features_xml): Use it to replace "target.xml" and arch_string.
15563 * configure.srv: Remove srv_xmltarget. Add XML files that were
15564 mentioned there to srv_xmlfiles instead. Remove conditional tests
15565 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15566 srv_xmlfiles and srv_regobj to include all possible choices.
15567 * configure.ac (srv_xmltarget): Remove.
15568 (srv_xmlfiles): Do not add "target.xml".
15569 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15570 checks for supplementary target information.
15571 * configure: Regenerate.
15572 * Makefile.in (XML_TARGET): Remove.
15573 (target.xml): Remove rule.
15574 (clean): Do not clean up target.xml.
15575 (.PRECIOUS): Do not mention target.xml.
15577 * target.h (struct target_ops): Remove arch_string member.
15578 * linux-low.c (linux_arch_string): Remove.
15579 (linux_target_ops): Remove arch_string initializer.
15580 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15581 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15582 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15583 * spu-low.c (spu_arch_string): Remove.
15584 (spu_target_ops): Remove arch_string initializer.
15585 * win32-low.c (win32_arch_string): Remove.
15586 (win32_target_ops): Remove arch_string initializer.
15587 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15588 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15589 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15591 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15593 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15594 by collect_ptrace_register and supply_ptrace_register hooks.
15595 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15596 instead of checking for the_low_target.left_pad_xfer.
15597 (usr_store_inferior_registers): Use collect_ptrace_register callback
15598 instead of checking for the_low_target.left_pad_xfer.
15600 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15601 (s390_supply_ptrace_register): Likewise.
15602 (s390_fill_gregset): Call s390_collect_ptrace_register.
15603 (the_low_target): Update.
15605 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15606 (ppc_supply_ptrace_register): Likewise.
15607 (the_low_target): Update.
15609 * linux-i386-low.c (the_low_target): Update.
15610 * linux-x86-64-low.c (the_low_target): Update.
15612 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15614 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15615 reg-s390.o and reg-s390x.o.
15617 * linux-low.c (new_inferior): New global variable.
15618 (linux_create_inferior, linux_attach): Set it.
15619 (linux_wait_for_process): Call the_low_target.arch_setup after the
15620 target has stopped for the first time.
15621 (initialize_low): Do not call the_low_target.arch_setup.
15623 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15624 (s390_set_pc): Likewise.
15625 (s390_arch_setup): New function.
15626 (the_low_target): Use s390_arch_setup as arch_setup routine.
15628 * regcache.c (realloc_register_cache): New function.
15629 (set_register_cache): Call it for each existing regcache.
15631 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15633 * server.h (init_registers): Remove prototype.
15635 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15636 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15637 instead of init_registers ().
15638 * linux-arm-low.c (init_registers_arm): Add prototype.
15639 (init_registers_arm_with_iwmmxt): Likewise.
15640 (the_low_target): Add initializer for arch_setup field.
15641 * linux-cris-low.c (init_registers_cris): Add prototype.
15642 (the_low_target): Add initializer for arch_setup field.
15643 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15644 (the_low_target): Add initializer for arch_setup field.
15645 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15646 (the_low_target): Add initializer for arch_setup field.
15647 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15648 (the_low_target): Add initializer for arch_setup field.
15649 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15650 (the_low_target): Add initializer for arch_setup field.
15651 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15652 (the_low_target): Add initializer for arch_setup field.
15653 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15654 (init_registers_mips64_linux): Likewise.
15655 (the_low_target): Add initializer for arch_setup field.
15656 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15657 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15658 (the_low_target): Add initializer for arch_setup field.
15659 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15660 (init_registers_powerpc_64): Likewise.
15661 (the_low_target): Add initializer for arch_setup field.
15662 * linux-s390-low.c (init_registers_s390): Add prototype.
15663 (init_registers_s390x): Likewise.
15664 (the_low_target): Add initializer for arch_setup field.
15665 * linux-sh-low.c (init_registers_sh): Add prototype.
15666 (the_low_target): Add initializer for arch_setup field.
15667 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15668 (the_low_target): Add initializer for arch_setup field.
15669 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15670 (the_low_target): Add initializer for arch_setup field.
15672 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15673 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15674 instead of init_registers ().
15675 * win32-arm-low.c (init_registers_arm): Add prototype.
15676 (the_low_target): Add initializer for arch_setup field.
15677 * win32-i386-low.c (init_registers_i386): Add prototype.
15678 (the_low_target): Add initializer for arch_setup field.
15680 * spu-low.c (init_registers_spu): Add prototype.
15681 (initialize_low): Call initialie_registers_spu () instead of
15682 initialize_registers ().
15684 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15686 * server.c (handle_v_requests): When handling the vRun and vAttach
15687 packets, if already debugging a process, don't kill it. Return an
15690 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15692 * server.c (handle_query): Correct length check.
15694 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15696 * win32-low.c (do_initial_child_stuff): Add process handle
15697 parameter. Set current_process_handle and current_process_id from the
15698 parameters. Clear globals.
15699 (win32_create_inferior): Don't set current_process_handle and
15700 current_process_id here. Instead pass them on the call to
15701 do_initial_child_stuff.
15702 (win32_attach): Likewise.
15703 (win32_clear_inferiors): New.
15704 (win32_kill): Don't close the current process handle or the
15705 current thread handle here. Instead call win32_clear_inferiors.
15706 (win32_detach): Don't open a new handle to the process. Call
15707 win32_clear_inferiors.
15708 (win32_join): Don't rely on current_process_handle; open a new
15709 handle using the process id.
15710 (win32_wait): Call win32_clear_inferiors when the inferior process
15713 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15715 * server.c (monitor_show_help): Add "exit".
15717 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15719 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15720 (clean): Add reg-xtensa.c.
15721 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15722 * configure.srv (xtensa*-*-linux*) New target.
15723 * linux-xtensa-low.c: New.
15724 * xtensa-xtregs.c: New.
15726 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15728 * hostio.c: Don't include errno.h.
15729 (errno_to_fileio_errno): Move to hostio-errno.
15730 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15731 error number outputting to the target->hostio_last_error callback.
15732 (hostio_packet_error): Use FILEIO_EINVAL directly.
15733 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15734 calls to hostio_error.
15735 * hostio-errno.c: New.
15736 * server.h (hostio_last_error_from_errno): Declare.
15737 * target.h (target_ops): Add hostio_last_error member.
15738 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15739 as hostio_last_error handler.
15740 * spu-low.c (spu_target_ops): Likewise.
15741 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15742 (wince_hostio_last_error): New functions.
15743 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15744 as hostio_last_error handler.
15745 (win32_target_ops) [!_WIN32_WCE]: Register
15746 hostio_last_error_from_errno as hostio_last_error handler.
15747 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15748 (hostio-errno.o): New rule.
15749 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15750 * configure.srv (srv_hostio_err_objs): New variable. Default to
15752 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15753 * configure: Regenerate.
15755 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15757 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15758 (linux_kill, linux_detach): Clean up the process list.
15759 * remote-utils.c (remote_open): Improve port number parsing.
15760 (putpkt_binary, input_interrupt): Only send interrupts if the target
15762 * server.c (extended_protocol): Make static.
15763 (attached): Define earlier.
15764 (exit_requested, response_needed, program_argv): New variables.
15765 (target_running): New.
15766 (start_inferior): Clear attached here.
15767 (attach_inferior): Set attached here.
15768 (require_running): Define.
15769 (handle_query): Use require_running and target_running. Implement
15771 (handle_v_attach, handle_v_run): New.
15772 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15773 (gdbserver_usage): Update.
15774 (main): Redo argument parsing. Handle --debug and --multi. Handle
15775 --attach along with other options or after the port. Save
15776 program_argv. Support no initial program. Resynchronize
15777 communication with GDB after an error. Handle "monitor exit".
15778 Use require_running and target_running. Always allow the extended
15779 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15780 restart in extended mode.
15781 * README: Refer to the GDB manual. Update --attach usage.
15783 2007-12-20 Andreas Schwab <schwab@suse.de>
15785 * linux-low.c (STACK_SIZE): Define.
15786 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15787 (linux_test_for_tracefork): Likewise.
15789 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15791 * linux-low.c (linux_wait_for_event): Update messages. Do not
15792 reinsert auto-delete breakpoints.
15793 * mem-break.c (struct breakpoint): Change return type of handler to
15795 (set_breakpoint_at): Update handler type.
15796 (reinsert_breakpoint_handler): Return 1 instead of calling
15798 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15800 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15801 * mem-break.h (set_breakpoint_at): Update handler type.
15802 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15803 * win32-low.c (auto_delete_breakpoint): New.
15804 (get_child_debug_event): Use it.
15806 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15808 * configure.ac: Check for pread and pwrite.
15809 * hostio.c (handle_pread): Fall back to lseek and read.
15810 (handle_pwrite): Fall back to lseek and write.
15811 * config.in, configure: Regenerated.
15813 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15815 * server.c (myresume): Add own_buf argument.
15816 (main): Update calls.
15818 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15820 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15821 * remote-utils.c (remote_open): Do not call disable_async_io.
15822 (block_async_io): Delete.
15823 (unblock_async_io): Make static.
15824 (initialize_async_io): New.
15825 * server.c (handle_v_cont): Handle async I/O here.
15826 (myresume): Likewise. Move other common resume tasks here...
15827 (main): ... from here. Call initialize_async_io. Disable async
15828 I/O before the main loop.
15829 * server.h (initialize_async_io): Declare.
15830 (block_async_io, unblock_async_io): Delete prototypes.
15831 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15833 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15835 * remote-utils.c (readchar): Allow binary data in received messages.
15837 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15839 * win32-low.c (attaching): New global.
15840 (win32_create_inferior): Clear the `attaching' global.
15841 (win32_attach): Set the `attaching' global.
15842 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15843 attaching. Only set a breakpoint at the entry point if not
15846 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15848 * server.c (main): Don't report dll events on the initial
15849 connection on attaches.
15851 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15853 * server.c (main): Relax numerical bases supported for the pid of
15854 the --attach command line argument.
15856 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15858 * win32-low.c (win32_attach): Call OpenProcess before
15859 DebugActiveProcess, not after. Add last error output to error
15862 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15864 * win32-low.c (win32_get_thread_context)
15865 (win32_set_thread_context): New functions.
15866 (thread_rec): Use win32_get_thread_context.
15867 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15868 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15871 2007-12-03 Leo Zayas
15872 Pedro Alves <pedro_alves@portugalmail.pt>
15874 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15876 (child_add_thread): Minor cleanup.
15877 (child_continue): Resume artificially suspended threads before
15878 calling ContinueDebugEvent.
15879 (suspend_one_thread): New.
15880 (fake_breakpoint_event): New.
15881 (get_child_debug_event): Change return type to int. Check here if
15882 gdb sent an interrupt request. If a soft interrupt was requested,
15883 fake a breakpoint event. Return 0 if there is no event to handle,
15885 (win32_wait): Don't check here if gdb sent an interrupt request.
15886 Ensure there is a valid event to handle.
15887 (win32_request_interrupt): Add soft interruption method as last
15890 2007-12-03 Leo Zayas
15891 Pedro Alves <pedro_alves@portugalmail.pt>
15893 * win32-low.h (win32_thread_info): Add descriptions to the
15894 structure members. Replace `suspend_count' counter by a
15896 * win32-low.c (thread_rec): Update condition of when to get the
15897 context from the inferior. Rely on ContextFlags being set if it
15898 has already been retrieved. Only suspend the inferior thread if
15899 we haven't already. Warn if that fails.
15900 (continue_one_thread): s/suspend_count/suspended/. Only call
15901 ResumeThread once. Warn if that fails.
15903 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15905 * win32-low.c (win32_wait): Don't read from the inferior when it
15906 has already exited.
15908 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15910 * Makefile.in (win32_low_h): New variable.
15911 (win32-low.o): Add dependency on $(win32_low_h).
15912 (win32-arm-low.o, win32-i386-low.o): New rules.
15914 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15916 * hostio.c: Correct copyright year.
15918 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15920 * Makefile.in (OBS): Add hostio.o.
15921 (hostio.o): New rule.
15922 * server.h (handle_vFile): Declare.
15923 * hostio.c: New file.
15924 * server.c (handle_v_requests): Take packet_len and new_packet_len
15925 for binary packets. Call handle_vFile.
15926 (main): Update call to handle_v_requests.
15928 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15930 * linux-low.c: Include <sched.h>.
15932 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15934 * linux-low.c (linux_tracefork_grandchild): New.
15935 (linux_tracefork_child): Use clone.
15936 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15938 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15940 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15942 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15944 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15946 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15948 * inferiors.c (change_inferior_id): Delete.
15949 (add_pid_to_list, pull_pid_from_list): New.
15950 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15951 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15952 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15953 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15954 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15955 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15956 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15957 (using_threads): Always set to 1.
15958 (handle_extended_wait): New.
15959 (add_process): Do not set TID.
15960 (linux_create_inferior): Set must_set_ptrace_flags.
15961 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15962 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15963 (linux_thread_alive): Rename TID argument to LWPID.
15964 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15965 (linux_wait_for_event): Do not use TID or check using_threads. Update
15966 call to dead_thread_notify. Call handle_extended_wait.
15967 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15968 (send_sigstop): Delete sigstop_sent.
15969 (wait_for_sigstop): Avoid TID.
15970 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15971 (linux_test_for_tracefork): New.
15972 (linux_lookup_signals): Use thread_db_active and
15973 linux_supports_tracefork_flag.
15974 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15975 * linux-low.h (get_process_thread): Avoid TID.
15976 (struct process_ifo): Move thread_known and tid to the end. Remove
15978 (linux_attach_lwp, thread_db_init): Update prototypes.
15979 * server.h (change_inferior_id): Delete prototype.
15980 (add_pid_to_list, pull_pid_from_list): New prototypes.
15981 * thread-db.c (thread_db_use_events): New.
15982 (find_first_thread): Rename to...
15983 (find_one_thread): ...this. Update callers and messages. Do not
15984 call fatal. Check thread_db_use_events. Do not call
15985 change_inferior_id or new_thread_notify.
15986 (maybe_attach_thread): Update. Do not call new_thread_notify.
15987 (thread_db_init): Set thread_db_use_events. Check use_events.
15988 * utils.c (fatal, warning): Correct message prefix.
15990 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15992 * Makefile.in (clean): Remove new files.
15993 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15994 (powerpc-64.o, powerpc-64.c): New rules.
15995 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15996 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15998 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16000 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16001 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16002 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16003 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16004 (target_regsets): Add AltiVec and SPE register sets.
16005 * configure.ac: Check for AltiVec and SPE.
16006 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16007 (ppc_fill_vrregset, ppc_store_vrregset): New.
16008 (target_regsets): Add AltiVec register set.
16009 * configure: Regenerated.
16011 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16013 * linux-low.c (O_LARGEFILE): Define.
16014 (linux_read_memory): Use /proc/PID/mem.
16015 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16016 * configure, config.in: Regenerated.
16018 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16020 * linux-low.c (linux_wait_for_event): Do not pass signals while
16023 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16025 * win32-low.c (create_process): New.
16026 (win32_create_inferior): Use create_process instead of
16027 CreateProcess. If create_process failed retry appending an ".exe"
16028 suffix. Store the GetLastError result immediatelly after
16029 create_process calls and use it on the call to error.
16031 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16033 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16035 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16037 * configure.ac: Switch license to GPLv3.
16039 2007-08-01 Michael Snyder <msnyder@access-company.com>
16041 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16043 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16045 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16047 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16048 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16049 CloseToolhelp32Snapshot.
16050 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16051 CloseToolhelp32Snapshot.
16053 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16055 * server.c (main): Check for inferior exit before main loop.
16057 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16059 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16060 instead of on tmp_desc.
16062 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16063 Daniel Jacobowitz <dan@codesourcery.com>
16065 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16066 (add_thread): Minor cleanups.
16067 (clear_inferiors): Move lower in the file. Clear the DLL
16069 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16070 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16071 (xml_escape_text): New.
16072 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16074 (handle_v_cont): Report errors.
16075 (gdbserver_version): Update.
16076 (main): Correct size of own_buf. Do not report initial DLL events.
16077 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16078 (unloaded_dll, xml_escape_text): New.
16079 * win32-low.c (enum target_waitkind): Update comments.
16080 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16081 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16082 (win32_EnumProcessModules, win32_GetModuleInformation)
16083 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16084 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16085 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16086 (win32_Module32First, win32_Module32Next, load_toolhelp)
16087 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16088 (get_child_debug_event): Handle DLL events.
16089 (win32_wait): Likewise.
16091 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16093 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16094 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16096 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16098 * win32-low.c (handle_output_debug_string): Ignore event if not
16101 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16103 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16105 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16107 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16109 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16111 * inferiors.c (change_inferior_id): Add comment.
16112 * linux-low.c (check_removed_breakpoint): Add an early
16113 prototype. Improve debug output.
16114 (linux_attach): Doc update.
16115 (linux_detach_one_process, linux_detach): Clean up before releasing
16117 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16118 * linux-low.h (struct process_info): Doc improvement.
16119 * mem-break.c (delete_all_breakpoints): New.
16120 * mem-break.h (delete_all_breakpoints): New prototype.
16121 * thread-db.c (find_first_thread): New.
16122 (thread_db_create_event): Call it instead of
16123 thread_db_find_new_threads. Clean up unused variables.
16124 (maybe_attach_thread): Remove first thread handling.
16125 (thread_db_find_new_threads): Use find_first_thread.
16126 (thread_db_get_tls_address): Likewise.
16128 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16130 * thread-db.c (thread_db_find_new_threads): Add prototype.
16131 (thread_db_create_event): Check for the main thread before adding
16133 (maybe_attach_thread): Only enable event reporting if TID == 0.
16134 (thread_db_get_tls_address): Check for new threads.
16136 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16138 * linux-low.c (linux_create_inferior): Try execv before execvp.
16139 * spu-low.c (spu_create_inferior): Likewise.
16141 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16143 * linux-low.c (linux_create_inferior): Change execv to execvp.
16144 * spu-low.c (spu_create_inferior): Likewies.
16146 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16148 * Makefile.in (clean): Clean new files instead of deleted ones.
16149 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16150 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16152 * configure.srv: Specify XML files and new regformats for MIPS and
16154 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16155 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16156 an entry for the restart register.
16157 (mips_cannot_fetch_register, mips_cannot_store_register)
16158 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16159 register names to match the XML descriptions.
16160 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16161 restart register instead of $0.
16163 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16164 Markus Deuling <deuling@de.ibm.com>
16166 * remote-utils.c (decode_xfer_write): New function.
16167 * server.h (decode_xfer_write): Add prototype.
16168 * server.c (handle_query): Add PACKET_LEN argument. Support
16169 qXfer:spu:read and qXfer:spu:write packets.
16170 (main): Pass packet_len to handle_query.
16171 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16172 * target.h (target_ops): Add qxfer_spu.
16174 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16176 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16177 accessing non-seekable spufs files.
16179 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16181 * server.c (handle_query): Add reply for qC packet.
16183 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16184 Leo Zayas <lerele@champenstudios@com>
16186 * server.h (check_remote_input_interrupt_request): New function.
16187 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16188 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16189 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16190 (check_remote_input_interrupt_request): New function.
16191 * server.h (check_remote_input_interrupt_request): Declare.
16192 * win32-low.c (winapi_DebugBreakProcess,
16193 winapi_GenerateConsoleCtrlEvent): New typedefs.
16194 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16196 (win32_wait): Check for remote interrupt request
16197 with check_remote_input_interrupt_request.
16198 (win32_request_interrupt): New function.
16199 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16201 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16203 * win32-low.c (debug_registers_changed,
16204 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16205 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16206 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16207 (thread_rec): Get context using the low target.
16208 (child_add_thread): Call thread_added on the low target,
16209 which does the same thing.
16211 (do_initial_child_stuff): Remove debug registers references.
16212 Set context using the low target. Resume threads after
16213 setting the contexts.
16214 (child_continue): Remove dead variable. Remove debug
16215 registers references.
16216 (child_fetch_inferior_registers): Go through the low target.
16217 (do_child_store_inferior_registers): Remove.
16218 (child_store_inferior_registers): Go through the low target.
16219 (win32_resume): Remove debug registers references.
16220 Set context using the low target.
16221 (handle_exception): Change return type to void. Don't record
16222 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16223 first chance exception.
16224 (get_child_debug_event): Change return type to void. Remove
16225 goto loop. Always return after waiting for debug event.
16226 (win32_wait): Convert to switch statement. Handle spurious
16229 * win32-i386-low.c (debug_registers_changed,
16230 debug_registers_used): New.
16231 (initial_stuff): Rename to ...
16232 (i386_initial_stuff): ... this. Clear debug registers
16234 (store_debug_registers): Delete.
16235 (i386_get_thread_context): New.
16236 (load_debug_registers): Delete.
16237 (i386_set_thread_context): New.
16238 (i386_thread_added): New.
16239 (single_step): Rename to ...
16240 (i386_single_step): ... this.
16241 (do_fetch_inferior_registers): Rename to ...
16242 (i386_fetch_inferior_register): ... this.
16243 (i386_store_inferior_register): New.
16244 (the_low_target): Adapt to new interface.
16246 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16247 (arm_get_thread_context): New.
16248 (arm_set_thread_context): New.
16250 (do_fetch_inferior_registers): Rename to ...
16251 (arm_fetch_inferior_register): ... this.
16252 (arm_store_inferior_register): New.
16253 (arm_wince_breakpoint): Reimplement as unsigned long.
16254 (arm_wince_breakpoint_len): Define.
16255 (the_low_target): Adapt to new interface.
16257 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16258 load_debug_registers. Add get_thread_context, set_thread_context,
16259 thread_added and store_inferior_register. Rename
16260 fetch_inferior_registers to fetch_inferior_register.
16261 (regptr): Remove declaration.
16263 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16265 * linux-low.c (linux_detach): Change return type to int. Return 0.
16266 * spu-low.c (spu_detach): Likewise.
16268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16270 * target.h (target_ops): Change return type of detach to int.
16272 (join_inferior): New.
16273 * server.c (main): Don't skip detach support on mingw32.
16274 If the inferior doesn't support detaching return error.
16275 Call join_inferior instead of using waitpid.
16276 * linux-low.c (linux_join): New.
16277 (linux_target_op): Add linux_join.
16278 * spu-low.c (spu_join): New.
16279 (spu_target_ops): Add spu_join.
16280 * win32-low.c (win32_detach): Adapt to new interface.
16281 Reopen current_process_handle before detaching. Issue a child
16282 resume before detaching.
16284 (win32_target_op): Add win32_join.
16286 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16288 * win32-low.c (win32-attach): Fix return value.
16289 * target.h (target_ops): Describe ATTACH return values.
16291 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16293 * win32-low.c (GETPROCADDRESS): Define.
16294 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16295 (winapi_DebugSetProcessKillOnExit): Likewise.
16296 (win32_create_inferior): Force usage of ansi CreateProcessA.
16297 (win32_attach): Use GETPROCADDRESS.
16298 (win32_detach): Likewise.
16300 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16302 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16304 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16306 * win32-low.c: Commit leftover changes from 2007-03-29.
16308 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16310 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16311 fields short instead of int. Add explicit padding.
16312 (i387_cache_to_fsave): Remove unnecessary casts.
16313 (i387_fsave_to_cache): Doc fix.
16314 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16316 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16318 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16319 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16321 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16323 * configure.srv (arm*-*-mingw32ce*): Move near the other
16326 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16328 * configure.ac: Add errno checking.
16329 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16330 sys/file.h and malloc.h.
16331 (AC_CHECK_DECLS): Add perror.
16332 (srv_mingwce): Handle.
16333 * configure.srv (i[34567]86-*-cygwin*): Add
16334 win32-i386-low.o to srv_tgtobj.
16335 (i[34567]86-*-mingw*): Likewise.
16336 (arm*-*-mingw32ce*): Add case.
16337 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16338 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16339 [__MINGW32CE__] (strerror): New function.
16340 [__MINGW32CE__] (errno): Define to GetLastError.
16341 [__MINGW32CE__] (COUNTOF): New macro.
16342 (remote_open): Remove extra close call.
16343 * mem-break.c (delete_breakpoint_at): New function.
16344 * mem-break.h (delete_breakpoint_at): Declare.
16345 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16346 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16347 [USE_WIN32API] (read, write): Add char* casts.
16348 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16349 * server.h: Include wincecompat.h on Windows CE.
16350 [HAVE_ERRNO_H]: Check.
16351 (perror): Declare if not declared.
16352 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16353 (perror_with_name): Remove errno declaration.
16354 * wincecompat.h: New.
16355 * wincecompat.c: New.
16356 * win32-low.h: New.
16357 * win32-arm-low.c: New.
16358 * win32-i386-low.c: New.
16359 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16360 (OUTMSG2): Make it safe.
16362 (COUNTOF): New macro.
16363 (NUM_REGS): Get it from the low target.
16364 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16365 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16366 (thread_rec): Let low target handle debug registers.
16367 (child_add_thread): Likewise.
16368 (child_init_thread_list): Likewise.
16369 (continue_one_thread): Likewise.
16371 (do_child_fetch_inferior_registers): Move to ...
16372 * win32-i386-low.c: ... here, and rename to ...
16373 (do_fetch_inferior_registers): ... this.
16374 * win32-low.c (child_fetch_inferior_registers):
16375 Go through the low target.
16376 (do_child_store_inferior_registers): Use regptr.
16377 (strwinerror): New function.
16378 (win32_create_inferior): Handle Windows CE.
16379 Use strwinerror instead of strerror on Windows error
16380 codes. Add program to the error output.
16381 Don't close the main thread handle on Windows CE.
16382 (win32_attach): Use coredll.dll on Windows CE.
16383 (win32_kill): Close current process and current
16385 (win32_detach): Use coredll.dll on Windows CE.
16386 (win32_resume): Let low target handle debug registers, and
16388 (handle_exception): Add/Remove initial breakpoint. Avoid
16389 non-existant WSTOPSIG on Windows CE.
16390 (win32_read_inferior_memory): Cast to remove warning.
16391 (win32_arch_string): Go through the low target.
16392 (initialize_low): Call set_breakpoint_data with the low
16393 target's breakpoint.
16394 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16395 FOP_REGNUM, mappings): Move to ...
16396 * win32-i386-low.c: ... here.
16397 * win32-low.c (win32_thread_info): Move to ...
16398 * win32-low.h: ... here.
16399 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16400 win32-arm-low.c and wincecompat.c.
16401 (all:): Add $EXEEXT.
16402 (install-only:): Likewise.
16403 (gdbserver:): Likewise.
16404 (gdbreplay:): Likewise.
16405 * config.in: Regenerate.
16406 * configure: Regenerate.
16408 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16410 * win32-low.c: Rename typedef thread_info to
16411 win32_thread_info throughout.
16413 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16415 * win32-i386-low.c: Rename to ...
16416 * win32-low.c: ... this.
16417 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16418 * Makefile.in: Likewise.
16420 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16422 * remote-utils.c (monitor_output): Constify msg parameter.
16423 * server.h (monitor_output): Likewise.
16424 * win32-i386-low.c (handle_output_debug_string): New.
16425 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16426 handle_output_debug_string.
16427 (get_child_debug_event): Likewise.
16429 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16431 * server.c (main): Correct strtoul check.
16433 2007-03-27 Jon Ringle <jon@ringle.org>
16435 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16437 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16439 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16441 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16443 * terminal.h: Check HAVE_SGTTY_H.
16445 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16447 * remote-utils.c (remote_open): Print out the assigned port number.
16449 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16451 * remote-utils.c (monitor_output): New function.
16452 * server.c (debug_threads): Define here.
16453 (monitor_show_help): New function.
16454 (handle_query): Handle qRcmd.
16455 (main): Do not handle 'd' packet.
16456 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16457 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16460 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16462 * Makefile.in (EXEEXT): New.
16463 (clean): Use $(EXEEXT).
16465 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16467 * target.h (target_ops): Rename send_signal to request_interrupt,
16468 and remove enum target_signal parameter.
16469 * linux-low.c (linux_request_interrupt): Rename from
16470 linux_send_signal, and always send SIGINT.
16471 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16472 and always send SIGINT.
16473 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16475 (input_interrupt): Likewise.
16477 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16479 * server.c (get_features_xml): Check if target implemented
16481 * win32-i386-low.c (win32_arch_string): New.
16482 (win32_target_ops): Add win32_arch_string as arch_string member.
16484 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16486 * spu-low.c (spu_arch_string): New.
16487 (spu_target_ops): Add spu_arch_string.
16489 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16491 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16492 * configure.ac: Do not check for terminal.h.
16493 * configure, config.in: Regenerated.
16495 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16497 * Makefile.in (OBS): Add $(XML_BUILTIN).
16498 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16500 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16501 (arm-with-iwmmxt.c): New.
16502 * config.in, configure: Regenerate.
16503 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16504 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16505 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16506 (arm*-*-linux*): Add iWMMXt and regset support.
16507 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16508 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16509 (arm_store_wmmxregset, target_regsets): New.
16510 * server.c (get_features_xml): Take annex argument. Check builtin
16512 (handle_query): Handle multiple annexes.
16514 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16516 * remote-utils.c [USE_WIN32API] (read, write): Define.
16517 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16520 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16522 * linux-i386-low.c (the_low_target): Set arch_string.
16523 * linux-x86-64-low.c (the_low_target): Likewise.
16524 * linux-low.c (linux_arch_string): New.
16525 (linux_target_ops): Add it.
16526 * linux-low.h (struct linux_target_ops): Add arch_string.
16527 * server.c (write_qxfer_response): Use const void * for DATA.
16528 (get_features_xml): New.
16529 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16530 * target.h (struct target_ops): Add arch_string method.
16532 2007-01-03 Denis Pilat <denis.pilat@st.com>
16533 Daniel Jacobowitz <dan@codesourcery.com>
16535 * linux-low.c (linux_kill): Handle being called with no threads.
16536 * win32-i386-low.c (win32_kill): Likewise.
16537 (get_child_debug_event): Clear current_process_handle.
16539 2006-12-30 Denis PILAT <denis.pilat@st.com>
16540 Daniel Jacobowitz <dan@codesourcery.com>
16542 * remote-utils.c (remote_open): Check the type of specified
16543 serial port devices before opening them.
16544 * server.c (main): Kill the inferior if an error occurs during
16545 the first remote_open.
16547 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16549 * README: Update supported targets.
16551 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16553 * Makefile.in (clean): Remove reg-mips64.c.
16554 (reg-mips64.c, reg-mips64.o): New rules.
16555 * configure.srv: Handle mips64. Include regset support for mips.
16556 * linux-mips-low.c (union mips_register): New.
16557 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16558 (mips_breakpoint, mips_breakpoint_at): Use int.
16559 (mips_collect_register, mips_supply_register)
16560 (mips_collect_register_32bit, mips_supply_register_32bit)
16561 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16562 (mips_store_fpregset, target_regsets): New.
16563 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16565 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16567 * configure.srv: Add target "spu*-*-*".
16568 * Makefile.in (clean): Remove reg-spu.c.
16569 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16570 * spu-low.c: New file.
16572 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16574 * configure.ac: Correct td_thr_tls_get_addr test.
16575 * configure: Regenerated.
16577 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16579 * linux-low.c (linux_wait_for_event): Reformat. Use the
16580 pass_signals array.
16581 * remote-utils.c (decode_address_to_semicolon): New.
16582 * server.c (pass_signals, handle_general_set): New.
16583 (handle_query): Mention QPassSignals for qSupported.
16584 (main): Call handle_general_set.
16585 * server.h (pass_signals, decode_address_to_semicolon): New.
16587 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16589 * server.c (handle_query): Correct error handling for read_auxv.
16591 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16593 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16594 and srv_linux_thread_db to yes.
16595 * linux-s390-low.c (s390_fill_gregset): New function.
16596 (target_regsets): Define data structure.
16598 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16600 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16601 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16602 * config.in, configure: Regenerated.
16603 * inferiors.c (gdb_id_to_thread): New function.
16604 (gdb_id_to_thread_id): Use it.
16605 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16606 * linux-low.h (struct process_info): Add th member.
16607 (thread_db_get_tls_address): New prototype.
16608 * remote-utils.c (decode_address): Make non-static.
16609 * server.c (handle_query): Handle qGetTLSAddr.
16610 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16611 * target.h (struct target_ops): Add get_tls_address.
16612 * thread-db.c (maybe_attach_thread): Save the thread handle.
16613 (thread_db_get_tls_address): New.
16615 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16617 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16618 (linux_resume_one_process): Take a siginfo_t *. Update all
16619 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16620 (struct pending_signals): Add a siginfo_t.
16621 (linux_wait_for_process): Always set last_status.
16622 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16623 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16624 * linux-low.h (struct process_info): Add last_status.
16626 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16628 * remote-utils.c (try_rle): New function.
16629 (putpkt_binary): Use it.
16631 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16633 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16634 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16635 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16636 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16637 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16640 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16642 * server.c (terminal_fd): New variable.
16643 (old_foreground_pgrp): Likewise.
16644 (restore_old_foreground_pgrp): New function.
16645 (start_inferior): Record the terminal file descriptor in terminal_fd
16646 and its original foreground group in old_foreground_pgrp. Register
16647 restore_old_foreground_pgrp with atexit().
16649 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16651 * server.c (handle_query): Correct qPart to qXfer.
16653 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16655 * configure.ac: Check for more headers which are missing on
16656 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16657 * configure.srv: Add Cygwin and mingw32.
16658 * remote-utils.c: Don't include headers unconditionally which
16659 are missing on mingw32. Include <winsock.h> for mingw32.
16660 (remote_open): Adjust for mingw32 support. Flush
16661 standard error after writing to it.
16662 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16663 (unblock_async_io, enable_async_io, disable_async_io)
16664 (readchar, getpkt): Update for Winsock support.
16665 (prepare_resume_reply): Expect a protocol signal number.
16666 * server.c: Disable <sys/wait.h> on mingw32.
16667 (start_inferior): Adjust for mingw32 support. Flush
16668 standard error after writing to it.
16669 (attach_inferior): Likewise. Use protocol signal
16671 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16673 * win32-i386-low.c: New file.
16674 * Makefile.in (XM_CLIBS): Set.
16675 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16676 (win32-i386-low.o): New dependency rule.
16677 * linux-low.c (linux_wait): Use target signal numbers.
16678 * target.h (struct target_ops): Doc fix.
16679 * server.h (target_signal_to_name): New prototype.
16680 * gdbreplay.c: Don't include headers unconditionally which
16681 are missing on mingw32. Include <winsock.h> for mingw32.
16682 (remote_close, remote_open): Adjust for Winsock support.
16683 * configure, config.in: Regenerated.
16685 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16687 * server.c (decode_xfer_read, write_qxfer_response): New.
16688 (handle_query): Take a packet length argument. Handle
16689 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16690 the qSupported response.
16691 (main): Update call to handle_query.
16693 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16695 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16696 (putpkt_binary): Renamed from putpkt and adjusted for binary
16698 (putpkt): New wrapper for putpkt_binary.
16699 (readchar): Don't mask off the high bit.
16700 (decode_X_packet): New function.
16701 * server.c (main): Call putpkt_binary if a handler sets the packet
16702 length. Save the length of the incoming packet. Handle 'X'.
16703 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16705 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16707 * server.c (handle_query): Handle qSupported.
16709 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16711 * remote-utils.c (all_symbols_looked_up): New variable.
16712 (look_up_one_symbol): Check it.
16713 * server.h (look_up_one_symbol): New declaration.
16714 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16716 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16718 * Makefile.in (linux-arm-low.o): Update dependencies.
16719 * linux-arm-low.c: Include "gdb_proc_service.h".
16720 (PTRACE_GET_THREAD_AREA): Define.
16721 (ps_get_thread_area): New function.
16723 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16725 * configure.srv (m68k*-*-uclinux*): New target.
16726 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16727 (linux_resume_one_process): Remove extraneous cast.
16728 (linux_read_offsets): New.
16729 (linux_target_op): Add linux_read_offsets on mmuless systems.
16730 * server.c (handle_query): Add qOffsets logic.
16731 * target.h (struct target_ops): Add read_offsets.
16733 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16735 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16736 (PTRACE_GET_THREAD_AREA): Define.
16737 (ps_get_thread_area): New function.
16738 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16739 (linux-x86-64-low.o): Update.
16741 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16743 * configure.ac: Remove checks for prfpregset_t.
16744 * gdb_proc_service.h: New file.
16745 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16746 new "gdb_proc_service.h".
16747 * proc-service.c: Likewise.
16748 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16749 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16750 * Makefile.in (gdb_proc_service_h): Updated.
16751 * configure, config.in: Regenerated.
16753 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16755 * remote-utils.c (prepare_resume_reply): Move declaration
16756 of gdb_id_from_wait to the top of the block.
16758 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16760 * linux-low.c (regsets_store_inferior_registers): Read the regset
16761 from the target before filling it.
16763 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16765 * server.c (attach_inferior): Return SIGTRAP for a successful
16768 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16770 * Makefile.in (OBS): Add version.o.
16771 (STAGESTUFF): Delete.
16772 (version.o): Add dependencies.
16773 (version.c): Replace rule.
16774 (clean): Remove version.c.
16775 * server.c (gdbserver_version): New.
16776 (gdbserver_usage): Use printf.
16777 (main): Handle --version and --help.
16778 * server.h (version, host_name): Add declarations.
16780 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16792 * linux-x86-64-low.c:
16794 * linux-s390-low.c:
16795 * linux-ppc64-low.c:
16797 * linux-mips-low.c:
16798 * linux-m68k-low.c:
16799 * linux-m32r-low.c:
16802 * linux-ia64-low.c:
16803 * linux-i386-low.c:
16804 * linux-crisv32-low.c:
16816 * gdbserver.1: Add (C) after Copyright. Update the FSF
16819 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16821 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16822 (arm_breakpoint_at): Recognize both breakpoints.
16823 (the_low_target): Use the correct breakpoint instruction.
16825 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16827 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16828 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16829 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16830 (the_low_target): Update.
16832 2005-10-25 Andreas Schwab <schwab@suse.de>
16834 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16836 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16837 (ia64_num_regs): Reduce to 462.
16839 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16841 * acinclude.m4: Correct quoting.
16842 * aclocal.m4: Regenerated.
16844 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16845 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16846 (thread_db_init): Call thread_db_err_str.
16847 * configure.ac: Check for TD_VERSION.
16848 * config.in, configure: Regenerated.
16850 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16852 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16854 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16856 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16857 is not available. Define HAVE_PTRACE_GETREGS if it is.
16858 * config.in, configure: Regenerated.
16859 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16860 * linux-i386-low.c, linux-m68k-low.c: Update to use
16861 HAVE_PTRACE_GETREGS.
16862 * linux-low.c (regsets_fetch_inferior_registers)
16863 (regsets_store_inferior_registers): Only return 0 if we processed
16865 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16866 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16868 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16870 * inferiors.c (struct thread_info): Add gdb_id.
16871 (add_thread): Add gdb_id argument.
16872 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16873 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16874 calls to add_thread.
16875 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16876 * server.c (handle_query): Use thread_to_gdb_id.
16877 (handle_v_cont, main): Use gdb_id_to_thread_id.
16878 * server.h (add_thread): Update prototype.
16879 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16882 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16884 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16885 left-padded registers.
16886 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16887 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16889 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16891 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16892 * configure: Regenerate.
16893 * config.in: Regenerate.
16894 * server.h (NEED_DECLARATION_STRERROR):
16895 Replace with !HAVE_DECL_STRERROR.
16897 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16899 * linux-low.c (linux_wait, linux_send_signal): Don't test
16900 an unsigned long variable for > 0 if it could be MAX_ULONG.
16901 * server.c (myresume): Likewise.
16902 * target.c (set_desired_inferior): Likewise.
16904 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16906 * configure.ac: Simplify and improve check for socklen_t.
16907 * configure, config.in: Regenerate.
16909 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16911 * acconfig.h: Remove.
16912 * configure.ac: Add a test for socklen_t. Use three-argument
16913 AC_DEFINE throughout.
16914 * config.in: Regenerated using autoheader 2.59.
16915 * configure: Regenerated.
16917 * gdbreplay.c (socklen_t): Provide a default.
16918 (remote_open): Use socklen_t.
16919 * remote-utils.c (socklen_t): Provide a default.
16920 (remote_open): Use socklen_t.
16921 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16924 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16926 * linux-low.c (linux_read_memory, linux_write_memory)
16927 (linux_read_auxv): Likewise.
16928 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16929 (check_mem_write): Likewise.
16930 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16932 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16933 (registers_from_string, register_data): Likewise.
16934 * server.c (handle_query, main): Likewise.
16935 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16936 (decode_M_packet): Likewise.
16937 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16938 * target.h (struct target_ops): Update read_memory, write_memory,
16940 (read_inferior_memory, write_inferior_memory): Update.
16941 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16942 to unsigned char *.
16943 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16944 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16945 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16946 linux-s390-low.c, linux-sh-low.c: Update for changes in
16947 read_inferior_memory and the_low_target->breakpoint.
16949 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16951 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16952 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16953 * configure.srv: Add powerpc64-*-linux*.
16954 * linux-ppc64-low.c: New file.
16956 2005-05-23 Orjan Friberg <orjanf@axis.com>
16958 * linux-cris-low.c: New file with support for CRIS.
16959 * linux-crisv32-low.c: Ditto for CRISv32.
16960 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16961 (clean): Add reg-cris.c and reg-crisv32.c.
16962 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16963 reg-crisv32.o, and reg-crisv32.c to make rules.
16964 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16965 recognized targets.
16967 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16969 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16970 of sizeof (PTRACE_XFER_TYPE).
16971 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16973 2005-05-12 Orjan Friberg <orjanf@axis.com>
16975 * target.h (struct target_ops): Add insert_watchpoint,
16976 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16977 pointers for hardware watchpoint support.
16978 * linux-low.h (struct linux_target_ops): Ditto.
16979 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16980 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16981 to linux_target_ops.
16982 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16984 * server.c (main): Recognize 'Z' and 'z' packets.
16986 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16988 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16989 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16990 (the_low_target): Add new members.
16992 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16994 * proc-service.c (ps_lgetregs): Search all_processes instead of
16997 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16999 * server.c (start_inferior): Change return type to int.
17000 (attach_inferior): Change sigptr to int *.
17001 (handle_v_cont, handle_v_requests): Change signal to int *.
17002 (main): Change signal to int.
17004 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17006 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17007 * configure.srv: Add m32r*-*-linux*.
17008 * linux-m32r-low.c: New file.
17010 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17012 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17014 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17016 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17017 Take unsigned long arguments for PIDs.
17018 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17019 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17020 (wait_for_sigstop, linux_resume_one_process)
17021 (regsets_fetch_inferior_registers, linux_send_signal)
17022 (linux_read_auxv): Likewise. Update the types of variables holding
17023 PIDs. Update format string specifiers.
17024 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17025 * remote-utils.c (prepare_resume_reply): Likewise.
17026 * server.c (cont_thread, general_thread, step_thread)
17027 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17029 (handle_query): Update format specifiers.
17030 (handle_v_cont, main): Use strtoul for thread IDs.
17031 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17032 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17033 (general_thread, step_thread, thread_from_wait)
17034 (old_thread_from_wait): Update.
17035 * target.h (struct thread_resume): Use unsigned long for THREAD.
17036 (struct target_ops): Use unsigned long for arguments to attach and
17039 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17041 * acinclude.m4: Include bfd/bfd.m4 directly.
17042 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17043 <agriffis@toolchain.org>.
17044 * aclocal.m4, configure: Regenerated.
17046 2005-01-07 Andrew Cagney <cagney@gnu.org>
17048 * configure.ac: Rename configure.in, require autoconf 2.59.
17049 * configure: Re-generate.
17051 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17053 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17054 LIBS when finished.
17055 * aclocal.m4: Regenerated.
17056 * configure: Regenerated.
17058 2004-11-21 Andreas Schwab <schwab@suse.de>
17060 * linux-m68k-low.c (m68k_num_gregs): Define.
17061 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17062 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17063 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17064 (m68k_breakpoint_at): New. Add to the_low_target.
17066 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17067 srv_linux_thread_db to yes.
17069 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17071 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17072 (ARCH_SET_FS): Likewise.
17073 (ARCH_GET_FS): Likewise.
17074 (ARCH_GET_GS): Likewise.
17076 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17078 * linux-i386-low.c (ps_get_thread_area): New.
17079 * linux-x86-64-low.c (ps_get_thread_area): New.
17080 * linux-low.c: Include <sys/syscall.h>.
17081 (linux_kill_one_process): Don't kill the first thread here.
17082 (linux_kill): Kill the first thread here.
17083 (kill_lwp): New function.
17084 (send_sigstop, linux_send_signal): Use it.
17085 * proc-service.c: Clean up #ifdefs.
17086 (fpregset_info): Delete.
17087 (ps_lgetregs): Update and enable implementation.
17088 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17090 * remote-utils.c (struct sym_cache, symbol_cache): New.
17091 (input_interrupt): Print a clearer message.
17092 (async_io_enabled): New variable.
17093 (enable_async_io, disable_async_io): Use it. Update comments.
17094 (look_up_one_symbol): Use the symbol cache.
17095 * thread-db.c (thread_db_look_up_symbols): New function.
17096 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17098 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17100 * configure.in: Test for -rdynamic.
17101 * configure: Regenerated.
17102 * Makefile (INTERNAL_LDFLAGS): New.
17103 (gdbserver, gdbreplay): Use it.
17105 2004-09-02 Andrew Cagney <cagney@gnu.org>
17107 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17109 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17111 * linux-low.c (linux_wait): Clear all_processes list also.
17113 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17115 * linux-low.c: Include <errno.h>. Remove extern declaration of
17118 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17120 * gdbreplay.c, server.h, utils.c: Update copyright years.
17122 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17124 * server.c (main): Print child status or termination signal from
17125 variable 'signal', not 'sig'.
17127 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17129 * linux-low.c (linux_read_memory): Change return type to
17130 int. Check for and return error from ptrace().
17131 * target.c (read_inferior_memory): Change return type to int. Pass
17132 back return status from the_target->read_memory().
17133 * target.h (struct target_ops): Adapt *read_memory() prototype.
17135 (read_inferior_memory): Adapt prototype.
17136 * server.c (main): Return an error packet if
17137 read_inferior_memory() returns an error.
17139 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17141 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17142 Unify with other clean targets.
17144 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17146 * server.c (handle_v_cont): Call set_desired_inferior.
17148 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17150 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17152 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17154 * linux-low.c (linux_wait): Unblock async I/O.
17155 (linux_resume): Block and enable async I/O.
17156 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17157 * server.h (block_async_io, unblock_async_io): Add prototypes.
17159 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17161 * remote-utils.c (remote_open): Print a status notice after
17162 opening a TCP port.
17163 * server.c (attach_inferior): Print a status notice after
17166 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17168 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17170 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17172 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17174 * server.c, target.h: Update copyright years.
17176 2004-02-25 Roland McGrath <roland@redhat.com>
17178 * target.h (struct target_ops): New member `read_auxv'.
17179 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17180 * linux-low.c (linux_read_auxv): New function.
17181 (linux_target_ops): Initialize `read_auxv' member to that.
17183 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17185 Committed by Jim Blandy <jimb@redhat.com>.
17187 * linux-s390-low.c (s390_num_regs): Update.
17188 (s390_regmap): Remove control registers. Use __s390x__ predefine
17189 instead of GPR_SIZE to distiguish s390 and s390x targets.
17191 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17193 * linux-low.c: Update copyright year.
17194 (check_removed_breakpoint): Clear pending_is_breakpoint.
17195 (linux_set_resume_request, linux_queue_one_thread)
17196 (resume_status_pending_p): New functions.
17197 (linux_continue_one_thread): Use process->resume.
17198 (linux_resume): Only resume threads if there are no pending events.
17199 * linux-low.h (struct process_info): Add resume request
17202 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17204 * regcache.c (new_register_cache): Clear the allocated register
17205 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17207 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17209 * linux-low.c (linux_resume): Take a struct thread_resume *
17211 (linux_wait): Update call.
17212 (resume_ptr): New static variable.
17213 (linux_continue_one_thread): Renamed from
17214 linux_continue_one_process. Use resume_ptr.
17215 (linux_resume): Use linux_continue_one_thread.
17216 * server.c (handle_v_cont, handle_v_requests): New functions.
17217 (myresume): New function.
17218 (main): Handle 'v' case.
17219 * target.h (struct thread_resume): New type.
17220 (struct target_ops): Change argument of "resume" to struct
17222 (myresume): Delete macro.
17224 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17226 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17227 (uninstall): Support DESTDIR.
17229 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17231 * configure.srv: Add xscale*linux copy of arm*linux entry.
17233 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17235 * linux-arm-low.c (arm_reinsert_addr): New function.
17236 (the_low_target): Add arm_reinsert_addr.
17238 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17240 * mem-break.c: Remove whitespace at end of file.
17242 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17244 * configure.in: Check whether we need to prototype strerror.
17245 * server.h: Optionally prototype strerror.
17246 * gdbreplay.c (perror_with_name): Use strerror.
17247 * linux-low.c (linux_attach_lwp): Use strerror.
17248 * utils.c (perror_with_name): Use strerror.
17249 * config.in, configure: Regenerated.
17251 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17253 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17254 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17256 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17258 * Makefile.in (SFILES): Update.
17259 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17260 low-sun3.c: Remove files.
17262 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17264 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17265 (linux_detach_one_process, linux_detach): New functions.
17266 (linux_target_ops): Add linux_detach.
17267 * server.c (main): Handle 'D' packet.
17268 * target.h (struct target_ops): Add "detach" member.
17269 (detach_inferior): Define.
17271 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17273 From Kelley Cook <kelleycook@wideopenwest.com>:
17274 * configure.srv: Accept i[34567]86 variants.
17276 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17278 * linux-low.c (linux_wait_for_event): Correct comment typos.
17279 (linux_resume_one_process): Call check_removed_breakpoint.
17280 (linux_send_signal): New function.
17281 (linux_target_ops): Add linux_send_signal.
17282 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17284 * target.h (struct target_ops): Add send_signal.
17286 2003-05-29 Jim Blandy <jimb@redhat.com>
17288 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17289 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17290 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17291 away part of the register's value.
17293 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17295 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17296 (linux_wait_for_event, linux_init_signals): Likewise.
17298 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17300 * configure.in: Check for stdlib.h.
17301 * configure: Regenerated.
17302 * config.in: Regenerated.
17304 2003-01-04 Andreas Schwab <schwab@suse.de>
17306 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17308 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17310 * Makefile.in: Remove obsolete code.
17312 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17314 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17315 defined(PT_FPR0_HI).
17317 2002-11-17 Stuart Hughes <seh@zee2.com>
17319 * linux-arm-low.c (arm_num_regs): Increase.
17320 (arm_regmap): Include status register.
17322 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17324 * linux-low.c (register_addr): Remove incorrect -1 check.
17326 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17328 * linux-low.c (linux_create_inferior): Call setpgid. Return
17330 (unstopped_p, linux_signal_pid): Remove.
17331 (linux_target_ops): Remove linux_signal_pid.
17332 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17333 global instead of target method.
17334 * target.h (struct target_ops): Remove signal_pid. Update comment
17335 for create_inferior.
17336 * server.c (signal_pid): New variable.
17337 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17338 gdbserver. Set the child to be the foreground process group.
17339 (attach_inferior): Set signal_pid.
17341 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17343 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17345 2002-08-20 Jim Blandy <jimb@redhat.com>
17347 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17350 2002-08-01 Andrew Cagney <cagney@redhat.com>
17352 * Makefile.in: Make chill references obsolete.
17354 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17356 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17357 * configure: Regenerate.
17358 * config.in: Regenerate.
17360 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17362 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17363 (perror_with_name, remote_close, remote_open, expect, play): Static.
17365 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17367 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17368 byte offsets instead of an array of indexes.
17369 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17371 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17373 * regcache.c: Add comment.
17375 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17377 * thread-db.c: New file.
17378 * proc-service.c: New file.
17379 * acinclude.m4: New file.
17380 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17381 proc-service.o, and thread-db.o.
17382 (linux-low.o): Add USE_THREAD_DB.
17383 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17384 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17385 * aclocal.m4: Regenerated.
17386 * config.in: Regenerated.
17387 * configure: Regenerated.
17388 * configure.in: Check for proc_service.h, sys/procfs.h,
17389 thread_db.h, and linux/elf.h headrs.
17390 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17391 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17392 Check for -lthread_db and thread support.
17393 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17394 PowerPC, and SuperH.
17395 * i387-fp.c: Constify arguments.
17396 * i387-fp.h: Likewise.
17397 * inferiors.c: (struct thread_info): Renamed from
17398 `struct inferior_info'. Remove PID member. Use generic inferior
17399 list header. All uses updated.
17400 (inferiors, signal_pid): Removed.
17401 (all_threads): New variable.
17402 (get_thread): Define.
17403 (add_inferior_to_list): New function.
17404 (for_each_inferior): New function.
17405 (change_inferior_id): New function.
17406 (add_inferior): Removed.
17407 (remove_inferior): New function.
17408 (add_thread): New function.
17409 (free_one_thread): New function.
17410 (remove_thread): New function.
17411 (clear_inferiors): Use for_each_inferior and free_one_thread.
17412 (find_inferior): New function.
17413 (find_inferior_id): New function.
17414 (inferior_target_data): Update argument type.
17415 (set_inferior_target_data): Likewise.
17416 (inferior_regcache_data): Likewise.
17417 (set_inferior_regcache_data): Likewise.
17418 * linux-low.c (linux_bp_reinsert): Remove.
17419 (all_processes, stopping_threads, using_thrads)
17420 (struct pending_signals, debug_threads, pid_of): New.
17421 (inferior_pid): Replace with macro.
17422 (struct inferior_linux_data): Remove.
17423 (get_stop_pc, add_process): New functions.
17424 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17425 Use add_process and add_thread.
17426 (linux_attach_lwp): New function, based on old linux_attach. Use
17427 add_process and add_thread. Set stop_expected for new threads.
17428 (linux_attach): New function.
17429 (linux_kill_one_process): New function.
17430 (linux_kill): Kill all LWPs.
17431 (linux_thread_alive): Use find_inferior_id.
17432 (check_removed_breakpoints, status_pending_p): New functions.
17433 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17434 Update. Use WNOHANG. Wait for cloned processes also. Update process
17435 struct for the found process.
17436 (linux_wait_for_event): New function.
17437 (linux_wait): Use it. Support LWPs.
17438 (send_sigstop, wait_for_sigstop, stop_all_processes)
17439 (linux_resume_one_process, linux_continue_one_process): New functions.
17440 (linux_resume): Support LWPs.
17441 (REGISTER_RAW_SIZE): Remove.
17442 (fetch_register): Use register_size instead. Call supply_register.
17443 (usr_store_inferior_registers): Likewise. Call collect_register.
17444 Fix recursive case.
17445 (regsets_fetch_inferior_registers): Improve error message.
17446 (regsets_store_inferior_registers): Add debugging.
17447 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17448 (unstopped_p, linux_signal_pid): New functions.
17449 (linux_target_ops): Add linux_signal_pid.
17450 (linux_init_signals): New function.
17451 (initialize_low): Call it. Initialize using_threads.
17452 * regcache.c (inferior_regcache_data): Add valid
17454 (get_regcache): Fetch registers lazily. Add fetch argument
17455 and update all callers.
17456 (regcache_invalidate_one, regcache_invalidate): New
17458 (new_register_cache): Renamed from create_register_cache.
17459 Return the new regcache.
17460 (free_register_cache): Change argument to a void *.
17461 (registers_to_string, registers_from_string): Call get_regcache
17462 with fetch flag set.
17463 (register_data): Make static. Pass fetch flag to get_regcache.
17464 (supply_register): Call get_regcache with fetch flag clear.
17465 (collect_register): Call get_regcache with fetch flag set.
17466 (collect_register_as_string): New function.
17467 * regcache.h: Update.
17468 * remote-utils.c (putpkt): Flush after debug output and use
17470 Handle input interrupts while waiting for an ACK.
17471 (input_interrupt): Use signal_pid method.
17472 (getpkt): Flush after debug output and use stderr.
17473 (outreg): Use collect_register_as_string.
17474 (new_thread_notify, dead_thread_notify): New functions.
17475 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17476 and general_thread.
17477 (look_up_one_symbol): Flush after debug output.
17478 * server.c (step_thread, server_waiting): New variables.
17479 (start_inferior): Don't use signal_pid. Update call to mywait.
17480 (attach_inferior): Update call to mywait.
17481 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17482 (main): Don't fetch/store registers explicitly. Use
17483 set_desired_inferior. Support proposed ``Hs'' packet. Update
17485 * server.h: Update.
17486 (struct inferior_list, struct_inferior_list_entry): New.
17487 * target.c (set_desired_inferior): New.
17488 (write_inferior_memory): Constify.
17489 (mywait): New function.
17490 * target.h: Update.
17491 (struct target_ops): New signal_pid method.
17492 (mywait): Removed macro, added prototype.
17494 * linux-low.h (regset_func): Removed.
17495 (regset_fill_func, regset_store_func): New.
17496 (enum regset_type): New.
17497 (struct regset_info): Add type field. Use new operation types.
17498 (struct linux_target_ops): stop_pc renamed to get_pc.
17499 Add decr_pc_after_break and breakpoint_at.
17500 (get_process, get_thread_proess, get_process_thread)
17501 (strut process_info, all_processes, linux_attach_lwp)
17502 (thread_db_init): New.
17504 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17505 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17506 (the_low_target): Add new members.
17507 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17508 (i386_store_fpxregset): Constify.
17509 (target_regsets): Add new kind identifier.
17510 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17511 (i386_set_pc): Add debugging.
17512 (i386_breakpoint_at): New function.
17513 (the_low_target): Add new members.
17514 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17515 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17516 (mips_breakpoint_at): New.
17517 (the_low_target): Add new members.
17518 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17519 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17520 (the_low_target): Add new members.
17521 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17522 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17523 (the_low_target): Add new members.
17524 * linux-x86-64-low.c (target_regsets): Add new kind
17527 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17529 From Martin Pool <mbp@samba.org>:
17530 * server.c (gdbserver_usage): New function.
17533 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17535 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17536 stop_at -> stop_pc.
17538 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17540 * Makefile.in: Remove obsolete code.
17542 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17544 * linux-low.c (regsets_fetch_inferior_registers),
17545 (regsets_store_inferior_registers): Removed cast to int from
17547 * regcache.h: Added declaration of struct inferior_info.
17549 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17551 * inferiors.c (struct inferior_info): Add regcache_data.
17552 (add_inferior): Call create_register_cache.
17553 (clear_inferiors): Call free_register_cache.
17554 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17555 * regcache.c (struct inferior_regcache_data): New.
17556 (registers): Remove.
17557 (get_regcache): New function.
17558 (create_register_cache, free_register_cache): New functions.
17559 (set_register_cache): Don't initialize the register cache here.
17560 (registers_to_string, registers_from_string, register_data): Call
17562 * regcache.h: Add prototypes.
17563 * server.h: Likewise.
17565 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17567 * mem-break.c: New file.
17568 * mem-break.h: New file.
17569 * Makefile.in: Add mem-break.o rule; update server.h
17571 * inferiors.c (struct inferior_info): Add target_data
17573 (clear_inferiors): Free target_data member if set.
17574 (inferior_target_data, set_inferior_target_data): New functions.
17575 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17576 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17577 * linux-low.c (linux_bp_reinsert): New variable.
17578 (struct inferior_linux_data): New.
17579 (linux_create_inferior): Use set_inferior_target_data.
17580 (linux_attach): Likewise. Call add_inferior.
17581 (linux_wait_for_one_inferior): New function.
17582 (linux_wait): Call it.
17583 (linux_write_memory): Add const.
17584 (initialize_low): Call set_breakpoint_data.
17585 * linux-low.h (struct linux_target_ops): Add breakpoint
17587 * server.c (attach_inferior): Remove extra add_inferior
17589 * server.h: Include mem-break.h. Update inferior.c
17591 * target.c (read_inferior_memory)
17592 (write_inferior_memory): New functions.
17593 * target.h (read_inferior_memory)
17594 (write_inferior_memory): Change macros to prototypes.
17595 (struct target_ops): Update comments. Add const to write_memory
17598 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17600 * linux-low.c (usr_store_inferior_registers): Support
17601 registers which are allowed to fail to store.
17602 * linux-low.h (linux_target_ops): Likewise.
17603 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17604 (ppc_cannot_store_register): FPSCR may not be storable.
17606 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17608 * server.h: Include <string.h> if HAVE_STRING_H.
17609 * ChangeLog: Correct paths in last ChangeLog entry.
17611 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17613 * linux-low.h: Remove obsolete prototypes.
17614 (struct linux_target_ops): New.
17615 (extern the_low_target): New.
17616 * linux-low.c (num_regs, regmap): Remove declarations.
17617 (register_addr): Use the_low_target explicitly.
17618 (fetch_register): Likewise.
17619 (usr_fetch_inferior_registers): Likewise.
17620 (usr_store_inferior_registers): Likewise.
17621 * linux-arm-low.c (num_regs): Remove.
17622 (arm_num_regs): Define.
17623 (arm_regmap): Renamed from regmap, made static.
17624 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17626 (arm_cannot_store_register): Renamed from cannot_store_register,
17628 (the_low_target): New.
17629 * linux-i386-low.c (num_regs): Remove.
17630 (i386_num_regs): Define.
17631 (i386_regmap): Renamed from regmap, made static.
17632 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17634 (i386_cannot_store_register): Renamed from cannot_store_register,
17636 (the_low_target): New.
17637 * linux-ia64-low.c (num_regs): Remove.
17638 (ia64_num_regs): Define.
17639 (ia64_regmap): Renamed from regmap, made static.
17640 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17642 (ia64_cannot_store_register): Renamed from cannot_store_register,
17644 (the_low_target): New.
17645 * linux-m68k-low.c (num_regs): Remove.
17646 (m68k_num_regs): Define.
17647 (m68k_regmap): Renamed from regmap, made static.
17648 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17650 (m68k_cannot_store_register): Renamed from cannot_store_register,
17652 (the_low_target): New.
17653 * linux-mips-low.c (num_regs): Remove.
17654 (mips_num_regs): Define.
17655 (mips_regmap): Renamed from regmap, made static.
17656 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17658 (mips_cannot_store_register): Renamed from cannot_store_register,
17660 (the_low_target): New.
17661 * linux-ppc-low.c (num_regs): Remove.
17662 (ppc_num_regs): Define.
17663 (ppc_regmap): Renamed from regmap, made static.
17664 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17666 (ppc_cannot_store_register): Renamed from cannot_store_register,
17668 (the_low_target): New.
17669 * linux-s390-low.c (num_regs): Remove.
17670 (s390_num_regs): Define.
17671 (s390_regmap): Renamed from regmap, made static.
17672 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17674 (s390_cannot_store_register): Renamed from cannot_store_register,
17676 (the_low_target): New.
17677 * linux-sh-low.c (num_regs): Remove.
17678 (sh_num_regs): Define.
17679 (sh_regmap): Renamed from regmap, made static.
17680 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17682 (sh_cannot_store_register): Renamed from cannot_store_register,
17684 (the_low_target): New.
17685 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17686 (the_low_target): New.
17688 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17690 * Makefile.in: Add stamp-h target.
17691 * configure.in: Create stamp-h.
17692 * configure: Regenerated.
17694 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17696 * inferiors.c: New file.
17697 * target.c: New file.
17698 * target.h: New file.
17699 * Makefile.in: Add target.o and inferiors.o. Update
17701 * linux-low.c (inferior_pid): New static variable,
17702 moved from server.c.
17703 (linux_create_inferior): Renamed from create_inferior.
17704 Call add_inferior. Return 0 on success instead of a PID.
17705 (linux_attach): Renamed from myattach.
17706 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17707 (linux_thread_alive): Renamed from mythread_alive.
17708 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17710 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17711 (regsets_store_inferior_registers): Correct error message.
17712 Add missing ``return 0''.
17713 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17714 (linux_store_registers): Renamed from store_inferior_registers.
17715 (linux_read_memory): Renamed from read_inferior_memory.
17716 (linux_write_memory): Renamed from write_inferior_memory.
17717 (linux_target_ops): New structure.
17718 (initialize_low): Call set_target_ops ().
17719 * remote-utils.c (unhexify): New function.
17720 (hexify): New function.
17721 (input_interrupt): Send signals to ``signal_pid''.
17722 * server.c (inferior_pid): Remove.
17723 (start_inferior): Update create_inferior call.
17724 (attach_inferior): Call add_inferior.
17725 (handle_query): New function.
17726 (main): Call handle_query for `q' packets.
17727 * server.h: Include "target.h". Remove obsolete prototypes.
17728 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17730 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17732 * Makefile.in: Add WARN_CFLAGS. Update configury
17734 * configure.in: Check for <string.h>
17735 * configure: Regenerate.
17736 * config.in: Regenerate.
17737 * gdbreplay.c: Include needed system headers.
17738 (remote_open): Remove strchr prototype.
17739 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17740 * regcache.c (supply_register): Change buf argument to const void *.
17741 (supply_register_by_name): Likewise.
17742 (collect_register): Change buf argument to void *.
17743 (collect_register_by_name): Likewise.
17744 * regcache.h: Add missing prototypes.
17745 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17746 * server.c (handle_query): New function.
17747 (attached): New static variable, moved out of main.
17748 (main): Quiet longjmp clobber warnings.
17749 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17750 * utils.c (error): Remove NORETURN.