1 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
3 * hostio-errno.c: Include hostio.h.
5 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
7 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
10 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
12 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
13 * linux-arm-tdesc.h: Include arch/arm.h.
15 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
17 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
19 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
21 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
22 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
24 2020-01-10 Pedro Alves <palves@redhat.com>
26 * fork-child.c (post_fork_inferior): Pass target down to
28 * inferiors.c (switch_to_thread): Add process_stratum_target
30 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
31 * nto-low.c (nto_target_ops): Now a process_stratum_target.
32 * linux-low.c (linux_target_ops): Now a process_stratum_target.
33 * remote-utils.c (prepare_resume_reply): Pass the target to
35 * target.c (the_target): Now a process_stratum_target.
36 (done_accessing_memory): Pass the target to switch_to_thread.
37 (set_target_ops): Ajust to use process_stratum_target.
38 * target.h (struct target_ops): Rename to ...
39 (struct process_stratum_target): ... this.
40 (the_target, set_target_ops): Adjust.
41 (prepare_to_access_memory): Adjust comment.
42 * win32-low.c (child_xfer_memory): Adjust to use
43 process_stratum_target.
44 (win32_target_ops): Now a process_stratum_target.
46 2020-01-06 Eli Zaretskii <eliz@gnu.org>
47 Pedro Alves <palves@redhat.com>
49 * win32-low.c (get_child_debug_event): Extract the fatal exception
50 from the exit status and convert to the equivalent Posix signal
52 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
53 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
55 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
57 * Makefile.in: Use INSTALL_PROGRAM_ENV.
59 2020-01-01 Joel Brobecker <brobecker@adacore.com>
61 * server.c (gdbserver_version): Change copyright year to 2020.
62 * gdbreplay.c (gdbreplay_version): Likewise.
64 2019-12-19 Christian Biesinger <cbiesinger@google.com>
66 * configure: Regenerate.
67 * configure.ac: Quote variable arguments of test.
69 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
71 * Makefile.in: Fix build with GNU Make 3.81
73 2019-12-16 Tom Tromey <tromey@adacore.com>
75 * server.c (get_exec_file): Constify result.
77 2019-12-10 Christian Biesinger <cbiesinger@google.com>
79 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
80 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
81 * config.in: Regenerate.
82 * configure: Regenerate.
83 * configure.ac: Don't check for strerror.
84 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
85 Call safe_strerror instead of strerror.
86 * server.h (strerror): Remove this now-unnecessary declaration.
87 * tracepoint.c (init_named_socket): Call safe_strerror instead of
89 (gdb_agent_helper_thread): Likewise.
90 * utils.c (perror_with_name): Likewise.
92 2019-11-26 Tom Tromey <tom@tromey.com>
94 * configure, config.in: Rebuild.
96 2019-11-26 Tom Tromey <tom@tromey.com>
98 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
99 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
101 * configure, config.in: Rebuild.
103 2019-11-26 Tom Tromey <tom@tromey.com>
105 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
106 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
107 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
108 * acinclude.m4: Include ax_pthread.m4.
109 * config.in, configure: Rebuild.
111 2019-11-26 Christian Biesinger <cbiesinger@google.com>
113 * debug.c (debug_set_output): Call safe_strerror instead of
115 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
116 (linux_kill_one_lwp): Likewise.
117 (linux_detach_one_lwp): Likewise.
118 (linux_wait_for_event_filtered): Likewise.
119 (store_register): Likewise.
120 * lynx-low.c (lynx_attach): Likewise.
121 * mem-break.c (insert_memory_breakpoint): Likewise.
122 (remove_memory_breakpoint): Likewise.
123 (delete_fast_tracepoint_jump): Likewise.
124 (set_fast_tracepoint_jump): Likewise.
125 (uninsert_fast_tracepoint_jumps_at): Likewise.
126 (reinsert_fast_tracepoint_jumps_at): Likewise.
127 * nto-low.c (nto_xfer_memory): Likewise.
128 (nto_resume): Likewise.
130 2019-11-20 Luis Machado <luis.machado@linaro.org>
132 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
133 instead of register count.
134 * tdesc.c (tdesc_contains_feature): New function.
135 * tdesc.h (tdesc_contains_feature): New prototype.
137 2019-11-15 Christian Biesinger <cbiesinger@google.com>
139 * Makefile.in: Add safe-strerror.c.
140 * configure: Regenerate.
141 * configure.ac: Don't source common.host.
143 2019-11-15 Christian Biesinger <cbiesinger@google.com>
145 * config.in: Regenerate.
146 * configure: Regenerate.
148 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
150 * ax.c (ax_printf): Handle size_t_arg.
152 2019-11-06 Christian Biesinger <cbiesinger@google.com>
154 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
155 * mi/mi-main.c (output_cores): Likewise.
156 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
157 (linux_xfer_osdata_modules): Likewise.
158 * remote.c (register_remote_support_xml): Likewise.
159 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
160 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
162 2019-11-01 Christian Biesinger <cbiesinger@google.com>
164 * configure: Regenerate.
165 * configure.ac: Remove check for strerror_r.
167 2019-10-31 Christian Biesinger <cbiesinger@google.com>
169 * config.in: Regenerate.
170 * configure: Regenerate.
171 * configure.ac: Also check for strerror_r.
173 2019-10-31 Christian Biesinger <cbiesinger@google.com>
175 * ax.h (debug_agent): Remove duplicate declaration.
177 2019-10-26 Tom de Vries <tdevries@suse.de>
179 * linux-aarch64-low.c: Fix typos in comments.
180 * linux-arm-low.c: Same.
182 * linux-ppc-low.c: Same.
183 * proc-service.c: Same.
186 * tracepoint.c: Same.
189 2019-10-25 Tom Tromey <tromey@adacore.com>
191 * utils.c (xstrdup): Remove.
193 2019-10-23 Tom Tromey <tom@tromey.com>
195 * configure, config.in: Rebuild.
197 2019-10-23 Tom Tromey <tom@tromey.com>
199 * configure: Rebuild.
200 * acinclude.m4: Use m4_include, not sinclude.
202 2019-10-17 Tom Tromey <tromey@adacore.com>
204 * configure: Rebuild.
205 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
206 in AC_CONFIG_FILES invocation.
207 * Makefile.in (stamp-h, Makefile): Use new-style config.status
210 2019-10-16 Christian Biesinger <cbiesinger@google.com>
212 * server.c: Include xml-builtin.h.
213 (get_xml_features): Don't declare xml_builtins here.
215 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
217 * Makefile.in: Remove references to vec-ipa.o.
219 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
221 * Makefile.in: Remove references to vec.c.
223 2019-10-02 Christian Biesinger <cbiesinger@google.com>
225 * server.c (server_waiting): Change to bool.
226 (extended_protocol): Likewise.
227 (response_needed): Likewise.
228 (exit_requested): Likewise.
229 (run_once): Likewise.
230 (report_no_resumed): Likewise.
231 (non_stop): Likewise.
232 (disable_packet_vCont): Likewise.
233 (disable_packet_Tthread): Likewise.
234 (disable_packet_qC): Likewise.
235 (disable_packet_qfThreadInfo): Likewise.
236 (handle_general_set): Update.
237 (handle_detach): Update.
238 (handle_monitor_command): Update.
239 (handle_query): Update.
240 (captured_main): Update.
241 (process_serial_event): Update.
242 * server.h (server_waiting): Change to bool.
243 (disable_packet_vCont): Likewise.
244 (disable_packet_Tthread): Likewise.
245 (disable_packet_qC): Likewise.
246 (disable_packet_qfThreadInfo): Likewise.
247 (run_once): Likewise.
248 (non_stop): Likewise.
249 * target.c (target_stop_and_wait): Update.
251 2019-10-02 Tom Tromey <tromey@adacore.com>
253 * Makefile.in (SFILES): Add common-inferior.c.
254 (OBS): Add common-inferior.o.
255 * server.c (startup_with_shell): Don't define.
257 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
259 * linux-low.c (linux_low_read_btrace): Update for change to
262 2019-09-20 Christian Biesinger <cbiesinger@google.com>
264 * debug.c (debug_threads): Remove comment in favor of the header.
265 * debug.h (using_threads): Add declaration.
266 (debug_threads): Add comment.
267 * linux-aarch64-low.c: Include debug.h and remove declaration of
269 * nto-low.c: Likewise.
270 * remote-utils.c: Likewise.
271 * thread-db.c: Likewise.
273 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
275 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
276 and powerpc-cell64l-ipa.o.
277 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
278 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
279 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
282 * spu-low.c: Remove file.
284 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
285 (parse_spufs_run): Remove.
286 (ppc_get_pc): Remove Cell/B.E. support.
287 (ppc_set_pc): Likewise.
288 (ppc_breakpoint_at): Likewise.
289 (ppc_arch_setup): Likewise.
290 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
291 tdesc_powerpc_cell32l.
292 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
293 or init_registers_powerpc_cell32l.
294 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
295 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
296 or init_registers_powerpc_cell32l.
297 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
298 (init_registers_powerpc_cell32l): Remove prototype.
299 (init_registers_powerpc_cell64l): Likewise.
301 * target.h (struct target_ops): Remove qxfer_spu member.
302 * server.c (handle_qxfer_spu): Remove.
303 (qxfer_packets): Remove entry for "spu".
304 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
305 * linux-low.c (SPUFS_MAGIC): Remove.
306 (spu_enumerate_spu_ids): Remove.
307 (linux_qxfer_spu): Remove.
308 (linux_target_ops): Remove qxfer_spu member.
309 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
310 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
311 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
313 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
315 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
316 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
317 * config.in: Regenerate.
318 * configure: Regenerate.
320 2019-08-15 Tom Tromey <tromey@adacore.com>
322 * target.c (target_write_memory): Use gdb::byte_vector.
324 2019-08-15 Tom Tromey <tromey@adacore.com>
326 * tracepoint.c (write_inferior_data_pointer)
327 (write_inferior_integer, write_inferior_int8)
328 (write_inferior_uinteger, m_tracepoint_action_download)
329 (r_tracepoint_action_download, x_tracepoint_action_download)
330 (l_tracepoint_action_download, clear_inferior_trace_buffer)
331 (download_agent_expr, download_tracepoint_1)
332 (download_trace_state_variables, upload_fast_traceframes): Update.
333 * server.c (gdb_write_memory): Update.
334 * remote-utils.c (relocate_instruction): Update.
335 * proc-service.c (ps_pdwrite): Update.
336 * mem-break.c (remove_memory_breakpoint)
337 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
338 (uninsert_fast_tracepoint_jumps_at)
339 (reinsert_fast_tracepoint_jumps_at): Update.
340 * linux-x86-low.c (append_insns)
341 (i386_install_fast_tracepoint_jump_pad)
342 (amd64_write_goto_address, i386_write_goto_address): Update.
343 * linux-s390-low.c (append_insns, s390_write_goto_address):
345 * linux-ppc-low.c (ppc_relocate_instruction)
346 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
347 (ppc_write_goto_address): Update.
348 * linux-aarch64-low.c (append_insns): Update.
349 * target.h (struct target_ops): Update.
350 (write_inferior_memory): Don't declare.
351 * target.c (target_write_memory): Rename from
352 write_inferior_memory. Remove old target_write_memory.
354 2019-08-15 Tom Tromey <tromey@adacore.com>
356 * target.c (write_inferior_memory): Use std::vector.
358 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
361 * configure.ac: Drop enable-libmcheck support.
362 * configure, config.in: Rebuild.
363 * acinclude.m4: Don't include it.
365 2019-07-19 Alan Hayward <alan.hayward@arm.com>
367 * configure.srv: Remove Arm xml files.
369 2019-07-19 Alan Hayward <alan.hayward@arm.com>
371 * configure.srv: Add new files. Remove xml generated files.
372 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
374 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
375 * linux-aarch32-tdesc.c: New file.
376 * linux-aarch32-tdesc.h: New file.
377 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
378 * linux-arm-low.c (init_registers_arm, tdesc_arm)
379 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
380 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
381 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
382 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
383 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
384 (arm_read_description): Call arm_linux_read_description.
385 (initialize_low_arch): Don't init registers.
386 * linux-arm-tdesc.c: New file.
387 * linux-arm-tdesc.h: New file.
389 2019-07-10 Alan Hayward <alan.hayward@arm.com>
391 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
392 Move counter inside for.
393 (arm_read_description): Check ptrace earlier.
394 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
396 2019-07-09 Tom Tromey <tom@tromey.com>
398 * configure: Rebuild.
399 * configure.ac: Change common to gdbsupport.
400 * acinclude.m4: Change common to gdbsupport.
401 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
402 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
403 common to gdbsupport.
404 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
405 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
406 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
407 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
408 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
409 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
410 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
411 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
412 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
413 common to gdbsupport.
415 2019-07-04 Alan Hayward <alan.hayward@arm.com>
417 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
419 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
421 2019-07-04 Alan Hayward <alan.hayward@arm.com>
423 * configure.srv: Remove legacy xml.
424 * linux-aarch64-low.c (initialize_low_arch): Remove
425 initialize_low_tdesc call.
426 * linux-aarch64-tdesc-selftest.c: Remove file.
427 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
428 * linux-x86-low.c (initialize_low_arch): Remove
429 initialize_low_tdesc call.
430 * linux-x86-tdesc-selftest.c: Remove file.
431 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
433 2019-06-20 Tom de Vries <tdevries@suse.de>
435 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
436 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
438 2019-06-19 Tom de Vries <tdevries@suse.de>
440 * debug.h (debug_write): Change return type to ssize_t.
441 * debug.c (debug_write): Same.
443 2019-06-14 Tom Tromey <tom@tromey.com>
445 * configure.ac: Use new path to gnulib.
446 * configure: Rebuild.
447 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
450 2019-06-11 Tom Tromey <tom@tromey.com>
452 * Makefile.in (SFILES): Add alloc.c.
454 (IPA_OBJS): Add alloc-ipa.o.
455 (alloc-ipa.o): New target.
456 (%.o: ../%.c): New pattern rule.
458 2019-06-10 Tom Tromey <tromey@adacore.com>
460 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
461 end warning with a newline.
462 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
464 * thread-db.c (attach_thread): Don't end warning with a newline.
465 (thread_db_notice_clone): Likewise.
466 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
468 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
469 end warning with a newline.
471 2019-06-04 Pedro Alves <palves@redhat.com>
473 * server.c (captured_main): Use make_unique_xstrdup.
475 2019-06-02 Tom Tromey <tom@tromey.com>
477 * gdbreplay.c (fromhex): Remove.
478 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
480 2019-05-29 Tom Tromey <tromey@adacore.com>
482 * configure: Rebuild.
484 2019-05-06 Kevin Buettner <kevinb@redhat.com>
486 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
487 sign extension code on 32-bit builds.
489 2019-05-03 Eli Zaretskii <eliz@gnu.org>
492 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
494 2019-04-19 Tom Tromey <tom@tromey.com>
496 * server.c (struct vstop_notif): Derive from notif_event.
498 (queue_stop_reply): Update.
499 (remove_all_on_match_ptid): Change type. Rewrite.
500 (discard_queued_stop_replies): Rewrite.
501 (in_queued_stop_replies_ptid): Change type.
502 (in_queued_stop_replies): Rewrite.
503 (notif_stop): Update.
504 (queue_stop_reply_callback): Update.
505 (captured_main): Don't call initialize_notif.
506 (push_stop_notification): Update.
507 * notif.c (notif_write_event, handle_notif_ack)
508 (notif_event_enque, notif_push): Update.
509 (notif_event_xfree, initialize_notif): Remove.
510 * notif.h (struct notif_event): Include <list>, not
512 (struct notif_server) <queue>: Now a std::list.
513 (notif_event_p): Remove typedef.
514 (initialize_notif): Don't declare.
515 (struct notif_event): Add virtual destructor.
517 2019-04-17 Alan Hayward <alan.hayward@arm.com>
519 * ax.c (ax_vdebug): Call debug_printf.
520 * debug.c (debug_write): New function.
521 * debug.h (debug_write): New declaration.
522 * linux-low.c (sigchld_handler): Call debug_write.
524 2019-04-17 Alan Hayward <alan.hayward@arm.com>
526 * debug.c (debug_set_output): New function.
527 (debug_vprintf): Send output to debug_file.
528 (debug_flush): Likewise.
529 * debug.h (debug_set_output): New declaration.
530 * server.c (handle_monitor_command): Add debug-file option.
531 (captured_main): Likewise.
533 2019-04-17 Alan Hayward <alan.hayward@arm.com>
535 * debug.c (remote_debug): Add definition.
536 * debug.h (remote_debug): Add declaration.
537 * hostio.c (remote_debug): Remove declaration.
538 * remote-utils.c (struct ui_file): Likewise.
539 (remote_debug): Likewise.
540 * remote-utils.h (remote_debug): Likewise,
541 * server.c (remote_debug): Remove definition.
543 2019-04-10 Kevin Buettner <kevinb@redhat.com>
545 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
546 when using a 64-bit gdbserver.
548 2019-04-09 Tom Tromey <tromey@adacore.com>
550 * linux-low.c (select_event_lwp): Use find_thread_in_random.
552 2019-04-08 Tom Tromey <tom@tromey.com>
554 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
556 (linux_resume_one_lwp): Likewise.
558 2019-04-08 Tom Tromey <tom@tromey.com>
560 * gdbreplay.c: Update.
561 * linux-low.c: Update.
564 2019-04-08 Tom Tromey <tom@tromey.com>
566 * server.c: Use C++ exception handling.
567 * linux-low.c: Use C++ exception handling.
568 * gdbreplay.c: Use C++ exception handling.
570 2019-04-08 Tom Tromey <tom@tromey.com>
572 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
573 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
574 (captured_main, main): Update.
575 * gdbreplay.c (main): Update.
577 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
579 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
580 value in argument pointer, return 1 if the entry is found and 0
581 otherwise. Move comment.
582 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
583 * linux-low.h (linux_get_auxv): Declare.
584 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
586 2019-04-05 Tom Tromey <tromey@adacore.com>
588 * server.c (gdbserver_usage): Use upper-case for metasyntactic
591 2019-03-28 Alan Hayward <alan.hayward@arm.com>
593 * linux-low.c (AT_HWCAP2): Add define if not already included.
595 2019-03-26 Alan Hayward <alan.hayward@arm.com>
597 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
598 (aarch64_arch_setup): Call linux_get_hwcap.
599 * linux-arm-low.c (arm_get_hwcap): Remove function.
600 (arm_read_description): Call linux_get_hwcap.
601 * linux-low.c (linux_get_auxv): New function.
602 (linux_get_hwcap): Likewise.
603 (linux_get_hwcap2): Likewise.
604 * linux-low.h (linux_get_hwcap): New declaration.
605 (linux_get_hwcap2): Likewise.
606 * linux-ppc-low.c (ppc_get_auxv): Remove function.
607 (ppc_arch_setup): Call linux_get_hwcap.
608 * linux-s390-low.c (s390_get_hwcap): Remove function.
609 (s390_arch_setup): Call linux_get_hwcap.
611 2019-03-22 Alan Hayward <alan.hayward@arm.com>
612 Jiong Wang <jiong.wang@arm.com>
614 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
615 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
617 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
619 2019-03-22 Alan Hayward <alan.hayward@arm.com>
620 Jiong Wang <jiong.wang@arm.com>
622 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
623 (aarch64_get_hwcap): New function.
624 (aarch64_arch_setup): Read APIA hwcap.
626 2019-03-22 Alan Hayward <alan.hayward@arm.com>
627 Jiong Wang <jiong.wang@arm.com>
629 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
630 (initialize_low_tracepoint): Likewise.
631 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
632 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
633 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
634 (aarch64_linux_read_description): Likewise.
635 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
637 2019-03-12 John Baldwin <jhb@FreeBSD.org>
639 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
640 i386_create_target_description for 'segments' parameter.
641 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
642 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
643 * win32-i386-low.c (i386_arch_setup): Likewise.
645 2019-03-12 Tom Tromey <tromey@adacore.com>
647 * linux-low.c (iterate_over_lwps): Update.
649 2019-03-06 Tom Tromey <tom@tromey.com>
651 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
652 (captured_main): Use SCOPE_EXIT.
654 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
656 * configure.srv: Use '$enable_unittest' instead of '$development'
657 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
660 2019-02-27 Tom Tromey <tromey@adacore.com>
662 * gdbreplay.c (logchar): Handle \r\n.
664 2019-02-07 Alan Hayward <alan.hayward@arm.com>
666 * linux-low.c (linux_attach): Add process before lwp.
667 * server.c (attach_inferior): Check if already attached.
669 2019-02-07 Tom Tromey <tom@tromey.com>
671 * x86-tdesc.h: Rename include guard.
672 * x86-low.h: Add include guard.
673 * wincecompat.h: Rename include guard.
674 * win32-low.h: Add include guard.
675 * utils.h: Rename include guard.
676 * tracepoint.h: Rename include guard.
677 * tdesc.h: Rename include guard.
678 * target.h: Rename include guard.
679 * server.h: Rename include guard.
680 * remote-utils.h: Rename include guard.
681 * regcache.h: Rename include guard.
682 * nto-low.h: Rename include guard.
683 * notif.h: Add include guard.
684 * mem-break.h: Rename include guard.
685 * lynx-low.h: Add include guard.
686 * linux-x86-tdesc.h: Add include guard.
687 * linux-s390-tdesc.h: Add include guard.
688 * linux-ppc-tdesc-init.h: Add include guard.
689 * linux-low.h: Add include guard.
690 * linux-aarch64-tdesc.h: Add include guard.
691 * linux-aarch32-low.h: Add include guard.
692 * inferiors.h: Rename include guard.
693 * i387-fp.h: Rename include guard.
694 * hostio.h: Rename include guard.
695 * gdbthread.h: Rename include guard.
696 * gdb_proc_service.h: Rename include guard.
697 * event-loop.h: Rename include guard.
698 * dll.h: Rename include guard.
699 * debug.h: Rename include guard.
700 * ax.h: Rename include guard.
702 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
705 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
706 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
708 2019-01-25 Tom Tromey <tom@tromey.com>
710 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
712 2019-01-25 Tom Tromey <tom@tromey.com>
714 * win32-low.c: Fix common/ includes.
715 * win32-i386-low.c: Fix common/ includes.
716 * tracepoint.c: Fix common/ includes.
717 * thread-db.c: Fix common/ includes.
718 * target.h: Fix common/ includes.
719 * symbol.c: Fix common/ includes.
720 * spu-low.c: Fix common/ includes.
721 * server.h: Fix common/ includes.
722 * server.c: Fix common/ includes.
723 * remote-utils.c: Fix common/ includes.
724 * regcache.h: Fix common/ includes.
725 * regcache.c: Fix common/ includes.
726 * nto-x86-low.c: Fix common/ includes.
727 * notif.h: Fix common/ includes.
728 * mem-break.h: Fix common/ includes.
729 * lynx-low.c: Fix common/ includes.
730 * lynx-i386-low.c: Fix common/ includes.
731 * linux-x86-tdesc-selftest.c: Fix common/ includes.
732 * linux-x86-low.c: Fix common/ includes.
733 * linux-low.c: Fix common/ includes.
734 * inferiors.h: Fix common/ includes.
735 * i387-fp.c: Fix common/ includes.
736 * hostio.c: Fix common/ includes.
737 * hostio-errno.c: Fix common/ includes.
738 * gdbthread.h: Fix common/ includes.
739 * gdbreplay.c: Fix common/ includes.
740 * fork-child.c: Fix common/ includes.
741 * event-loop.c: Fix common/ includes.
743 (enum gdb_agent_op): Fix common/ includes.
745 2019-01-21 Tom Tromey <tom@tromey.com>
747 * tracepoint.c: Fix includes.
748 * remote-utils.c: Fix includes.
749 * linux-x86-low.c: Fix includes.
751 2019-01-01 Joel Brobecker <brobecker@adacore.com>
753 * gdbreplay.c (gdbreplay_version): Update copyright year in
755 * server.c (gdbserver_version): Likewise.
757 2018-12-05 Alan Hayward <alan.hayward@arm.com>
759 * linux-low.c (add_lwp): Switch ordering.
761 2018-11-29 Tom Tromey <tom@tromey.com>
763 * win32-low.c (win32_join): Take pid, not process.
764 * target.h (struct target_ops) <join>: Change argument type.
765 (join_inferior): Change argument name.
766 * spu-low.c (spu_join): Take pid, not process.
767 * server.c (handle_detach): Preserve pid before destroying
769 * lynx-low.c (lynx_join): Take pid, not process.
770 * linux-low.c (linux_join): Take pid, not process.
772 2018-11-23 Alan Hayward <alan.hayward@arm.com>
774 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
775 (aarch64_cannot_fetch_register): Likewise.
776 (struct linux_target_ops): Update references.
778 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
780 * linux-ppc-low.c: Include nat/linux-ptrace.h.
782 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
784 * configure.srv (ipa_ppc_linux_regobj): Add
785 powerpc-isa207-htm-vsx32l-ipa.o and
786 powerpc-isa207-htm-vsx64l-ipa.o.
787 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
788 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
789 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
790 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
791 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
792 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
793 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
794 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
795 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
796 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
797 (init_registers_powerpc_isa207_htm_vsx32l)
798 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
799 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
800 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
801 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
802 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
803 (ppc_store_tm_ctarregset): New functions.
804 (ppc_regsets): Add entries for HTM regsets.
805 (ppc_arch_setup): Set htm in features struct when needed. Set
806 sizes for the HTM regsets.
807 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
808 (initialize_low_arch): Call
809 init_registers_powerpc_isa207_htm_vsx32l and
810 init_registers_powerpc_isa207_htm_vsx64l.
811 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
812 PPC_TDESC_ISA207_HTM_VSX.
813 (initialize_low_tracepoint): Call
814 init_registers_powerpc_isa207_htm_vsx32l and
815 init_registers_powerpc_isa207_htm_vsx64l.
817 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
819 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
820 rs6000/power-linux-pmu.xml to srv_xmlfiles.
821 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
822 (ppc_store_pmuregset): New functions.
823 (ppc_regsets): Add entries for ebb and pmu regsets.
824 (ppc_arch_setup): Set isa207 in features struct if the ebb and
825 pmu regsets are available. Set sizes for these regsets.
827 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
829 * configure.srv (ipa_ppc_linux_regobj): Add
830 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
831 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
832 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
833 rs6000/powerpc-isa207-vsx32l.xml, and
834 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
835 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
836 <PPC_TDESC_ISA207_VSX>: New enum value.
837 (init_registers_powerpc_isa207_vsx32l): Declare.
838 (init_registers_powerpc_isa207_vsx64l): Declare.
839 * linux-ppc-low.c (ppc_fill_tarregset): New function.
840 (ppc_store_tarregset): New function.
841 (ppc_regsets): Add entry for the TAR regset.
842 (ppc_arch_setup): Set isa207 in features struct when needed. Set
843 size for the TAR regsets.
844 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
845 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
846 and init_registers_powerpc_isa207_vsx64l.
847 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
848 (initialize_low_tracepoint): Call
849 init_registers_powerpc_isa207_vsx32l and
850 init_registers_powerpc_isa207_vsx64l.
852 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
853 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
855 * configure.srv (ipa_ppc_linux_regobj): Add
856 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
857 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
858 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
859 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
860 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
861 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
862 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
863 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
864 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
865 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
866 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
867 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
868 (ppc_hwcap): Add comment.
869 (ppc_hwcap2): New global.
870 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
871 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
872 (ppc_regsets): Add entries for the DSCR and PPR regsets.
873 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
874 when needed. Set sizes for the the DSCR and PPR regsets.
875 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
876 (initialize_low_arch): Call
877 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
878 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
879 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
880 PPC_TDESC_ISA205_PPR_DSCR_VSX.
881 (initialize_low_tracepoint): Call
882 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
883 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
885 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
887 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
889 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
890 Simon Marchi <simark@simark.ca>
892 * acinclude.m4: Include "../selftest.m4".
893 * configure: Regenerate.
894 * configure.ac: Use "GDB_AC_SELFTEST".
895 * configure.srv: Use "$enable_unittests" instead of
896 "$development" when checking whether unit tests have been
898 * server.c (captured_main): Update message informing that
899 selftests have been disabled.
901 2018-10-04 Tom Tromey <tom@tromey.com>
903 * configure: Rebuild.
905 2018-10-04 Tom Tromey <tom@tromey.com>
907 * server.c (handle_status): Rename inner "thread".
908 (process_serial_event): Declare "res" in 'm' case.
909 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
910 (iterate_over_lwps): Rename inner "thread".
911 (linux_qxfer_libraries_svr4): Rename inner "len".
912 * gdbthread.h (find_thread_in_random): Rename inner "thread".
914 2018-10-01 Gary Benson <gbenson@redhat.com>
916 * gdb_proc_service.h: Moved common code to
917 common/gdb_proc_service.h.
919 2018-10-01 Gary Benson <gbenson@redhat.com>
921 * gdb_proc_service.h: Synchronize comments and whitespace with
922 GDB's version of this file.
924 2018-09-25 Tom Tromey <tom@tromey.com>
926 * configure: Rebuild.
927 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
929 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
931 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
932 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
933 ($(IPA_LIB)): Sort IPA_OBJS.
935 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
937 * Makefile.in: Remove references to $(ADD_DEPS).
939 2018-09-16 Tom Tromey <tom@tromey.com>
941 * remote-utils.c (remote_open): Use GNU style for metasyntactic
943 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
946 2018-09-05 Tom Tromey <tom@tromey.com>
948 * configure: Rebuild.
950 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
953 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
955 2018-08-27 Tom Tromey <tom@tromey.com>
958 * configure: Rebuild.
960 2018-08-27 Tom Tromey <tom@tromey.com>
962 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
963 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
964 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
965 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
966 (s390x_emit_stack_adjust): Add casts to unsigned char.
968 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
972 * server.h (struct client_state) <disable_randomization>:
975 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
977 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
979 (mips_supply_ptrace_register): Likewise.
981 2018-07-22 Tom Tromey <tom@tromey.com>
983 * configure: Rebuild.
985 2018-07-22 Tom Tromey <tom@tromey.com>
987 * win32-low.c (win32_create_inferior): Remove unused variables.
988 * gdbreplay.c (remote_open): Remove unused variable.
989 * remote-utils.c (remote_prepare): Remove unused variable.
990 * x86-tdesc.h (X86_TDESC_H): Define.
991 (amd64_expedite_regs): Define conditionally.
992 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
993 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
994 * remote-utils.c (readchar): Remove unused variable.
996 2018-07-13 Pedro Alves <palves@redhat.com>
998 * linux-low.c (linux_kill): Change parameter to process_info
999 pointer instead of pid. Adjust.
1000 * lynx-low.c (lynx_kill): Likewise.
1001 * nto-low.c (nto_kill): Likewise.
1002 * spu-low.c (spu_kill): Likewise.
1003 * win32-low.c (win32_kill): Likewise.
1004 * server.c (handle_v_kill, kill_inferior_callback)
1005 (detach_or_kill_for_exit): Adjust.
1006 * target.c (kill_inferior): Change parameter to process_info
1007 pointer instead of pid. Adjust.
1008 * target.h (struct target_ops) <kill>: Change parameter to
1009 process_info pointer instead of pid. Adjust all implementations
1011 (kill_inferior): Likewise.
1013 2018-07-13 Pedro Alves <palves@redhat.com>
1015 * linux-low.c (linux_detach, linux_join): Change parameter to
1016 process_info pointer instead of pid. Adjust.
1017 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1018 * nto-low.c (nto_detach): Likewise.
1019 * spu-low.c (spu_detach, spu_join): Likewise.
1020 * win32-low.c (win32_detach, win32_join): Likewise.
1021 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1022 * target.h (struct target_ops) <detach, join>: Change parameter to
1023 process_info pointer instead of pid. Adjust all implementations
1025 (detach_inferior, join_inferior): Rename 'pid' parameter to
1028 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1029 Jan Kratochvil <jan.kratochvil@redhat.com>
1030 Paul Fertser <fercerpav@gmail.com>
1031 Tsutomu Seki <sekiriki@gmail.com>
1033 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1034 (OBS): Add 'common/netstuff.o'.
1035 (GDBREPLAY_OBS): Likewise.
1036 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1037 (remote_open): Implement support for IPv6
1039 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1041 (handle_accept_event): Accept connections from IPv6 sources.
1042 (remote_prepare): Handle IPv6-style hostnames; implement
1043 support for IPv6 connections.
1044 (remote_open): Implement support for printing connections from
1047 2018-07-11 Pedro Alves <palves@redhat.com>
1050 * mem-break.c (any_persistent_commands): Add process_info
1051 parameter and use it instead of relying on the current process.
1052 Change return type to bool.
1053 * mem-break.h (any_persistent_commands): Add process_info
1054 parameter and change return type to bool.
1055 * server.c (handle_detach): Remove require_running_or_return call.
1056 Look up the process_info for the process we're about to detach.
1057 If not found, return back error to GDB. Adjust
1058 any_persistent_commands call to pass down a process pointer.
1060 2018-07-11 Pedro Alves <palves@redhat.com>
1062 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1063 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1064 instead of collect_register_by_name.
1065 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1066 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1068 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1069 Pedro Alves <palves@redhat.com>
1071 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1073 2018-07-03 Tom Tromey <tom@tromey.com>
1075 * linux-low.c: Update.
1076 * lynx-low.c: Update.
1077 * mem-break.c: Update.
1078 * nto-low.c: Update.
1079 * remote-utils.c: Update.
1081 * spu-low.c: Update.
1083 * win32-low.c: Update.
1085 2018-07-03 Tom Tromey <tom@tromey.com>
1089 2018-07-03 Tom Tromey <tom@tromey.com>
1091 * linux-low.c: Update.
1093 2018-07-03 Tom Tromey <tom@tromey.com>
1097 2018-07-03 Tom Tromey <tom@tromey.com>
1099 * linux-low.c: Update.
1100 * linux-mips-low.c: Update.
1101 * lynx-low.c: Update.
1102 * nto-low.c: Update.
1103 * remote-utils.c: Update.
1105 * spu-low.c: Update.
1107 * thread-db.c: Update.
1109 2018-07-03 Tom Tromey <tom@tromey.com>
1111 * linux-low.c: Update.
1112 * linux-mips-low.c: Update.
1113 * lynx-low.c: Update.
1114 * mem-break.c: Update.
1115 * nto-low.c: Update.
1116 * remote-utils.c: Update.
1118 * spu-low.c: Update.
1120 * tracepoint.c: Update.
1122 2018-07-03 Tom Tromey <tom@tromey.com>
1124 * linux-low.c: Update.
1125 * linux-ppc-low.c: Update.
1126 * linux-x86-low.c: Update.
1127 * proc-service.c: Update.
1129 * spu-low.c: Update.
1130 * thread-db.c: Update.
1131 * win32-low.c: Update.
1133 2018-07-03 Tom Tromey <tom@tromey.com>
1135 * linux-low.c: Update.
1136 * lynx-low.c: Update.
1137 * nto-low.c: Update.
1138 * remote-utils.c: Update.
1139 * spu-low.c: Update.
1140 * thread-db.c: Update.
1141 * win32-low.c: Update.
1143 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1145 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1146 parameter in call to 'amd64_create_target_description'.
1148 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1150 * x86-tdesc.h: Remove executable permission flag.
1152 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1154 * configure.ac: Remove AC_PREREQ, add missing quoting.
1155 * configure: Re-generate.
1156 * config.in: Re-generate.
1157 * aclocal.m4: Re-generate.
1159 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1161 * tracepoint.h (current_traceframe): Remove declaration.
1163 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1165 * linux-aarch64-low.c (is_sve_tdesc): New function.
1166 (aarch64_sve_regs_copy_to_regcache): Likewise.
1167 (aarch64_sve_regs_copy_from_regcache): Likewise.
1168 (aarch64_regs_info): Add SVE checks.
1169 (initialize_low_arch): Initialize SVE.
1171 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1173 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1175 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1177 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1178 (initialize_low_tracepoint): Likewise
1179 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1180 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1182 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1184 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1186 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1188 * server.h (PBUFSIZ): Increase size
1190 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1192 * regcache.c (regcache::raw_compare): New function.
1193 * regcache.h (regcache::raw_compare): New declaration.
1195 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1197 * regcache.c (new_register_cache): Use new.
1198 (free_register_cache): Use delete.
1199 (register_data): Use const.
1200 (supply_register): Move body inside regcache.
1201 (regcache::raw_supply): New override function.
1202 (collect_register): Move body inside regcache.
1203 (regcache::raw_collect): New override function.
1204 (regcache::get_register_status): New override function.
1205 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1207 2018-06-09 Tom Tromey <tom@tromey.com>
1209 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1211 (event_queue): Use std::queue.
1212 (gdb_event_xfree): Remove.
1213 (initialize_event_loop, process_event, wait_for_event): Update.
1215 2018-06-08 Stan Cox <scox@redhat.com>
1217 * win32-low.c (win32_create_inferior): last_ptid and last_status
1218 moved to client_state.
1220 2018-06-08 Pedro Alves <palves@redhat.com>
1222 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1223 common/common-exceptions.o, common/common-utils.o,
1224 common/errors.o, common/print-utils.o and utils.o.
1225 * gdbreplay.c: Include "common-defs.h" instead of the two
1226 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1227 string.h or alloca.h.
1228 (perror_with_name): Delete.
1229 (remote_open): Use xstrdup instead of strdup.
1230 (main): Rename to ...
1231 (captured_main): ... this.
1234 2018-06-08 Tom Tromey <tom@tromey.com>
1236 * linux-low.c (linux_low_read_btrace): Update.
1238 2018-06-04 Stan Cox <scox@redhat.com>
1240 * server.h (struct client_state): New.
1241 * server.c (cont_thread, general_thread, multi_process)
1242 (report_fork_events, report_vfork_events, report_exec_events)
1243 (report_thread_events, swbreak_feature, hwbreak_feature)
1244 (vCont_supported, disable_randomization, pass_signals)
1245 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1246 Moved to client_state.
1247 * remote-utils.c (remote_debug, noack_mode)
1248 (transport_is_reliable): Moved to client_state.
1249 * tracepoint.c (current_traceframe): Moved to client_state.
1252 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1253 linux-low.c, remote-utils.h, target.c: Use client_state.
1255 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1257 * configure.srv: Add new c/h file.
1259 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1261 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1264 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1266 * gdb.arch/mips-fpregset-core.exp: New test.
1267 * gdb.arch/mips-fpregset-core.c: New test source.
1269 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1272 * hostio.c (require_int): Do not report overflow for integers
1273 between 0xfffffff and 0x7fffffff.
1275 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1277 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1278 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1279 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1281 (the_low_target): Wire them.
1283 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1285 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1286 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1287 mode. Call collect_register_by_name with vscr using
1288 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1289 (ppc_store_vrregset): Add and set vscr_offset variable as in
1290 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1293 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1295 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1296 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1297 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1299 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1301 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1302 (ppc_store_vsxregset): Likewise.
1303 (ppc_fill_vrregset): Likewise.
1304 (ppc_store_vrregset): Likewise.
1305 (ppc_fill_evrregset): Likewise.
1306 (ppc_store_evrregset): Likewise.
1307 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1308 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1311 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1313 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1314 wordsize of the inferior. Call ppc_linux_target_wordsize.
1316 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1318 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1319 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1320 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1321 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1322 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1323 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1324 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1325 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1326 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1327 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1328 (tdesc_powerpc_e500l): Remove.
1329 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1330 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1331 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1332 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1334 (ppc_arch_setup): Remove target description matching code. Fill a
1335 ppc_linux_features struct and call ppc_linux_match_description
1338 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1340 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1341 width of the requested register exceeds the width of the
1343 (mips_cannot_store_register): Likewise.
1345 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1347 * linux-mips-low.c (mips_fetch_register): New function. Update
1349 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1350 (the_low_target): Wire `mips_fetch_register'.
1352 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1354 * lynx-i386-low.c (LYNXOS_178): New macro.
1355 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1356 the layout on LynxOS-178.
1357 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1358 handle floating point registers that are not supported by
1361 2018-05-10 Tom Tromey <tom@tromey.com>
1363 * configure: Rebuild.
1365 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1368 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1369 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1370 Use it to set the expedite_regs field in the given tdesc.
1371 * x86-tdesc.h: New file.
1372 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1373 Adjust following the addition of the new expedite_regs parameter
1374 to init_target_desc.
1375 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1376 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1377 (i386_linux_read_description, amd64_linux_read_description):
1378 Adjust following the addition of the new expedite_regs parameter
1379 to init_target_desc.
1380 * lynx-i386-low.c: #include "x86-tdesc.h".
1381 (lynx_i386_arch_setup): Adjust following the addition of the new
1382 expedite_regs parameter to init_target_desc.
1383 * nto-x86-low.c: #include "x86-tdesc.h".
1384 (nto_x86_arch_setup): Adjust following the addition of the new
1385 expedite_regs parameter to init_target_desc.
1386 * win32-i386-low.c: #include "x86-tdesc.h".
1387 (i386_arch_setup): Adjust following the addition of the new
1388 expedite_regs parameter to init_target_desc.
1390 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1393 * win32-low.c (win32_create_inferior): Add call to my_wait
1394 setting last_status global.
1396 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1399 * win32-low.c (create_process): Only call gdb_tilde_expand if
1400 inferior_cwd is not NULL.
1402 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1404 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1405 registers to the cache if their values have changed.
1406 (i387_xsave_to_cache): Provide default values for x87 control
1407 registers when these features are available, but disabled.
1408 * regcache.c (supply_register_by_name_zeroed): New function.
1409 * regcache.h (supply_register_by_name_zeroed): Declare new
1412 2018-05-07 Tom Tromey <tom@tromey.com>
1414 * configure: Rebuild.
1416 2018-05-04 Tom Tromey <tom@tromey.com>
1418 * configure: Rebuild.
1420 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1421 Pedro Alves <palves@redhat.com>
1423 * linux-aarch64-low.c (aarch64_stopped_data_address):
1426 2018-04-27 Tom Tromey <tom@tromey.com>
1428 * configure: Rebuild.
1430 2018-04-23 Tom Tromey <tom@tromey.com>
1432 * configure: Rebuild.
1434 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1436 * Makefile.in (depcomp): Add "..".
1437 (all_deps_files): New and use it.
1439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1441 * configure.srv (aarch64*-*-linux*): Don't include xml.
1442 (i[34567]86-*-cygwin*): Likewise.
1443 (i[34567]86-*-linux*): Likewise.
1444 (i[34567]86-*-lynxos*): Likewise.
1445 (i[34567]86-*-mingw32ce*): Likewise.
1446 (i[34567]86-*-mingw*): Likewise.
1447 (i[34567]86-*-nto*): Likewise.
1448 (tic6x-*-uclinux): Likewise.
1449 (x86_64-*-linux*): Likewise.
1450 (x86_64-*-mingw*): Likewise.
1451 (x86_64-*-cygwin*): Likewise.
1453 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1455 * tdesc.c: Remove xml parameter.
1457 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1459 * server.c (get_features_xml): Remove cast.
1460 * tdesc.c (void target_desc::accept): Fill in function.
1461 (tdesc_get_features_xml): Remove old xml creation.
1462 (print_xml_feature::visit_pre): Add xml vistor.
1463 * tdesc.h (struct target_desc): Make xmltarget mutable.
1464 (tdesc_get_features_xml): Remove declaration.
1466 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1468 * tdesc.c (tdesc_architecture_name): Add new function.
1469 (tdesc_osabi_name): Likewise.
1470 (tdesc_get_features_xml): Use new functions.
1472 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1474 * tdesc.c (tdesc_create_flags): Remove.
1475 (tdesc_add_flag): Likewise.
1476 (tdesc_named_type): Likewise.
1477 (tdesc_create_union): Likewise.
1478 (tdesc_create_struct): Likewise.
1479 (tdesc_create_vector): Likewise.
1480 (tdesc_add_bitfield): Likewise.
1481 (tdesc_add_field): Likewise.
1482 (tdesc_set_struct_size): Likewise.
1484 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1486 * tdesc.c (~target_desc): Remove implictly deleted items.
1487 (init_target_desc): Iterate all features.
1488 (tdesc_get_features_xml): Use vector.
1489 (tdesc_create_feature): Create feature.
1490 * tdesc.h (tdesc_feature) Remove
1491 (target_desc): Add features.
1493 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1495 * Makefile.in: Add common/tdesc.c
1496 * tdesc.c (init_target_desc): init all reg_defs from register
1498 (tdesc_create_reg): Create tdesc_reg.
1499 * tdesc.h (tdesc_feature): Add register vector.
1501 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1503 * tdesc.h (struct target_desc) <features>: Change type to
1504 std::vector<std::string>.
1505 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1507 (tdesc_get_features_xml): Likewise.
1508 (tdesc_create_feature): Likewise.
1510 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1512 * regcache.c (find_register_by_number): Return a ref.
1513 (find_regno): Use references.
1514 (register_size): Likewise.
1515 (register_data): Likewise.
1516 * tdesc.c (target_desc::~target_desc): Remove free calls.
1517 (target_desc::operator==): Use std::vector compare.
1518 (init_target_desc): Use reference.
1519 (tdesc_create_reg): Use reg constructors.
1520 * tdesc.h (struct target_desc): Replace pointer with object.
1522 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1524 * regcache.c (find_register_by_number): Make static.
1525 (find_regno): Use find_register_by_number
1526 * regcache.h (struct reg): Remove declaration.
1528 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1530 * tdesc.c (target_desc::~target_desc): Move to here.
1531 (target_desc::operator==): Likewise.
1532 * tdesc.h (target_desc::~target_desc): Move from here.
1533 (target_desc::operator==): Likewise.
1535 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1537 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1539 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1541 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1543 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1544 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1545 and init_registers_s390_gs_linux64.
1547 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1549 * linux-s390-low.c (s390_fill_gs): Remove function.
1550 (s390_fill_gsbc): Remove function.
1551 (s390_regsets): Set fill functions for the guarded storage regsets
1554 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1556 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1557 the word size. Add comment.
1558 (s390_get_wordsize): New function.
1559 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1560 pswm with it. Instead, use s390_get_wordsize to determine the
1561 word size first and derive the correct tdesc from that directly.
1563 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1565 * Makefile.in: Include silent-rules.mk.
1566 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1567 (COMPILE): Add ECHO_CXX.
1568 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1569 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1570 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1571 (version-generated.c): Add ECHO_GEN.
1572 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1573 (IPAGENT_COMPILE): Add ECHO_CXX.
1574 (%-generated.c): Add ECHO_REGDAT.
1576 2018-03-14 Tom Tromey <tom@tromey.com>
1579 * ax.c (ax_printf): Special case for NULL.
1581 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1583 * linux-low.c (linux_qxfer_libraries_svr4): Use
1584 xml_escape_text_append.
1586 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1588 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1590 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1592 * server.c (handle_general_set): Remove unnecessary xstrdup.
1594 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1596 * server.c (parse_debug_format_options): Adjust to
1597 delim_string_to_char_ptr_vec changes.
1598 * thread-db.c (thread_db_load_search): Adjust to
1599 dirnames_to_char_ptr_vec changes.
1601 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1603 * target.h (target_enable_btrace, target_disable_btrace)
1604 (target_read_btrace, target_read_btrace_conf): Turn macro into
1605 inline function. Throw error if target method is not defined.
1606 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1607 check for btrace target method. Be prepared to handle exceptions
1608 from btrace target methods.
1610 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1612 * server.c (captured_main): Change order of error message printed
1613 when the current working directory cannot be found.
1615 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1617 * server.c: Include "filenames.h" and "pathstuff.h".
1618 (program_name): Delete variable.
1619 (program_path): New anonymous class.
1620 (get_exec_wrapper): Use "program_path" instead of
1622 (handle_v_run): Likewise.
1623 (captured_main): Likewise.
1624 (process_serial_event): Likewise.
1626 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1628 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1629 (OBJS): Add "pathstuff.o".
1630 * server.c (current_directory): New global variable.
1631 (captured_main): Initialize "current_directory".
1633 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1635 * tdesc.c: Use common/tdesc.h.
1636 * tdesc.h: Likewise.
1638 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1639 Simon Marchi <simon.marchi@ericsson.com>
1641 * Makefile.in: Switch order of make rules.
1643 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1645 * Makefile.in: Add common directory in build.
1646 * configure.ac: Add common reference.
1647 * configure: Regenerate.
1649 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1651 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1652 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1653 * spu-low.c (spu_target_ops): Likewise.
1654 * win32-low.c (win32_target_ops): Likewise.
1655 * server.c (supported_btrace_packets): Report packets unconditionally.
1656 * target.h (target_ops) <supports_btrace>: Remove.
1657 (target_supports_btrace): Remove.
1659 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1661 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1662 (handle_btrace_disable): Change return type to void. Use exceptions
1664 (handle_btrace_general_set): Catch exception and copy message to
1667 2018-02-08 Tom Tromey <tom@tromey.com>
1669 * linux-low.c (install_software_single_step_breakpoints): Use
1670 make_scoped_restore.
1671 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1672 (do_restore_current_thread_cleanup): Remove.
1673 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1676 2018-02-08 Tom Tromey <tom@tromey.com>
1678 * mem-break.c (set_raw_breakpoint_at): Use
1679 gdb::unique_xmalloc_ptr.
1681 2018-01-30 Pedro Alves <palves@redhat.com>
1684 * target.c (target_terminal::terminal_state): Rename to ...
1685 (target_terminal::m_terminal_state): ... this.
1687 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1689 * linux-low.c (handle_extended_wait): Surround call to
1690 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1692 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1694 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1695 linux_ptrace_attach_fail_reason_string now returning an
1697 (linux_attach): Likewise.
1698 * thread-db.c (attach_thread): Likewise.
1700 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1703 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1704 checking for fs_base/gs_base fields in struct user_regs_struct.
1705 * configure: Regenerate.
1707 2018-01-16 Yao Qi <yao.qi@linaro.org>
1710 * linux-low.c (fetch_register): Call supply_register instead of
1713 2018-01-08 Yao Qi <yao.qi@linaro.org>
1714 Simon Marchi <simon.marchi@ericsson.com>
1716 * Makefile.in (OBS): Remove selftest.o.
1717 * configure.ac: Set srv_selftest_objs if $development is true.
1718 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1719 * configure: Re-generated.
1720 * server.c (captured_main): Wrap variable selftest_filter with
1723 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1725 * server.c (parse_debug_format_options): Return std::string.
1726 (handle_monitor_command, captured_main): Adjust.
1728 2018-01-05 Pedro Alves <palves@redhat.com>
1731 * server.c (captured_main): Pass quiet=false to
1732 save_original_signals_state.
1734 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1736 * gdbreplay.c (gdbreplay_version): Update copyright year in
1738 * server.c (gdbserver_version): Likewise.
1740 2017-12-08 Tom Tromey <tom@tromey.com>
1742 * ax.c (ax_printf): Update.
1744 2017-12-07 Yao Qi <yao.qi@linaro.org>
1746 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1747 aarch64_linux_read_description.
1748 * linux-amd64-ipa.c (idx2mask): New array.
1749 (get_ipa_tdesc): Move idx2mask out.
1750 (initialize_low_tracepoint): Initialize target descriptions.
1751 * linux-i386-ipa.c (idx2mask): New array.
1752 (get_ipa_tdesc): Move idx2mask out.
1753 (initialize_low_tracepoint): Initialize target descriptions.
1755 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1757 * tdesc.c (struct tdesc_type): Change return type.
1758 (tdesc_add_flag): Change parameter type.
1759 (tdesc_add_bitfield): Likewise.
1760 (tdesc_add_field): Likewise.
1761 (tdesc_set_struct_size): Likewise.
1763 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1765 * regcache.c (registers_to_string): Remove unused variable.
1767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1769 * inferiors.c (for_each_inferior_with_data): Remove.
1770 * inferiors.h (for_each_inferior_with_data): Remove.
1771 * server.c (handle_qxfer_threads_worker): Change parameter type.
1772 (handle_qxfer_threads_proper): Use for_each_thread.
1774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1776 * inferiors.c (for_each_inferior): Remove.
1777 (clear_inferiors): Use for_each_thread.
1778 * inferiors.h (for_each_inferior): Remove.
1779 * linux-low.c (linux_wait_for_event_filtered): Use
1781 (linux_stabilize_threads): Likewise.
1782 * regcache.c (regcache_release): Likewise.
1783 * server.c (gdb_wants_all_threads_stopped): Likewise.
1784 (clear_pending_status_callback): Remove.
1785 (handle_status): Use for_each_thread.
1786 (captured_main): Likewise.
1787 * win32-low.c (child_init_thread_list): Likewise.
1788 (win32_clear_inferiors): Likewise.
1789 (fake_breakpoint_event): Likewise.
1791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1793 * inferiors.h (find_inferior): Remove.
1794 * inferiors.c (find_inferior): Remove.
1796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1798 * linux-low.c (resume_status_pending_p): Update comment.
1799 (need_step_over_p): Update comment.
1801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1803 * linux-low.c (proceed_one_lwp): Return void, change parameter
1805 (unsuspend_and_proceed_one_lwp): Likewise.
1806 (proceed_all_lwps): Use for_each_thread.
1807 (unstop_all_lwps): Likewise.
1809 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1811 * linux-low.c (linux_resume_one_thread): Return void, take
1813 (linux_resume): Use for_each_thread.
1815 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1817 * linux-low.c (send_sigstop_callback): Return void, change
1818 parameter type. Rename to...
1819 (send_sigstop): ... this.
1820 (suspend_and_send_sigstop_callback): Return void, change parameter
1822 (suspend_and_send_sigstop): ... this.
1823 (stop_all_lwps): Use for_each_thread.
1825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1827 * linux-low.c (lwp_running): Return bool, remove unused
1829 (linux_stabilize_threads): Use find_thread.
1831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1833 * linux-low.c (select_singlestep_lwp_callback): Remove.
1834 (count_events_callback): Remove.
1835 (select_event_lwp_callback): Remove.
1836 (select_event_lwp): Use find_thread/for_each_thread.
1838 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1840 * linux-low.c (not_stopped_callback): Return bool, take filter
1842 (linux_wait_for_event_filtered): Use find_thread.
1843 (linux_wait_1): Likewise.
1845 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1847 * linux-low.c (same_lwp): Remove.
1848 (find_lwp_pid): Use find_thread.
1850 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1852 * linux-low.c (delete_lwp_callback): Remove.
1853 (linux_mourn): Use for_each_thread.
1855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1857 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1858 args parameter, don't check for pid.
1859 (linux_detach): Use for_each_thread.
1861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1863 * linux-low.c (struct counter): Remove.
1864 (second_thread_of_pid_p): Remove.
1865 (last_thread_of_process_p): Use find_thread.
1867 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1869 * inferiors.c (find_inferior_in_random): Remove.
1870 * inferiors.h (find_inferior_in_random): Remove.
1871 * linux-low.c (status_pending_p_callback): Return bool, accept
1872 parameter ptid directly.
1873 (linux_wait_for_event_filtered): Use find_thread_in_random.
1874 (linux_wait_1): Likewise.
1876 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1878 * inferiors.c (find_inferior_id): Remove.
1879 (find_thread_ptid): Move implemention from find_inferior_id to
1881 * inferiors.h (find_inferior_id): Remove.
1882 * server.c (handle_status): Use find_thread_ptid.
1883 (process_serial_event): Likewise.
1884 * thread-db.c (find_one_thread): Likewise.
1885 (thread_db_thread_handle): Likewise.
1886 * win32-low.c (thread_rec): Likewise.
1887 (child_delete_thread): Likewise.
1888 (win32_thread_alive): Likewise.
1889 (get_child_debug_event): Likewise.
1891 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1893 * linux-mips-low.c (update_watch_registers_callback): Return
1894 void, remove pid_p parameter, don't check for pid.
1895 (mips_insert_point, mips_remove_point): Use for_each_thread.
1897 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1899 * lynx.low (lynx_delete_thread_callback): Remove.
1900 (lynx_mourn): Use for_each_thread.
1902 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1904 * regcache.c (regcache_invalidate_one): Remove.
1905 (regcache_invalidate_pid): use for_each_thread.
1907 2017-11-26 Tom Tromey <tom@tromey.com>
1909 * linux-low.c (linux_create_inferior): Update.
1911 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1913 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1915 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1917 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1918 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1919 * linux-aarch64-tdesc-selftest.c: New file.
1920 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1922 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1924 * configure.srv: Add new file.
1925 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1926 * linux-aarch64-tdesc-selftest.c: New file.
1927 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1929 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1931 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1932 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1933 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1935 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1937 * configure.srv: Add new files.
1938 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1939 aarch64_linux_read_description.
1940 * linux-aarch64-low.c (aarch64_linux_read_description):
1941 Merge with aarch64_arch_setup.
1942 (aarch64_arch_setup): Call aarch64_linux_read_description.
1943 * linux-aarch64-tdesc.c: New file.
1944 * linux-aarch64-tdesc.h: New file.
1946 2017-11-24 Yao Qi <yao.qi@linaro.org>
1948 * configure.srv: Set $srv_regobj for tic6x-linux.
1949 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1950 (tic6x_read_description): Move some code to tic6x_arch_setup.
1951 (tic6x_tdesc_test): New function.
1952 (initialize_low_arch): Call selftests::register_test.
1954 2017-11-22 Yao Qi <yao.qi@linaro.org>
1956 * remote-utils.c (prepare_resume_reply): Use memcpy.
1958 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1960 * linux-low.c (kill_one_lwp_callback): Return void, take
1961 argument directly, don't filter on pid.
1962 (linux_kill): Use for_each_thread.
1964 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1966 * linux-low.c (need_step_over_p): Return bool, remove dummy
1968 (linux_resume, proceed_all_lwps): Use find_thread.
1970 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1972 * linux-low.c (resume_status_pending_p): Return bool, remove
1974 (linux_resume): Use find_thread.
1976 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1978 * linux-low.c (struct thread_resume_array): Remove.
1979 (linux_set_resume_request): Return void, take arguments
1981 (linux_resume): Use for_each_thread.
1983 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1985 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1986 return bool, remove data argument.
1987 (linux_stabilize_threads): Use find_thread.
1989 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1991 * linux-low.c (unsuspend_one_lwp): Remove.
1992 (unsuspend_all_lwps): Use for_each_thread, inline code from
1995 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1997 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1998 * linux-low.c (struct iterate_over_lwps_args): Remove.
1999 (iterate_over_lwps_filter): Remove.
2000 (iterate_over_lwps): Use find_thread.
2002 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2004 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2005 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2006 code from reset_lwp_ptrace_options_callback.
2008 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2010 * linux-arm-low.c (struct update_registers_data): Remove.
2011 (update_registers_callback): Return void, take arguments
2012 directly, don't check thread's pid.
2013 (arm_insert_point, arm_remove_point): Use for_each_thread.
2015 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2017 * win32-low.c (continue_one_thread): Return void, take argument
2019 (child_continue): Use for_each_thread.
2021 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2023 * win32-i386-low.c (update_debug_registers_callback): Rename
2025 (update_debug_registers): ... this, return void, remove pid_p arg.
2026 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2028 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2030 * inferiors.h (struct process_info): Add constructor, initialize
2032 <syscalls_to_catch>: Change type to std::vector<int>.
2033 * inferiors.c (add_process): Allocate process_info with new.
2034 (remove_process): Free process_info with delete.
2035 * linux-low.c (handle_extended_wait): Adjust.
2036 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2037 * server.c (handle_general_set): Adjust.
2039 2017-11-16 Pedro Alves <palves@redhat.com>
2041 * remote-utils.c (remote_close): Block SIGIO signals instead of
2042 uninstalling the SIGIO handler.
2044 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2046 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2048 2017-11-16 Yao Qi <yao.qi@linaro.org>
2050 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2051 (tic6x_store_gregset): Likewise.
2052 (tic6x_usrregs_info): Move it up.
2054 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2056 * Makefile.in: Update arch rules.
2057 * configure.srv: Explicitly mark arch/ files.
2059 2017-11-13 Andreas Schwab <schwab@suse.de>
2061 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2063 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2065 2017-11-06 Pedro Alves <palves@redhat.com>
2067 * config.in, configure: Regenerate.
2069 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2071 * target.c (struct thread_search): Remove.
2072 (thread_search_callback): Remove.
2073 (prepare_to_access_memory): Use for_each_thread instead of
2074 find_inferior. Inline code from thread_search_callback.
2076 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2078 * server.c (struct visit_actioned_threads_data): Remove.
2079 (visit_actioned_threads): Change prototype to take arguments
2081 (resume): Use find_thread instead of find_inferior.
2083 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2085 * server.c (queue_stop_reply_callback): Change prototype, return
2087 (find_status_pending_thread_callback): Remove.
2088 (handle_status): Replace find_inferior with find_thread and
2091 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2093 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2095 (aarch64_store_gregset): Likewise.
2096 (aarch64_fill_fpregset): Likewise.
2097 (aarch64_store_fpregset): Likewise.
2099 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2101 * gdbthread.h (find_thread, for_each_thread): New functions.
2102 * inferiors.c (thread_of_pid): Remove.
2103 (find_any_thread_of_pid): Use find_thread.
2104 * linux-low.c (num_lwps): Use for_each_thread.
2106 2017-10-17 Yao Qi <yao.qi@linaro.org>
2108 * Makefile.in: Remove one rule.
2109 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2111 2017-10-17 Yao Qi <yao.qi@linaro.org>
2113 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2114 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2116 2017-10-17 Yao Qi <yao.qi@linaro.org>
2118 * configure.srv: Rename arm.o with arch/arm.o.
2120 2017-10-17 Yao Qi <yao.qi@linaro.org>
2122 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2123 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2124 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2125 (arch-i386.o, arch-amd64.o): Remove rules.
2126 (arch/%.o): New rule.
2127 Update POSTCOMPILE and COMPILE.pre.
2128 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2129 * configure: Re-generated.
2130 * configure.srv: Replace arch-i386.o with arch/i386.o.
2131 Replace arch-amd64.o with arch/amd64.o.
2133 2017-10-16 Yao Qi <yao.qi@linaro.org>
2135 * configure: Regenerated.
2137 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2139 * inferiors.h: (struct inferior_list): Remove.
2140 (struct inferior_list_entry); Remove.
2141 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2142 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2143 get_first_inferior): Remove.
2144 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2145 find_inferior_id, find_inferior_in_random): Change signature.
2146 * inferiors.c (all_threads): Change type to
2147 std::list<thread_info *>.
2148 (get_thread): Remove macro.
2149 (find_inferior, find_inferior_id): Change signature, implement
2151 (find_inferior_in_random): Change signature, implement using
2152 find_thread_in_random.
2153 (for_each_inferior, for_each_inferior_with_data): Change
2154 signature, implement using for_each_thread.
2155 (add_inferior_to_list, remove_inferior): Remove.
2156 (add_thread, get_first_thread, thread_of_pid,
2157 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2158 (get_first_inferior, one_inferior_p, clear_inferior_list):
2160 (clear_inferiors, get_thread_process): Update.
2161 * gdbthread.h: Include <list>.
2162 (struct thread_info) <entry>: Remove field.
2164 (all_threads): Change type to std::list<thread_info *>.
2165 (get_first_inferior): Add doc.
2166 (find_thread, for_each_thread, find_thread_in_random): New
2168 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2169 * linux-arm-low.c (update_registers_callback): Update.
2170 * linux-low.c (second_thread_of_pid_p): Update.
2171 (kill_one_lwp_callback, linux_detach_lwp_callback,
2172 delete_lwp_callback, status_pending_p_callback, same_lwp,
2173 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2174 iterate_over_lwps, not_stopped_callback,
2175 resume_stopped_resumed_lwps, count_events_callback,
2176 select_singlestep_lwp_callback, select_event_lwp_callback,
2177 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2178 suspend_and_send_sigstop_callback, wait_for_sigstop,
2179 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2180 lwp_running, linux_set_resume_request, resume_status_pending_p,
2181 need_step_over_p, start_step_over, linux_resume_one_thread,
2182 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2183 reset_lwp_ptrace_options_callback): Update.
2184 * linux-mips-low.c (update_watch_registers_callback): Update.
2185 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2187 (free_register_cache_thread_one): Remove.
2188 (regcache_release): Update.
2189 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2190 handle_qxfer_threads_worker): Update.
2191 (handle_query): Update, use list iterator.
2192 (visit_actioned_threads, handle_pending_status,
2193 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2194 clear_pending_status_callback, set_pending_status_callback,
2195 find_status_pending_thread_callback, handle_status,
2196 process_serial_event): Update.
2197 * target.c (thread_search_callback): Update.
2198 * thread-db.c (thread_db_get_tls_address): Update.
2199 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2201 * win32-i386-low.c (update_debug_registers_callback): Update.
2202 * win32-low.c (delete_thread_info, child_delete_thread,
2203 continue_one_thread, suspend_one_thread,
2204 get_child_debug_event): Adjust.
2206 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2208 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2209 * inferiors.h: Include <list>.
2210 (struct process_info) <entry>: Remove field.
2212 (pid_of): Change macro to function.
2213 (ptid_of, lwpid_of): Remove macro.
2214 (all_processes): Change type to std::list<process_info *>.
2215 (ALL_PROCESSES): Remove macro.
2216 (for_each_process, find_process): New function.
2217 * inferiors.c (all_processes): Change type to
2218 std::list<process_info *>.
2219 (find_thread_process): Adjust.
2220 (add_process): Likewise.
2221 (remove_process): Likewise.
2222 (find_process_pid): Likewise.
2223 (get_first_process): Likewise.
2224 (started_inferior_callback): Remove.
2225 (have_started_inferiors_p): Adjust.
2226 (attached_inferior_callback): Remove.
2227 (have_attached_inferiors_p): Adjust.
2228 * linux-low.c (check_zombie_leaders): Likewise.
2229 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2230 (x86_linux_update_xmltarget): Adjust.
2231 * server.c (handle_query): Likewise.
2232 (gdb_reattached_process): Remove.
2233 (handle_status): Adjust.
2234 (kill_inferior_callback): Likewise.
2235 (detach_or_kill_inferior): Remove.
2236 (print_started_pid): Likewise.
2237 (print_attached_pid): Likewise.
2238 (detach_or_kill_for_exit): Update.
2239 (process_serial_event): Likewise.
2240 * linux-arm-low.c (arm_new_fork): Likewise.
2242 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2244 * dll.h: Include <list>.
2245 (struct dll_info): Add constructor.
2246 <entry>: Remove field.
2247 (all_dlls): Change type to std::list<dll_info>.
2248 * dll.c: Include <algorithm>.
2249 (get_dll): Remove macro.
2250 (all_dlls): Change type to std::list<dll_info *>.
2251 (free_one_dll): Remove.
2252 (match_dll): Likewise.
2253 (loaded_dll): Adjust.
2254 (unloaded_dll): Adjust to all_dlls type change, use
2255 std::find_if. Inline code from match_dll.
2256 (clear_dlls): Adjust to all_dlls type change.
2257 * server.c (emit_dll_description): Remove.
2258 (handle_qxfer_libraries): Adjust to all_dlls type change,
2259 integrate emit_dll_description's functionality.
2261 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2263 * linux-low.h (struct linux_target_ops) <delete_process>: New
2265 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2266 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2267 (struct linux_target_ops): Add delete_process callback.
2268 * linux-arm-low.c (arm_delete_process): New.
2269 (struct linux_target_ops): Add delete_process callback.
2270 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2271 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2272 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2273 * linux-mips-low.c (mips_linux_delete_process): New.
2274 (struct linux_target_ops): Add delete_process callback.
2275 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2276 * linux-s390-low.c (struct linux_target_ops): Likewise.
2277 * linux-sh-low.c (struct linux_target_ops): Likewise.
2278 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2279 * linux-tile-low.c (struct linux_target_ops): Likewise.
2280 * linux-x86-low.c (x86_linux_delete_process): New.
2281 (struct linux_target_ops): Add delete_process callback.
2282 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2284 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2286 * linux-aarch64-low.c (the_low_target): Add thread delete
2288 * linux-arm-low.c (arm_delete_thread): New function.
2289 (the_low_target): Add thread delete callback.
2290 * linux-bfin-low.c (the_low_target): Likewise.
2291 * linux-crisv32-low.c (the_low_target): Likewise.
2292 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2294 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2296 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2297 * linux-mips-low.c (mips_linux_delete_thread): New function.
2298 (the_low_target): Add thread delete callback.
2299 * linux-ppc-low.c (the_low_target): Likewise.
2300 * linux-s390-low.c (the_low_target): Likewise.
2301 * linux-sh-low.c (the_low_target): Likewise.
2302 * linux-tic6x-low.c (the_low_target): Likewise.
2303 * linux-tile-low.c (the_low_target): Likewise.
2304 * linux-x86-low.c (the_low_target): Likewise.
2305 * linux-xtensa-low.c (the_low_target): Likewise.
2307 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2309 * win32-low.c: Include "common-inferior.h".
2311 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2313 * inferiors.c (set_inferior_cwd): New function.
2314 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2315 (handle_query): Inform that QSetWorkingDir is supported.
2316 * win32-low.c (create_process): Pass the inferior's cwd to
2319 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2321 * inferiors.c (current_inferior_cwd): New global variable.
2322 (get_inferior_cwd): New function.
2323 * inferiors.h (struct process_info) <cwd>: New field.
2325 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2327 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2328 (OBS): Add gdb_tilde_expand.o.
2330 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2332 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2333 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2335 2017-09-29 Pedro Alves <palves@redhat.com>
2337 * ax.c (gdb_parse_agent_expr): Constify.
2338 * ax.h (gdb_parse_agent_expr): Constify.
2339 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2341 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2342 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2343 * remote-utils.h (read_ptid): Constify.
2344 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2345 (process_point_options, process_serial_event): Constify.
2346 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2347 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2348 (cmd_qtbuffer): Constify.
2350 2017-09-29 Pedro Alves <palves@redhat.com>
2352 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2355 2017-09-29 Pedro Alves <palves@redhat.com>
2357 * linux-low.c (handle_extended_wait): Pass parent thread instead
2358 of process to thread_db_notice_clone.
2359 * linux-low.h (thread_db_notice_clone): Replace parent process
2360 parameter with parent thread parameter.
2361 * thread-db.c (find_one_thread): Add comment.
2362 (thread_db_notice_clone): Replace parent process parameter with
2363 parent thread parameter. Temporarily switch to the parent thread.
2365 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2367 * gdbthread.h: Include "common-gdbthread.h".
2368 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2369 "if" when validating the ptid.
2370 * remote-utils.c: Include "gdbthread.h".
2371 (prepare_resume_reply): Use "switch_to_thread".
2372 * target.c (done_accessing_memory): Likewise.
2374 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2376 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2377 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2378 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2379 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2380 s390x-gs-linux64-ipa.o to ipa_obj.
2381 * linux-s390-low.c (HWCAP_S390_GS): New define.
2382 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2384 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2385 (s390_arch_setup): Check for guarded-storage support and choose
2387 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2388 init_registers_s390x_gs_linux64.
2389 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2391 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2392 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2394 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2396 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2398 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2400 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2401 (thread_db_thread_handle): Declare.
2402 * linux-low.c (linux_target_ops): Initialize thread_handle.
2403 * server.c (handle_qxfer_threads_worker): Add support for
2405 * target.h (struct target_ops): Add new function pointer,
2407 (target_thread_handle): Define.
2408 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2410 (thread_db_thread_handle): New function.
2412 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2414 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2415 * linux-low.h (thread_db_notice_clone): Declare.
2416 * thread-db.c (thread_db_notice_clone): New function.
2418 2017-09-21 Pedro Alves <palves@redhat.com>
2420 * server.c (gdb_read_memory, handle_status, process_serial_event)
2421 (handle_serial_event, handle_target_event): Adjust to
2422 set_desired_thread prototype change.
2423 * target.c (set_desired_thread): Remove 'use_general' parameter
2425 * target.h (set_desired_thread): Remove 'use_general' parameter.
2427 2017-09-20 Tom Tromey <tom@tromey.com>
2429 * target.c (target_terminal::terminal_state): Define.
2430 (target_terminal::init): Rename from target_terminal_init.
2431 (target_terminal::inferior): Rename from
2432 target_terminal_inferior.
2433 (target_terminal::ours): Rename from target_terminal_ours.
2434 (target_terminal::ours_for_output, target_terminal::info): New.
2436 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2438 * server.c (accumulate_file_name_length): Remove.
2439 (emit_dll_description): Adjust to std::string change.
2440 (handle_qxfer_libraries): Use std::string to hold document.
2442 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2444 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2445 return type of xml_escape_text.
2446 * server.c (emit_dll_description): Likewise.
2448 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2450 * server.c (captured_main): Accept argument for --selftest.
2451 Update run_tests call.
2452 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2453 when registering selftests.
2455 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2457 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2458 instead of "VEC" for "target_desc.reg_defs".
2459 (regcache_cpy): Likewise.
2460 (registers_to_string): Likewise.
2461 (registers_from_string): Likewise.
2462 (find_regno): Likewise.
2463 (supply_regblock): Likewise.
2464 (regcache_raw_read_unsigned): Likewise.
2465 * tdesc.c (init_target_desc): Likewise.
2466 (tdesc_create_reg): Likewise.
2467 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2468 (struct target_desc) <reg_defs>: Convert to "std::vector".
2469 (target_desc): Do not initialize "reg_defs".
2470 (~target_desc): Update code to use "std::vector" instead of "VEC"
2471 for "target_desc.reg_defs".
2472 (operator==): Likewise.
2474 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2476 * inferiors.h (thread_to_gdb_id): Remove.
2477 * inferiors.c (thread_to_gdb_id): Remove.
2478 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2479 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2480 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2482 * nto-low.c (nto_fetch_registers, nto_store_registers,
2483 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2485 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2487 * inferiors.h (gdb_id_to_thread_id): Remove.
2488 * inferiors.c (gdb_id_to_thread_id): Remove.
2489 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2490 removal. Move pid declaration closer to where it's used.
2492 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2494 * server.c (handle_detach): New function.
2495 (process_serial_event): Move code out, call handle_detach.
2497 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2499 * server.c (require_running): Rename to ...
2500 (require_running_or_return): ... this ...
2501 (require_running_or_break): ... and this.
2502 (handle_query, process_serial_event): Adjust.
2504 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2506 * linux-low.c (linux_set_resume_request): Remove unused
2509 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2511 * server.c (first_thread_of): Remove.
2512 (process_serial_event): Replace usage of first_thread_of with
2513 find_any_thread_of_pid.
2514 * tracepoint.c (same_process_p): Remove.
2515 (gdb_agent_about_to_close): Replace usage of same_process_p with
2516 find_any_thread_of_pid.
2517 * linux-x86-low.c (same_process_callback): Remove.
2518 (x86_arch_setup_process_callback): Replace usage of
2519 same_process_callback with find_any_thread_of_pid.
2520 * thread-db.c (any_thread_of): Remove.
2521 (switch_to_process): Replace usage of any_thread_of with
2522 find_any_thread_of_pid.
2523 * inferiors.c (thread_pid_matches_callback): Remove.
2524 (find_thread_process): Adjust to use find_any_thread_of_pid.
2526 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2528 * regcache.c (get_thread_regcache): Guard calls to "memset"
2531 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2533 * linux-low.c (handle_extended_wait): Use
2534 "allocate_target_description" instead of "XNEW".
2535 * linux-x86-low.c (initialize_low_arch): Likewise.
2537 2017-09-05 Yao Qi <yao.qi@linaro.org>
2539 * configure.srv (srv_i386_regobj): Remove.
2540 (srv_amd64_regobj): Remove.
2541 (srv_regobj): Set it to "" for x86 non-linux targets.
2542 * linux-x86-tdesc.c (i386_linux_read_description):
2543 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2544 (init_registers_i386): Remove the declaration.
2545 (tdesc_i386): Remove the declaration.
2546 (lynx_i386_arch_setup): Call i386_create_target_description.
2547 * nto-x86-low.c: Likewise.
2548 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2549 [!__x86_64__]: include arch/i386.h.
2550 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2552 2017-09-05 Yao Qi <yao.qi@linaro.org>
2554 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2555 i386/amd64-XXX-linux from it.
2557 2017-09-05 Yao Qi <yao.qi@linaro.org>
2559 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2561 (ipa_amd64_linux_regobj): Remove.
2562 (ipa_x32_linux_regobj): Remove.
2564 2017-09-05 Yao Qi <yao.qi@linaro.org>
2566 * Makefile.in (arch-amd64.o): New rule.
2567 * configure.srv: Append arch-amd64.o.
2568 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2569 (get_ipa_tdesc): Call amd64_linux_read_description.
2570 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2571 and init_registers_amd64_XXX.
2572 * linux-x86-low.c (x86_linux_read_description): Call
2573 amd64_linux_read_description.
2574 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2575 (initialize_low_arch): Don't call init_registers_x32_XXX and
2576 init_registers_amd64_XXX.
2577 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2578 and tdesc_amd64_XXX.
2579 [__x86_64__] (amd64_tdesc_test): New function.
2580 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2581 and init_registers_amd64_XXX.
2582 * linux-x86-tdesc.c: Include arch/amd64.h.
2583 (xcr0_to_tdesc_idx): New function.
2584 (i386_linux_read_description): New function.
2585 (amd64_get_ipa_tdesc_idx): New function.
2586 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2587 (amd64_get_ipa_tdesc): Declare.
2589 2017-09-05 Yao Qi <yao.qi@linaro.org>
2591 * configure.srv (srv_i386_linux_xmlfiles): Remove
2592 i386/i386-XXX-linux.xml from it.
2594 2017-09-05 Yao Qi <yao.qi@linaro.org>
2596 * configure.srv: Set srv_i386_linux_regobj empty if $development
2598 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2599 initialize_low_tdesc.
2600 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2601 with #if initialize_low_tdesc.
2602 * linux-x86-tdesc-selftest.c: New file.
2603 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2605 2017-09-05 Yao Qi <yao.qi@linaro.org>
2607 * Makefile.in (arch-i386.o): New rule.
2608 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2609 (x86_64-*-linux*): Likewise.
2610 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2611 include arch/i386.h.
2612 (i386_linux_read_description): Remove code and call
2613 i386_create_target_description.
2614 * tdesc.c (allocate_target_description): New function.
2615 * tdesc.h (set_tdesc_architecture): Remove declaration.
2616 (set_tdesc_osabi): Likewise.
2618 2017-09-05 Yao Qi <yao.qi@linaro.org>
2620 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2621 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2622 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2624 * server.c (get_features_xml): Call tdesc_get_features_xml.
2625 * tdesc.c (set_tdesc_architecture): New function.
2626 (set_tdesc_osabi): New function.
2627 (tdesc_get_features_xml): New function.
2628 (tdesc_create_feature): Add an argument.
2629 * tdesc.h (struct target_desc) <features>: New field.
2630 <arch, osabi>: New field.
2631 (~target_desc): xfree features, arch, and osabi.
2632 (target_desc::oerator==): Don't compare .xmltarget.
2633 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2634 (set_tdesc_osabi): Likewise.
2635 (tdesc_get_features_xml): Likewise.
2637 2017-09-05 Yao Qi <yao.qi@linaro.org>
2639 * linux-x86-tdesc.c: Include selftest.h.
2640 (i386_tdesc_test): New function.
2641 (initialize_low_tdesc): Call selftests::register_test.
2642 * tdesc.h: Include regdef.h.
2643 (target_desc): Override operator == and !=.
2645 2017-09-05 Yao Qi <yao.qi@linaro.org>
2647 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2648 (ipa_obj): Likewise.
2649 * linux-i386-ipa.c: Include common/x86-xstate.h
2650 (get_ipa_tdesc): Call i386_linux_read_description.
2651 (initialize_low_tracepoint): Don't call init_registers_XXX
2652 functions, call initialize_low_tdesc instead.
2653 * linux-x86-low.c (x86_linux_read_description): Call
2654 i386_linux_read_description.
2655 (initialize_low_arch): Don't call init_registers_i386_XXX
2656 functions, call initialize_low_tdesc.
2657 * linux-x86-tdesc.c: New file.
2658 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2659 (i386_get_ipa_tdesc_idx): Declare.
2660 (i386_get_ipa_tdesc): Declare.
2661 (initialize_low_tdesc): Declare.
2663 2017-09-05 Yao Qi <yao.qi@linaro.org>
2665 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2668 2017-09-05 Yao Qi <yao.qi@linaro.org>
2670 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2671 * regcache.c (get_thread_regcache): Use VEC_length.
2672 (init_register_cache): Likewise.
2673 (regcache_cpy): Likewise.
2674 (registers_to_string): Iterate reg_defs via VEC_iterate.
2675 (find_regno): Likewise.
2676 (find_register_by_number): Use VEC_index.
2677 (register_size): Call find_register_by_number.
2678 (register_data): Call find_register_by_number.
2679 (supply_regblock): Use VEC_length.
2680 (regcache_raw_read_unsigned): Likewise.
2681 * tdesc.c (init_target_desc): Iterate reg_defs via
2683 (default_description): Update initializer.
2684 (copy_target_description): Don't update field num_registers.
2685 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2686 <num_registers>: Remove.
2688 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2690 * Makefile.in (.SECONDARY): Define target.
2692 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2694 * linux-low.c (linux_wait_1): Adjust.
2695 * server.c (queue_stop_reply_callback): Adjust.
2697 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2699 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2700 QEnvironmentUnset and QEnvironmentReset packets.
2701 (handle_query): Inform remote that QEnvironmentHexEncoded,
2702 QEnvironmentUnset and QEnvironmentReset are supported.
2704 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2706 * inferiors.h (inferior_target_data): Rename to ...
2707 (thread_target_data): ... this.
2708 (inferior_regcache_data): Rename to ...
2709 (thread_regcache_data): ... this.
2710 (set_inferior_regcache_data): Rename to ...
2711 (set_thread_regcache_data): ... this.
2712 * inferiors.c (inferior_target_data): Rename to ...
2713 (thread_target_data): ... this.
2714 (inferior_regcache_data): Rename to ...
2715 (thread_regcache_data): ... this.
2716 (set_inferior_regcache_data): Rename to ...
2717 (set_thread_regcache_data): ... this.
2718 (free_one_thread): Update.
2719 * linux-low.h (get_thread_lwp): Update.
2720 * regcache.c (get_thread_regcache): Update.
2721 (regcache_invalidate_thread): Update.
2722 (free_register_cache_thread): Update.
2723 * win32-i386-low.c (update_debug_registers_callback): Update.
2724 (win32_get_current_dr): Update.
2725 * win32-low.c (thread_rec): Update.
2726 (delete_thread_info): Update.
2727 (continue_one_thread): Update.
2728 (suspend_one_thread): Update.
2730 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2732 * inferiors.c (set_inferior_target_data): Remove.
2733 * inferiors.h (set_inferior_target_data): Remove.
2735 2017-08-18 Yao Qi <yao.qi@linaro.org>
2737 * Makefile.in (OBS): Add selftest.o.
2738 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2739 * configure, config.in: Re-generated.
2740 * server.c: Include common/sefltest.h.
2741 (captured_main): Handle option --selftest.
2743 2017-08-09 Yao Qi <yao.qi@linaro.org>
2745 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2746 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2747 i386-avx-mpx.o and i386-mmx.o.
2748 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2749 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2750 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2751 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2752 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2753 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2754 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2755 i386/amd64-avx-mpx.xml.
2757 2017-08-09 Yao Qi <yao.qi@linaro.org>
2759 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2760 and x32-avx-avx512.o.
2761 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2762 i386/x32-avx-avx512.xml.
2764 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2766 * tracepoint.h (enum class fast_tpoint_collect_result): New
2768 (fast_tracepoint_collecting): Change return type to
2769 fast_tpoint_collect_result.
2770 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2771 * linux-low.h: Include tracepoint.h.
2772 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2773 fast_tpoint_collect_result.
2774 * linux-low.c (handle_tracepoints): Adjust.
2775 (linux_fast_tracepoint_collecting): Change return type to
2776 fast_tpoint_collect_result.
2777 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2778 linux_wait_1, stuck_in_jump_pad_callback,
2779 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2780 proceed_one_lwp): Adjust to type change.
2782 2017-07-10 Yao Qi <yao.qi@linaro.org>
2784 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2786 2017-06-29 Yao Qi <yao.qi@linaro.org>
2788 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2790 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2792 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2794 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2796 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2798 * linux-low.c (linux_create_inferior): Adjust code to access the
2799 environment information via 'gdb_environ' class.
2800 * lynx-low.c (lynx_create_inferior): Likewise.
2801 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2802 (get_environ): Return a pointer to 'our_environ'.
2803 (captured_main): Initialize 'our_environ'.
2804 * server.h (get_environ): Adjust prototype.
2805 * spu-low.c (spu_create_inferior): Adjust code to access the
2806 environment information via 'gdb_environ' class.
2808 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2810 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2811 usage of "register" keyword.
2813 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2815 * configure: Re-generate.
2817 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2819 * configure: Re-generate.
2821 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2823 * Makefile.in (COMPILE.pre): Add "-x c++".
2825 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2827 * fork-child.c: Conditionally include <signal.h>.
2829 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2831 * server.c (handle_general_set): Handle new packet
2832 "QStartupWithShell".
2833 (handle_query): Add "QStartupWithShell" to the list of supported
2835 (gdbserver_usage): Add help text explaining the
2836 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2838 (captured_main): Recognize and act upon the presence of the new
2841 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2842 Pedro Alves <palves@redhat.com>
2844 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2845 * configure: Regenerate.
2846 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2848 (i[34567]86-*-lynxos*): Likewise.
2849 (spu*-*-*): Likewise.
2850 * fork-child.c: New file.
2851 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2853 (linux_ptrace_fun): New function.
2854 (linux_create_inferior): Adjust function prototype to reflect
2855 change on "target.h". Adjust function code to use
2857 (linux_request_interrupt): Delete "signal_pid".
2858 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2859 (lynx_ptrace_fun): New function.
2860 (lynx_create_inferior): Adjust function prototype to reflect
2861 change on "target.h". Adjust function code to use
2863 * nto-low.c (nto_create_inferior): Adjust function prototype and
2864 code to reflect change on "target.h". Update comments.
2865 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2866 "common-terminal.h" and "environ.h".
2867 (terminal_fd): Moved to fork-child.c.
2868 (old_foreground_pgrp): Likewise.
2869 (restore_old_foreground_pgrp): Likewise.
2870 (last_status): Make it global.
2871 (last_ptid): Likewise.
2872 (our_environ): New variable.
2873 (startup_with_shell): Likewise.
2874 (program_name): Likewise.
2875 (program_argv): Rename to...
2876 (program_args): ...this.
2877 (wrapper_argv): New variable.
2878 (start_inferior): Delete function.
2879 (get_exec_wrapper): New function.
2880 (get_exec_file): Likewise.
2881 (get_environ): Likewise.
2882 (prefork_hook): Likewise.
2883 (post_fork_inferior): Likewise.
2884 (postfork_hook): Likewise.
2885 (postfork_child_hook): Likewise.
2886 (handle_v_run): Update code to deal with arguments coming from the
2887 remote host. Update calls from "start_inferior" to
2889 (captured_main): Likewise. Initialize environment variable. Call
2891 * server.h (post_fork_inferior): New prototype.
2892 (get_environ): Likewise.
2893 (last_status): Declare.
2894 (last_ptid): Likewise.
2895 (signal_pid): Likewise.
2896 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2897 (spu_ptrace_fun): New function.
2898 (spu_create_inferior): Adjust function prototype to reflect change
2899 on "target.h". Adjust function code to use "fork_inferior".
2900 * target.c (target_terminal_init): New function.
2901 (target_terminal_inferior): Likewise.
2902 (target_terminal_ours): Likewise.
2903 * target.h: Include <vector>.
2904 (struct target_ops) <create_inferior>: Update prototype.
2905 (create_inferior): Update macro.
2906 * utils.c (gdb_flush_out_err): New function.
2907 * win32-low.c (win32_create_inferior): Adjust function prototype
2908 and code to reflect change on "target.h".
2910 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2912 * inferiors.c (switch_to_thread): New function.
2914 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2916 * Makefile.in (SFILE): Add "common/job-control.c".
2917 (OBS): Add "job-control.o".
2919 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2921 * Makefile: Remove "@host_makefile_frag@".
2923 2017-05-05 Pedro Alves <palves@redhat.com>
2925 * configure: Regenerate.
2927 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2929 * configure: Regenerate.
2931 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2933 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2934 software_single_step change of return type to
2935 std::vector<CORE_ADDR>.
2936 * linux-low.c (install_software_single_step_breakpoints):
2938 * linux-low.h (install_software_single_step_breakpoints):
2941 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2943 * remote-utils.c: Include "gdb_termios.h" instead of
2945 * terminal.h: Delete file.
2947 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2949 * server.c: Include <vector>.
2950 <program_argv, wrapper_argv>: Convert to std::vector.
2951 (start_inferior): Rewrite function to use C++.
2952 (handle_v_run): Likewise. Update code that calculates the argv
2953 based on the vRun packet; use C++.
2954 (captured_main): Likewise.
2956 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2958 * server.c (handle_v_cont): Initialize thread_resume::thread
2961 2017-04-05 Pedro Alves <palves@redhat.com>
2963 * configure: Regenerate.
2965 2017-04-05 Pedro Alves <palves@redhat.com>
2967 * gdbreplay.c (sync_error): Constify.
2968 * linux-x86-low.c (push_opcode): Constify.
2970 2017-04-05 Pedro Alves <palves@redhat.com>
2972 * win32-low.c (get_child_debug_event)
2973 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2974 Report TARGET_WAITKIND_SPURIOUS instead.
2976 2017-04-05 Pedro Alves <palves@redhat.com>
2978 * remote-utils.c (remote_prepare, remote_open): Constify.
2979 * remote-utils.h (remote_prepare, remote_open): Constify.
2980 * server.c (captured_main): Constify 'port' handling.
2982 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2984 * Makefile.in (clean): Clear .deps.
2986 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2988 * .gitignore: Remove generated files, replace with wildcard.
2989 * (clean): Replace removal of generated files with wildcard.
2990 (version.c): Replace with...
2991 (version-generated.c): ...this.
2992 (xml-builtin.c): Replace with...
2993 (xml-builtin-generated.c): ...this.
2994 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2995 (%.c: *regformats*): Replace with...
2996 (%-generated.c: *regformats*): ...this.
2998 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3000 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3001 (xtensa_fill_gregset): Call collect_register_by_name for
3003 (xtensa_store_gregset): Call supply_register_by_name for
3006 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3008 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3009 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3010 (xtensa_store_gregset): Call supply_register for all registers in
3011 a0_regnum..a0_regnum + C0_NREGS range.
3013 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3015 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3016 (ax-ipa.o: ax.c): Remove.
3017 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3018 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3019 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3020 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3021 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3023 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3025 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3026 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3027 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3028 (errors-ipa.o: ../common/errors.c): Remove.
3029 (format-ipa.o: ../common/format.c): Remove.
3030 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3032 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3034 * Makefile.in (%-ipa.o: %.c): New rule.
3035 (tracepoint-ipa.o: tracepoint.c): Remove.
3036 (utils-ipa.o: utils.c): Remove.
3037 (remote-utils-ipa.o: remote-utils.c): Remove.
3038 (regcache-ipa.o: regcache.c): Remove.
3039 (i386-linux-ipa.o: i386-linux.c): Remove.
3040 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3041 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3042 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3043 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3044 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3045 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3046 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3047 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3048 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3049 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3050 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3051 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3052 (aarch64-ipa.o: aarch64.c): Remove.
3053 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3054 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3055 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3056 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3057 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3058 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3059 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3060 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3061 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3062 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3063 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3064 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3065 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3066 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3067 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3068 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3069 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3070 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3071 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3072 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3073 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3074 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3075 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3076 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3077 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3078 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3079 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3080 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3081 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3082 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3083 (tdesc-ipa.o: tdesc.c): Remove.
3084 (x32-linux-ipa.o: x32-linux.c): Remove.
3085 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3086 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3088 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3090 * Makefile.in (%.o: ../arch/%.c): New rule.
3091 (arm.o: ../arch/arm.c): Remove.
3092 (arm-linux.o: ../arch/arm-linux.c): Remove.
3093 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3094 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3096 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3098 * Makefile.in (%.o: ../nat/%.c): New rule.
3099 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3100 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3101 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3102 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3103 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3104 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3105 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3106 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3107 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3108 (linux-personality.o: ../nat/linux-personality.c): Remove.
3109 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3110 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3111 (x86-linux.o: ../nat/x86-linux.c): Remove.
3112 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3113 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3115 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3117 * Makefile.in (%.o: ../common/%.c): New rule.
3118 (signals.o: ../common/signals.c): Remove.
3119 (print-utils.o: ../common/print-utils.c): Remove.
3120 (rsp-low.o: ../common/rsp-low.c): Remove.
3121 (common-utils.o: ../common/common-utils.c): Remove.
3122 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3123 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3124 (vec.o: ../common/vec.c): Remove.
3125 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3126 (xml-utils.o: ../common/xml-utils.c): Remove.
3127 (ptid.o: ../common/ptid.c): Remove.
3128 (buffer.o: ../common/buffer.c): Remove.
3129 (format.o: ../common/format.c): Remove.
3130 (filestuff.o: ../common/filestuff.c): Remove.
3131 (agent.o: ../common/agent.c): Remove.
3132 (errors.o: ../common/errors.c): Remove.
3133 (environ.o: ../common/environ.c): Remove.
3134 (common-debug.o: ../common/common-debug.c): Remove.
3135 (cleanups.o: ../common/cleanups.c): Remove.
3136 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3137 (fileio.o: ../common/fileio.c): Remove.
3138 (common-regcache.o: ../common/common-regcache.c): Remove.
3139 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3140 (new-op.o: ../common/new-op.c): Remove.
3141 (btrace-common.o: ../common/btrace-common.c): Remove.
3143 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3145 * Makefile.in (%.o: ../target/%.c): New rule.
3146 (waitstatus.o: ../target/waitstatus.c): Remove.
3148 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3151 (%.c: ../regformats/%.dat,
3152 (%.c: ../regformats/arm/%.dat,
3153 (%.c: ../regformats/i386/%.dat,
3154 (%.c: ../regformats/rs6000/%.dat): New rules.
3155 (aarch64.c): Remove.
3156 (reg-arm.c): Remove.
3157 (arm-with-iwmmxt.c): Remove.
3158 (arm-with-vfpv2.c): Remove.
3159 (arm-with-vfpv3.c): Remove.
3160 (arm-with-neon.c): Remove.
3161 (reg-bfin.c): Remove.
3162 (reg-cris.c): Remove.
3163 (reg-crisv32.c): Remove.
3165 (i386-linux.c): Remove.
3166 (i386-avx.c): Remove.
3167 (i386-avx-linux.c): Remove.
3168 (i386-avx-avx512.c): Remove.
3169 (i386-avx-avx512-linux.c): Remove.
3170 (i386-mpx.c): Remove.
3171 (i386-mpx-linux.c): Remove.
3172 (i386-avx-mpx-avx512-pku.c): Remove.
3173 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3174 (i386-avx-mpx.c): Remove.
3175 (i386-avx-mpx-linux.c): Remove.
3176 (i386-mmx.c): Remove.
3177 (i386-mmx-linux.c): Remove.
3178 (reg-ia64.c): Remove.
3179 (reg-m32r.c): Remove.
3180 (reg-m68k.c): Remove.
3182 (mips-linux.c): Remove.
3183 (mips-dsp-linux.c): Remove.
3184 (mips64-linux.c): Remove.
3185 (mips64-dsp-linux.c): Remove.
3186 (nios2-linux.c): Remove.
3187 (powerpc-32.c): Remove.
3188 (powerpc-32l.c): Remove.
3189 (powerpc-altivec32l.c): Remove.
3190 (powerpc-cell32l.c): Remove.
3191 (powerpc-vsx32l.c): Remove.
3192 (powerpc-isa205-32l.c): Remove.
3193 (powerpc-isa205-altivec32l.c): Remove.
3194 (powerpc-isa205-vsx32l.c): Remove.
3195 (powerpc-e500l.c): Remove.
3196 (powerpc-64l.c): Remove.
3197 (powerpc-altivec64l.c): Remove.
3198 (powerpc-cell64l.c): Remove.
3199 (powerpc-vsx64l.c): Remove.
3200 (powerpc-isa205-64l.c): Remove.
3201 (powerpc-isa205-altivec64l.c): Remove.
3202 (powerpc-isa205-vsx64l.c): Remove.
3203 (s390-linux32.c): Remove.
3204 (s390-linux32v1.c): Remove.
3205 (s390-linux32v2.c): Remove.
3206 (s390-linux64.c): Remove.
3207 (s390-linux64v1.c): Remove.
3208 (s390-linux64v2.c): Remove.
3209 (s390-te-linux64.c): Remove.
3210 (s390-vx-linux64.c): Remove.
3211 (s390-tevx-linux64.c): Remove.
3212 (s390x-linux64.c): Remove.
3213 (s390x-linux64v1.c): Remove.
3214 (s390x-linux64v2.c): Remove.
3215 (s390x-te-linux64.c): Remove.
3216 (s390x-vx-linux64.c): Remove.
3217 (s390x-tevx-linux64.c): Remove.
3218 (tic6x-c64xp-linux.c): Remove.
3219 (tic6x-c64x-linux.c): Remove.
3220 (tic6x-c62x-linux.c): Remove.
3222 (reg-sparc64.c): Remove.
3223 (reg-spu.c): Remove.
3225 (amd64-linux.c): Remove.
3226 (amd64-avx.c): Remove.
3227 (amd64-avx-linux.c): Remove.
3228 (amd64-avx-avx512.c): Remove.
3229 (amd64-avx-avx512-linux.c): Remove.
3230 (amd64-mpx.c): Remove.
3231 (amd64-mpx-linux.c): Remove.
3232 (amd64-avx-mpx-avx512-pku.c): Remove.
3233 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3234 (amd64-avx-mpx.c): Remove.
3235 (amd64-avx-mpx-linux.c): Remove.
3237 (x32-linux.c): Remove.
3238 (x32-avx.c): Remove.
3239 (x32-avx-linux.c): Remove.
3240 (x32-avx-avx512.c): Remove.
3241 (x32-avx-avx512-linux.c): Remove.
3242 (reg-xtensa.c): Remove.
3243 (reg-tilegx.c): Remove.
3244 (reg-tilegx32.c): Remove.
3246 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3248 * Makefile.in (SFILES): Add "common/environ.c".
3249 (OBJS): Add "common/environ.h".
3251 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3253 * configure.ac: Check if the fs_base and gs_base members of
3254 `struct user_regs_struct' exist.
3255 * config.in: Regenerated.
3256 * configure: Likewise.
3258 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3260 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3262 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3263 (get_next_pcs_syscall_next_pc): Likewise.
3265 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3267 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3268 * nto-x86-low.c: Likewise.
3270 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3272 * Makefile.in: Include disable-implicit-rules.mk.
3274 2016-11-23 Pedro Alves <palves@redhat.com>
3276 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3277 (debug_vprintf): Use std::chrono::steady_clock instead of
3278 gettimeofday. Use '.' instead of ':'.
3279 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3280 (get_timestamp): Use std::chrono::steady_clock instead of
3283 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3285 * Makefile.in: Fix whitespace formatting.
3287 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3289 * Makefile.in (SFILES, OBS): Flatten list and order
3292 2016-11-23 Pedro Alves <palves@redhat.com>
3294 * event-loop.c (handle_file_event): Use warning.
3295 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3296 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3299 2016-11-23 Pedro Alves <palves@redhat.com>
3301 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3303 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3304 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3305 debug_printf and debug_flush for debug output.
3306 * server.c (handle_general_set): Likewise.
3307 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3310 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3312 * Makefile.in (.c.o): Replace rule with ...
3313 (%.o: %.c): ... this one.
3315 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3317 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3318 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3320 * configure.ac: Remove checks for the make program.
3321 * configure: Re-generate.
3323 2016-10-28 Pedro Alves <palves@redhat.com>
3325 * Makefile.in (CXX_DIALECT): Get from configure.
3326 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3327 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3328 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3329 * config.in: Regenerate.
3330 * configure: Regenerate.
3332 2016-10-27 Yao Qi <yao.qi@linaro.org>
3334 * linux-low.c (linux_supports_range_stepping): Return true if
3335 can_software_single_step return true.
3337 2016-10-27 Yao Qi <yao.qi@linaro.org>
3339 * inferiors.c (find_inferior_in_random): New function.
3340 * inferiors.h (find_inferior_in_random): Declare.
3341 * linux-low.c (linux_wait_for_event_filtered): Call
3342 find_inferior_in_random instead of find_inferior.
3344 2016-10-27 Yao Qi <yao.qi@linaro.org>
3346 * linux-low.c (linux_wait_1): If single-step breakpoints are
3347 inserted, remove them.
3349 2016-10-26 Pedro Alves <palves@redhat.com>
3351 * linux-low.c (handle_extended_wait): Link parent/child fork
3353 (linux_wait_1): Unlink them.
3354 (linux_set_resume_request): Ignore resume requests for
3355 already-resumed and unhandled fork child threads.
3356 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3357 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3359 (handle_v_requests) <vCont>: Don't call require_running.
3360 * server.h (in_queued_stop_replies): New declaration.
3362 2016-10-24 Yao Qi <yao.qi@linaro.org>
3365 * linux-aarch64-low.c (append_insns): Cast the return value to
3368 2016-10-10 Yao Qi <yao.qi@linaro.org>
3370 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3372 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3374 * target.c (target_supports_multi_process): New function, moved
3376 * target.h (target_supports_multi_process): ... here. Remove
3379 2016-10-05 Tom Tromey <tom@tromey.com>
3382 * tracepoint.c (handle_tracepoint_bkpts): Check
3383 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3385 2016-10-05 Yao Qi <yao.qi@linaro.org>
3387 * configure.srv: Update the path of arm-*.xml files.
3389 2016-10-05 Terry Guo <terry.guo@arm.com>
3390 Yao Qi <yao.qi@linaro.org>
3392 * Makefile.in: Adjust the path of rules.
3393 * configure.srv: Update the path of xml files.
3394 * regformats/arm-with-iwmmxt.dat: Regenerated.
3395 * regformats/arm-with-neon.dat: Likewise.
3396 * regformats/arm-with-vfpv2.dat: Likewise.
3397 * regformats/arm-with-vfpv3.dat Likewise.
3399 2016-09-30 Yao Qi <yao.qi@linaro.org>
3402 * target.c (target_stop_and_wait): Don't call
3403 target_continue_no_signal, use resume_stop instead.
3405 2016-09-26 Yao Qi <yao.qi@linaro.org>
3407 * linux-low.c (linux_wait_1): Call debug_exit.
3409 2016-09-23 Pedro Alves <palves@redhat.com>
3411 * Makefile.in (SFILES): Add common/new-op.c.
3412 (OBS): Add common/new-op.o.
3413 (new-op.o): New rule.
3415 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3417 * .gitinore: Ignore more files.
3419 2016-09-21 Yao Qi <yao.qi@linaro.org>
3421 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3424 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3426 * server.c (start_inferior): Call target_mourn_inferior instead of
3427 mourn_inferior; pass ptid_t argument to it.
3429 (handle_target_event): Likewise.
3430 * target.c (target_mourn_inferior): New function.
3431 * target.h (mourn_inferior): Delete macro.
3433 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3435 * linux-low.c (lwp_is_stepping): New function.
3437 2016-09-06 Carl Love <cel@us.ibm.com>
3439 * server.c (start_inferior): Fixed comment, requested comment change
3440 didn't get updated correctly. Removed reference to ptrace () call as
3441 it is only true on Linux systems.
3443 2016-09-06 Carl Love <cel@us.ibm.com>
3445 * server.c (start_inferior): Do not call
3446 function target_post_create_inferior () if the
3447 inferior process has already exited.
3449 2016-09-05 Pedro Alves <palves@redhat.com>
3451 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3452 (COMPILE.pre, CC_LD): Use CXX directly.
3453 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3454 * acinclude.m4: Don't include build-with-cxx.m4.
3455 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3456 * configure: Regenerate.
3458 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3461 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3462 call writing data to own_buf.
3464 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3466 * target.c (mywait): Call target_wait instead of
3468 (target_wait): New function.
3470 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3472 * server.c (start_inferior): New variable 'ptid'. Replace calls
3473 to the_target->resume by target_continue{,_no_signal}, depending
3475 * target.c (target_stop_and_wait): Call target_continue_no_signal
3476 instead of the_target->resume.
3477 (target_continue): New function.
3479 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3481 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3483 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3486 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3488 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3489 * linux-arm-low.c (ps_get_thread_area): Likewise.
3490 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3491 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3492 * linux-mips-low.c (ps_get_thread_area): Likewise.
3493 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3494 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3495 * linux-x86-low.c (ps_get_thread_area): Likewise.
3496 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3498 2016-08-19 Pedro Alves <palves@redhat.com>
3500 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3502 2016-08-19 Pedro Alves <palves@redhat.com>
3504 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3505 comment. Use memcpy instead of casting through unsigned long.
3507 2016-08-19 Pedro Alves <palves@redhat.com>
3509 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3510 allocating around 0x80000000.
3512 2016-08-19 Pedro Alves <palves@redhat.com>
3515 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3516 (x32-avx512-linux-ipa.o): New rules.
3517 * configure.ac (x86_64-*-linux*): New x32 check.
3518 * configure.srv (ipa_x32_linux_regobj): New.
3519 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3520 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3522 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3524 * configure: Regenerate.
3526 2016-08-09 Pedro Alves <palves@redhat.com>
3529 * Makefile.in (OBS): Add signals-state-save-restore.o.
3530 (signals-state-save-restore.o): New rule.
3531 * config.in: Regenerate.
3532 * configure: Regenerate.
3533 * linux-low.c: Include "signals-state-save-restore.h".
3534 (linux_create_inferior): Call
3535 restore_original_signals_state.
3536 * server.c: Include "dispositions-save-restore.h".
3537 (captured_main): Call save_original_signals_state.
3539 2016-08-05 Pedro Alves <palves@redhat.com>
3541 * configure: Regenerate.
3543 2016-08-04 Yao Qi <yao.qi@linaro.org>
3545 * linux-low.c (regsets_fetch_inferior_registers): Check
3546 errno is ESRCH or not.
3548 2016-08-02 Yao Qi <yao.qi@linaro.org>
3550 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3551 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3552 (thread_db_load_search): Update.
3553 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3554 td_ta_set_event and td_ta_event_getmsg.
3556 2016-07-26 Pedro Alves <palves@redhat.com>
3559 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3560 of unsigned long for 64-bit registers and use uint32_t instead of
3561 unsigned int for 32-bit registers.
3563 2016-07-26 Pedro Alves <palves@redhat.com>
3565 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3568 2016-07-21 Tom Tromey <tom@tromey.com>
3570 * configure: Rebuild.
3572 2016-07-21 Yao Qi <yao.qi@linaro.org>
3574 * mem-break.c (find_gdb_breakpoint): Cast bp to
3575 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3577 2016-07-21 Yao Qi <yao.qi@linaro.org>
3579 * server.c (handle_v_requests): Support s and S actions
3580 if target_supports_software_single_step return true.
3582 2016-07-21 Yao Qi <yao.qi@linaro.org>
3584 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3585 is resume_step, call maybe_hw_step.
3586 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3588 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3590 (proceed_one_lwp): If resume request is resume_step, install
3591 reinsert breakpoints and call maybe_hw_step.
3593 2016-07-21 Yao Qi <yao.qi@linaro.org>
3595 * linux-low.c (proceed_one_lwp): Declare.
3596 (linux_resume_one_thread): Remove local variable 'step'.
3597 Lift code enqueue signal. Call proceed_one_lwp instead of
3598 linux_resume_one_lwp.
3600 2016-07-21 Yao Qi <yao.qi@linaro.org>
3602 * linux-low.c (linux_resume_one_thread): Call
3603 enqueue_pending_signal.
3605 2016-07-21 Yao Qi <yao.qi@linaro.org>
3607 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3608 * inferiors.c (do_restore_current_thread_cleanup): New function.
3609 (make_cleanup_restore_current_thread): Likewise.
3610 * linux-low.c (install_software_single_step_breakpoints): Call
3611 make_cleanup_restore_current_thread. Switch current_thread to
3614 2016-07-21 Yao Qi <yao.qi@linaro.org>
3616 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3617 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3618 (clone_one_breakpoint): Likewise.
3619 (delete_reinsert_breakpoints): Change parameter to thread.
3621 (has_reinsert_breakpoints): Likewise.
3622 (uninsert_reinsert_breakpoints): Likewise.
3623 (reinsert_reinsert_breakpoints): Likewise.
3624 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3625 (delete_reinsert_breakpoints): Likewise.
3626 (reinsert_reinsert_breakpoints): Likewise.
3627 (uninsert_reinsert_breakpoints): Likewise.
3628 (has_reinsert_breakpoints): Likewise.
3630 2016-07-21 Yao Qi <yao.qi@linaro.org>
3632 * inferiors.c (get_thread_process): Make parameter const.
3633 * inferiors.h (get_thread_process): Update declaration.
3634 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3635 Add new parameters child_thread and parent_thread. Callers
3637 * mem-break.h (clone_all_breakpoints): Update declaration.
3639 2016-07-21 Yao Qi <yao.qi@linaro.org>
3641 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3642 <command_list, handler>: Remove.
3643 (struct gdb_breakpoint): New.
3644 (struct other_breakpoint): New.
3645 (struct reinsert_breakpoint): New.
3646 (is_gdb_breakpoint): New function.
3647 (any_persistent_commands): Update command_list if
3648 is_gdb_breakpoint returns true.
3649 (set_breakpoint): Create breakpoints according to their types.
3650 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3651 (set_gdb_breakpoint_1): Likewise.
3652 (set_gdb_breakpoint): Likewise.
3653 (clear_breakpoint_conditions): Change parameter type to
3654 'struct gdb_breakpoint *'.
3655 (clear_breakpoint_commands): Likewise.
3656 (clear_breakpoint_conditions_and_commands): Likewise.
3657 (add_condition_to_breakpoint): Likewise.
3658 (add_breakpoint_condition): Likewise.
3659 (add_commands_to_breakpoint): Likewise.
3660 (check_breakpoints): Check other_breakpoint.
3661 (clone_one_breakpoint): Clone breakpopint according to its type.
3662 * mem-break.h (struct gdb_breakpoint): Declare.
3663 (set_gdb_breakpoint): Update declaration.
3664 (clear_breakpoint_conditions_and_commands): Likewise.
3665 (add_breakpoint_condition): Likewise.
3666 (add_breakpoint_commands): Likewise.
3667 * server.c (process_point_options): Change parameter type to
3668 'struct gdb_breakpoint *'.
3670 2016-07-21 Yao Qi <yao.qi@linaro.org>
3672 * mem-break.c (set_breakpoint_at): Rename it to ...
3673 (set_breakpoint_type_at): ... it.
3674 (set_breakpoint_at): Call set_breakpoint_type_at.
3675 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3676 * mem-break.h (set_breakpoint_at): Update comments.
3678 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3680 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3682 (nios2_store_gregset): Likewise.
3684 2016-07-01 Pedro Alves <palves@redhat.com>
3685 Antoine Tremblay <antoine.tremblay@ericsson.com>
3687 * linux-low.c: Change interface to take the target lwp_info
3688 pointer directly and return void. Handle detaching from a zombie
3690 (linux_detach_lwp_callback): New function.
3691 (linux_detach): Detach from the leader thread after detaching from
3694 2016-06-28 Yao Qi <yao.qi@linaro.org>
3696 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3697 for variable new_offset.
3698 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3699 (aarch64_ftrace_insn_reloc_cb): Likewise.
3700 (aarch64_ftrace_insn_reloc_tb): Likewise.
3701 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3702 PRIx64 instead of PRIx32.
3704 2016-06-28 Yao Qi <yao.qi@linaro.org>
3706 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3707 (the_low_target): Install arm_get_syscall_trapinfo.
3709 2016-06-28 Yao Qi <yao.qi@linaro.org>
3711 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3713 (the_low_target): Install aarch64_get_syscall_trapinfo.
3715 2016-06-28 Yao Qi <yao.qi@linaro.org>
3717 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3719 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3720 Remove parameter sysno.
3721 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3724 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3726 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3727 (s390_emit_ne_goto): Likewise.
3728 (s390_emit_lt_goto): Likewise.
3729 (s390_emit_le_goto): Likewise.
3730 (s390_emit_gt_goto): Likewise.
3731 (s390_emit_ge_goto): Likewise.
3732 (s390x_emit_eq_goto): Likewise.
3733 (s390x_emit_ne_goto): Likewise.
3734 (s390x_emit_lt_goto): Likewise.
3735 (s390x_emit_le_goto): Likewise.
3736 (s390x_emit_gt_goto): Likewise.
3737 (s390x_emit_ge_goto): Likewise.
3738 (s390_emit_ops_impl): Mark variable static.
3739 (s390x_emit_ops): Likewise.
3741 2016-06-17 Yao Qi <yao.qi@linaro.org>
3743 * linux-low.c (handle_extended_wait): Call
3744 uninsert_reinsert_breakpoints for the parent process. Remove
3745 reinsert breakpoints from the child process. Reinsert them to
3746 the parent process when vfork is done.
3747 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3748 (reinsert_reinsert_breakpoints): New function.
3749 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3750 (reinsert_reinsert_breakpoints): Declare.
3752 2016-06-17 Yao Qi <yao.qi@linaro.org>
3754 * linux-low.c (handle_extended_wait): If the parent is doing
3755 step-over, remove the reinsert breakpoints from the forked child.
3757 2016-06-17 Yao Qi <yao.qi@linaro.org>
3759 * linux-low.c (unsuspend_all_lwps): Declare.
3760 (linux_low_filter_event): If thread exited, call finish_step_over.
3761 If step-over is finished, unsuspend other threads.
3763 2016-06-17 Yao Qi <yao.qi@linaro.org>
3765 * linux-low.c (linux_resume_one_lwp_throw): Assert
3766 has_reinsert_breakpoints returns false.
3767 * mem-break.c (delete_disabled_breakpoints): Assert
3768 bp type isn't reinsert_breakpoint.
3770 2016-06-17 Yao Qi <yao.qi@linaro.org>
3772 * linux-low.c (maybe_hw_step): New function.
3773 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3774 (finish_step_over): Switch current_thread to lwp temporarily,
3775 and assert has_reinsert_breakpoints returns true.
3776 (proceed_one_lwp): Call maybe_hw_step.
3777 * mem-break.c (has_reinsert_breakpoints): New function.
3778 * mem-break.h (has_reinsert_breakpoints): Declare.
3780 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3782 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3784 2016-05-17 Yao Qi <yao.qi@linaro.org>
3786 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3787 instead of find_inferior.
3789 2016-05-05 Yao Qi <yao.qi@linaro.org>
3791 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3792 Initialize res to zero.
3794 2016-05-05 Yao Qi <yao.qi@linaro.org>
3796 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3799 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3801 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3802 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3803 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3805 2016-04-28 Par Olsson <par.olsson@windriver.com>
3806 Simon Marchi <simon.marchi@ericsson.com>
3808 * tracepoint.c (write_inferior_int8): New function.
3809 (cmd_qtenable_disable): Write enable flag using
3810 write_inferior_int8.
3812 2016-04-25 Yao Qi <yao.qi@linaro.org>
3814 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3815 (need_step_over_p): Return zero if the LWP has pending signals
3816 can be delivered on software single step target.
3818 2016-04-25 Yao Qi <yao.qi@linaro.org>
3820 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3821 return instead of error.
3823 2016-04-22 Yao Qi <yao.qi@linaro.org>
3825 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3828 2016-04-22 Yao Qi <yao.qi@linaro.org>
3830 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3831 signal when stepping over breakpoint with software single
3834 2016-04-21 Pedro Alves <palves@redhat.com>
3836 * linux-s390-low.c (s390_collect_ptrace_register)
3837 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3839 (s390_check_regset): Use void * instead of gdb_byte *.
3841 2016-04-20 Pedro Alves <palves@redhat.com>
3843 * configure: Renegerate.
3845 2016-04-20 Yao Qi <yao.qi@linaro.org>
3847 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3848 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3850 (arm_store_gregset): Likewise.
3852 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3854 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3855 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3856 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3857 (amd64-avx-mpx-linux.c): New rules.
3858 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3859 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3860 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3861 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3862 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3863 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3864 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3865 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3866 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3867 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3868 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3869 * linux-x86-low.c (x86_linux_read_description): Add case for
3870 X86_XSTATE_AVX_MPX_MASK.
3871 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3872 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3873 init_registers_i386_avx_mpx_linux.
3874 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3875 (initialize_low_tracepoint): Call
3876 init_registers_i386_avx_mpx_linux.
3877 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3878 (initialize_low_tracepoint): Call
3879 init_registers_amd64_avx_mpx_linux.
3880 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3881 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3882 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3885 2016-04-18 Pedro Alves <palves@redhat.com>
3887 * configure: Regenerate.
3889 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3891 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3892 (aarch64_emit_sub): Likewise.
3894 2016-04-12 Pedro Alves <palves@redhat.com>
3896 * utils.c (prepare_to_throw_exception): Delete.
3898 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3900 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3902 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3904 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3906 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3908 * linux-aarch64-ipa.c: Add <elf.h> include.
3909 * linux-ppc-ipa.c: Add <elf.h> include.
3910 * linux-s390-ipa.c: Add <elf.h> include.
3912 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3914 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3915 (get_raw_reg_ptr): Likewise.
3916 (get_trace_state_variable_value_ptr): Likewise.
3917 (set_trace_state_variable_value_ptr): Likewise.
3918 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3921 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3922 Marcin Kościelnicki <koriakin@0x04.net>
3925 * linux-ppc-low.c (emit_insns): New function.
3926 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3927 (ppc_emit_prologue): New function.
3928 (ppc_emit_epilogue): New function.
3929 (ppc_emit_add): New function.
3930 (ppc_emit_sub): New function.
3931 (ppc_emit_mul): New function.
3932 (ppc_emit_lsh): New function.
3933 (ppc_emit_rsh_signed): New function.
3934 (ppc_emit_rsh_unsigned): New function.
3935 (ppc_emit_ext): New function.
3936 (ppc_emit_zero_ext): New function.
3937 (ppc_emit_log_not): New function.
3938 (ppc_emit_bit_and): New function.
3939 (ppc_emit_bit_or): New function.
3940 (ppc_emit_bit_xor): New function.
3941 (ppc_emit_bit_not): New function.
3942 (ppc_emit_equal): New function.
3943 (ppc_emit_less_signed): New function.
3944 (ppc_emit_less_unsigned): New function.
3945 (ppc_emit_ref): New function.
3946 (ppc_emit_const): New function.
3947 (ppc_emit_reg): New function.
3948 (ppc_emit_pop): New function.
3949 (ppc_emit_stack_flush): New function.
3950 (ppc_emit_swap): New function.
3951 (ppc_emit_stack_adjust): New function.
3952 (ppc_emit_call): New function.
3953 (ppc_emit_int_call_1): New function.
3954 (ppc_emit_void_call_2): New function.
3955 (ppc_emit_if_goto): New function.
3956 (ppc_emit_goto): New function.
3957 (ppc_emit_eq_goto): New function.
3958 (ppc_emit_ne_goto): New function.
3959 (ppc_emit_lt_goto): New function.
3960 (ppc_emit_le_goto): New function.
3961 (ppc_emit_gt_goto): New function.
3962 (ppc_emit_ge_goto): New function.
3963 (ppc_write_goto_address): New function.
3964 (ppc_emit_ops_impl): New static variable.
3965 (ppc64v1_emit_prologue): New function.
3966 (ppc64v2_emit_prologue): New function.
3967 (ppc64_emit_epilogue): New function.
3968 (ppc64_emit_add): New function.
3969 (ppc64_emit_sub): New function.
3970 (ppc64_emit_mul): New function.
3971 (ppc64_emit_lsh): New function.
3972 (ppc64_emit_rsh_signed): New function.
3973 (ppc64_emit_rsh_unsigned): New function.
3974 (ppc64_emit_ext): New function.
3975 (ppc64_emit_zero_ext): New function.
3976 (ppc64_emit_log_not): New function.
3977 (ppc64_emit_bit_and): New function.
3978 (ppc64_emit_bit_or): New function.
3979 (ppc64_emit_bit_xor): New function.
3980 (ppc64_emit_bit_not): New function.
3981 (ppc64_emit_equal): New function.
3982 (ppc64_emit_less_signed): New function.
3983 (ppc64_emit_less_unsigned): New function.
3984 (ppc64_emit_ref): New function.
3985 (ppc64_emit_const): New function.
3986 (ppc64v1_emit_reg): New function.
3987 (ppc64v2_emit_reg): New function.
3988 (ppc64_emit_pop): New function.
3989 (ppc64_emit_stack_flush): New function.
3990 (ppc64_emit_swap): New function.
3991 (ppc64v1_emit_call): New function.
3992 (ppc64v2_emit_call): New function.
3993 (ppc64v1_emit_int_call_1): New function.
3994 (ppc64v2_emit_int_call_1): New function.
3995 (ppc64v1_emit_void_call_2): New function.
3996 (ppc64v2_emit_void_call_2): New function.
3997 (ppc64_emit_if_goto): New function.
3998 (ppc64_emit_eq_goto): New function.
3999 (ppc64_emit_ne_goto): New function.
4000 (ppc64_emit_lt_goto): New function.
4001 (ppc64_emit_le_goto): New function.
4002 (ppc64_emit_gt_goto): New function.
4003 (ppc64_emit_ge_goto): New function.
4004 (ppc64v1_emit_ops_impl): New static variable.
4005 (ppc64v2_emit_ops_impl): New static variable.
4006 (ppc_emit_ops): New function.
4007 (linux_low_target): Wire in ppc_emit_ops.
4009 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4010 Marcin Kościelnicki <koriakin@0x04.net>
4013 * Makefile.in: Add powerpc-*-ipa.o
4014 * configure.srv: Add ipa_obj for powerpc*-linux.
4015 * linux-ppc-ipa.c: New file.
4016 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4018 (PPC_FIELD): New macro.
4019 (PPC_SEXT): New macro.
4020 (PPC_OP6): New macro.
4021 (PPC_BO): New macro.
4022 (PPC_LI): New macro.
4023 (PPC_BD): New macro.
4024 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4025 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4026 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4027 (ppc_get_thread_area): New function.
4028 (is_elfv2_inferior): New function.
4029 (gen_ds_form): New function.
4030 (GEN_STD): New macro.
4031 (GEN_STDU): New macro.
4032 (GEN_LD): New macro.
4033 (GEN_LDU): New macro.
4034 (gen_d_form): New function.
4035 (GEN_ADDI): New macro.
4036 (GEN_ADDIS): New macro.
4037 (GEN_LI): New macro.
4038 (GEN_LIS): New macro.
4039 (GEN_ORI): New macro.
4040 (GEN_ORIS): New macro.
4041 (GEN_LWZ): New macro.
4042 (GEN_STW): New macro.
4043 (GEN_STWU): New macro.
4044 (gen_xfx_form): New function.
4045 (GEN_MFSPR): New macro.
4046 (GEN_MTSPR): New macro.
4047 (GEN_MFCR): New macro.
4048 (GEN_MTCR): New macro.
4049 (GEN_SYNC): New macro.
4050 (GEN_LWSYNC): New macro.
4051 (gen_x_form): New function.
4052 (GEN_OR): New macro.
4053 (GEN_MR): New macro.
4054 (GEN_LWARX): New macro.
4055 (GEN_STWCX): New macro.
4056 (GEN_CMPW): New macro.
4057 (gen_md_form): New function.
4058 (GEN_RLDICL): New macro.
4059 (GEN_RLDICR): New macro.
4060 (gen_i_form): New function.
4062 (GEN_BL): New macro.
4063 (gen_b_form): New function.
4064 (GEN_BNE): New macro.
4065 (GEN_LOAD): New macro.
4066 (GEN_STORE): New macro.
4067 (gen_limm): New function.
4068 (gen_atomic_xchg): New function.
4069 (gen_call): New function.
4070 (ppc_relocate_instruction): New function.
4071 (ppc_install_fast_tracepoint_jump_pad): New function.
4072 (ppc_get_min_fast_tracepoint_insn_len): New function.
4073 (ppc_get_ipa_tdesc_idx): New function.
4074 (the_low_target): Wire in the new functions.
4075 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4077 * linux-ppc-tdesc.h: New file.
4079 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4081 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4082 (alloc_jump_pad_buffer): New function.
4083 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4084 (alloc_jump_pad_buffer): New function.
4085 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4086 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4087 (alloc_jump_pad_buffer): New function.
4088 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4089 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4090 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4091 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4093 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4095 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4096 * linux-amd64-ipa.c: Likewise.
4097 * linux-i386-ipa.c: Likewise.
4098 * linux-s390-ipa.c: Likewise.
4099 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4100 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4101 set_trace_state_variable_value_ptr.
4102 (struct ipa_sym_addresses): Likewise.
4103 (symbol_list): Likewise.
4104 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4105 accessing gdb_collect directly.
4106 (gdb_collect_ptr_type): New typedef.
4107 (get_raw_reg_ptr_type): New typedef.
4108 (get_trace_state_variable_value_ptr_type): New typedef.
4109 (set_trace_state_variable_value_ptr_type): New typedef.
4110 (gdb_collect_ptr): New global.
4111 (get_raw_reg_ptr): New global.
4112 (get_trace_state_variable_value_ptr): New global.
4113 (set_trace_state_variable_value_ptr): New global.
4114 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4115 accessing get_raw_reg directly.
4116 (get_get_tsv_func_addr): Likewise for
4117 get_trace_state_variable_value_ptr.
4118 (get_set_tsv_func_addr): Likewise for
4119 set_trace_state_variable_value_ptr.
4120 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4122 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4124 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4126 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4128 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4130 (relocate_instruction): Remove own_buf.
4131 * server.c (own_buf): Make global.
4132 (handle_v_requests): Make global.
4133 * server.h (own_buf): New declaration.
4134 (handle_v_requests): New prototype.
4136 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4139 * linux-s390-low.c (add_insns): New function.
4140 (s390_emit_prologue): New function.
4141 (s390_emit_epilogue): New function.
4142 (s390_emit_add): New function.
4143 (s390_emit_sub): New function.
4144 (s390_emit_mul): New function.
4145 (s390_emit_lsh): New function.
4146 (s390_emit_rsh_signed): New function.
4147 (s390_emit_rsh_unsigned): New function.
4148 (s390_emit_ext): New function.
4149 (s390_emit_log_not): New function.
4150 (s390_emit_bit_and): New function.
4151 (s390_emit_bit_or): New function.
4152 (s390_emit_bit_xor): New function.
4153 (s390_emit_bit_not): New function.
4154 (s390_emit_equal): New function.
4155 (s390_emit_less_signed): New function.
4156 (s390_emit_less_unsigned): New function.
4157 (s390_emit_ref): New function.
4158 (s390_emit_if_goto): New function.
4159 (s390_emit_goto): New function.
4160 (s390_write_goto_address): New function.
4161 (s390_emit_litpool): New function.
4162 (s390_emit_const): New function.
4163 (s390_emit_call): New function.
4164 (s390_emit_reg): New function.
4165 (s390_emit_pop): New function.
4166 (s390_emit_stack_flush): New function.
4167 (s390_emit_zero_ext): New function.
4168 (s390_emit_swap): New function.
4169 (s390_emit_stack_adjust): New function.
4170 (s390_emit_set_r2): New function.
4171 (s390_emit_int_call_1): New function.
4172 (s390_emit_void_call_2): New function.
4173 (s390_emit_eq_goto): New function.
4174 (s390_emit_ne_goto): New function.
4175 (s390_emit_lt_goto): New function.
4176 (s390_emit_le_goto): New function.
4177 (s390_emit_gt_goto): New function.
4178 (s390_emit_ge_goto): New function.
4179 (s390x_emit_prologue): New function.
4180 (s390x_emit_epilogue): New function.
4181 (s390x_emit_add): New function.
4182 (s390x_emit_sub): New function.
4183 (s390x_emit_mul): New function.
4184 (s390x_emit_lsh): New function.
4185 (s390x_emit_rsh_signed): New function.
4186 (s390x_emit_rsh_unsigned): New function.
4187 (s390x_emit_ext): New function.
4188 (s390x_emit_log_not): New function.
4189 (s390x_emit_bit_and): New function.
4190 (s390x_emit_bit_or): New function.
4191 (s390x_emit_bit_xor): New function.
4192 (s390x_emit_bit_not): New function.
4193 (s390x_emit_equal): New function.
4194 (s390x_emit_less_signed): New function.
4195 (s390x_emit_less_unsigned): New function.
4196 (s390x_emit_ref): New function.
4197 (s390x_emit_if_goto): New function.
4198 (s390x_emit_const): New function.
4199 (s390x_emit_call): New function.
4200 (s390x_emit_reg): New function.
4201 (s390x_emit_pop): New function.
4202 (s390x_emit_stack_flush): New function.
4203 (s390x_emit_zero_ext): New function.
4204 (s390x_emit_swap): New function.
4205 (s390x_emit_stack_adjust): New function.
4206 (s390x_emit_int_call_1): New function.
4207 (s390x_emit_void_call_2): New function.
4208 (s390x_emit_eq_goto): New function.
4209 (s390x_emit_ne_goto): New function.
4210 (s390x_emit_lt_goto): New function.
4211 (s390x_emit_le_goto): New function.
4212 (s390x_emit_gt_goto): New function.
4213 (s390x_emit_ge_goto): New function.
4214 (s390_emit_ops): New function.
4215 (struct linux_target_ops): Fill in emit_ops hook.
4217 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4220 * Makefile.in: Add s390 IPA files.
4221 * configure.srv: Build IPA for s390.
4222 * linux-s390-ipa.c: New file.
4223 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4224 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4225 (tdesc_s390_linux32): Likewise.
4226 (init_registers_s390_linux32v1): Likewise.
4227 (tdesc_s390_linux32v1): Likewise.
4228 (init_registers_s390_linux32v2): Likewise.
4229 (tdesc_s390_linux32v2): Likewise.
4230 (init_registers_s390_linux64): Likewise.
4231 (tdesc_s390_linux64): Likewise.
4232 (init_registers_s390_linux64v1): Likewise.
4233 (tdesc_s390_linux64v1): Likewise.
4234 (init_registers_s390_linux64v2): Likewise.
4235 (tdesc_s390_linux64v2): Likewise.
4236 (init_registers_s390_te_linux64): Likewise.
4237 (tdesc_s390_te_linux64): Likewise.
4238 (init_registers_s390_vx_linux64): Likewise.
4239 (tdesc_s390_vx_linux64): Likewise.
4240 (init_registers_s390_tevx_linux64): Likewise.
4241 (tdesc_s390_tevx_linux64): Likewise.
4242 (init_registers_s390x_linux64): Likewise.
4243 (tdesc_s390x_linux64): Likewise.
4244 (init_registers_s390x_linux64v1): Likewise.
4245 (tdesc_s390x_linux64v1): Likewise.
4246 (init_registers_s390x_linux64v2): Likewise.
4247 (tdesc_s390x_linux64v2): Likewise.
4248 (init_registers_s390x_te_linux64): Likewise.
4249 (tdesc_s390x_te_linux64): Likewise.
4250 (init_registers_s390x_vx_linux64): Likewise.
4251 (tdesc_s390x_vx_linux64): Likewise.
4252 (init_registers_s390x_tevx_linux64): Likewise.
4253 (tdesc_s390x_tevx_linux64): Likewise.
4254 (have_hwcap_s390_vx): New static variable.
4255 (s390_arch_setup): Fill have_hwcap_s390_vx.
4256 (s390_get_thread_area): New function.
4257 (s390_ft_entry_gpr_esa): New const.
4258 (s390_ft_entry_gpr_zarch): New const.
4259 (s390_ft_entry_misc): New const.
4260 (s390_ft_entry_fr): New const.
4261 (s390_ft_entry_vr): New const.
4262 (s390_ft_main_31): New const.
4263 (s390_ft_main_64): New const.
4264 (s390_ft_exit_fr): New const.
4265 (s390_ft_exit_vr): New const.
4266 (s390_ft_exit_misc): New const.
4267 (s390_ft_exit_gpr_esa): New const.
4268 (s390_ft_exit_gpr_zarch): New const.
4269 (append_insns): New function.
4270 (s390_relocate_instruction): New function.
4271 (s390_install_fast_tracepoint_jump_pad): New function.
4272 (s390_get_min_fast_tracepoint_insn_len): New function.
4273 (s390_get_ipa_tdesc_idx): New function.
4274 (struct linux_target_ops): Wire in the above functions.
4275 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4276 * linux-s390-tdesc.h: New file.
4278 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4280 * linux-s390-low.c (s390_supports_tracepoints): New function.
4281 (struct linux_target_ops): Fill supports_tracepoints hook.
4283 2016-03-18 Yao Qi <yao.qi@linaro.org>
4285 * linux-low.c (lwp_signal_can_be_delivered): New function.
4286 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4288 2016-03-18 Yao Qi <yao.qi@linaro.org>
4290 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4291 0 if signal is enqueued. Remove 'signal' from one debugging
4292 message. Move one debugging message to some lines below.
4293 Remove code setting 'signal' to 0.
4295 2016-03-18 Yao Qi <yao.qi@linaro.org>
4297 * linux-low.c (linux_low_filter_event): Remove redundant
4298 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4300 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4302 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4303 (struct linux_target_ops): Wire in the above.
4305 2016-03-03 Yao Qi <yao.qi@linaro.org>
4307 * linux-low.c: Update comments to start_step_over.
4309 2016-03-03 Yao Qi <yao.qi@linaro.org>
4312 * linux-low.c (handle_extended_wait): Set child suspended
4313 if event_lwp->bp_reinsert isn't zero.
4315 2016-03-02 Yao Qi <yao.qi@linaro.org>
4317 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4318 enqueue_pending_signal.
4320 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4322 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4325 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4327 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4328 (s390_regmap_3264) [!__s390x__]: New global.
4329 (s390_collect_ptrace_register): Skip map entries containing -1.
4330 (s390_supply_ptrace_register): Ditto.
4331 (s390_fill_gprs_high): New function.
4332 (s390_store_gprs_high): New function.
4333 (s390_regsets): Add NT_S390_HIGH_GPRS.
4334 (s390_get_hwcap): Enable on 31-bit.
4335 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4336 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4337 Detect NT_S390_HIGH_GPRS.
4338 (s390_usrregs_info_3264): Enable on 31-bit.
4339 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4340 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4342 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4345 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4346 * configure.srv: Ditto.
4347 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4348 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4349 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4350 (init_registers_amd64_linux): Remove prototype.
4351 (tdesc_amd64_linux): Remove declaration.
4352 (get_ipa_tdesc): New function.
4353 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4354 initialize remaining tdescs.
4355 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4356 (init_registers_i386_linux): Remove prototype.
4357 (tdesc_i386_linux): Remove declaration.
4358 (get_ipa_tdesc): New function.
4359 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4360 initialize remaining tdescs.
4361 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4362 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4363 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4364 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4365 (x86_get_ipa_tdesc_idx): New function.
4366 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4367 * linux-x86-tdesc.h: New file.
4368 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4369 (target_get_ipa_tdesc_idx): New macro.
4370 * tracepoint.c (ipa_tdesc_idx): New macro.
4371 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4372 (symbol_list): Add ipa_tdesc_idx.
4373 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4374 (ipa_tdesc): Remove.
4375 (ipa_tdesc_idx): New variable.
4376 (get_context_regcache): Use get_ipa_tdesc.
4377 (gdb_collect): Ditto.
4379 * tracepoint.h (get_ipa_tdesc): New prototype.
4380 (ipa_tdesc): Remove.
4382 2016-02-24 Pedro Alves <palves@redhat.com>
4384 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4385 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4386 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4387 Factor out common code between the USE_SIGTRAP_SIGINFO and
4388 !USE_SIGTRAP_SIGINFO blocks.
4389 (linux_low_filter_event): Call save_stop_reason instead of
4390 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4392 (linux_wait_1): Update comments.
4394 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4396 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4397 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4398 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4399 ppc_insert_point, ppc_remove_point.
4401 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4403 * linux-s390-low.c (s390_supports_z_point_type): New function.
4404 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4406 2016-02-16 Yao Qi <yao.qi@linaro.org>
4408 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4409 PC. Get pc from regcache_read_pc.
4411 2016-02-12 Yao Qi <yao.qi@linaro.org>
4413 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4414 or linux_get_pc_32bit.
4415 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4417 2016-02-12 Yao Qi <yao.qi@linaro.org>
4419 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4420 arm_linux_get_next_pcs_fixup.
4422 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4424 * tracepoint.c (x_tracepoint_action_download): Change
4425 write_inferior_data_ptr to write_inferior_data_pointer.
4426 (cmd_qtstart): Likewise.
4427 (write_inferior_data_ptr): Remove.
4428 (download_agent_expr): Change write_inferior_data_ptr to
4429 write_inferior_data_pointer.
4430 (download_tracepoint_1): Likewise.
4431 (download_tracepoint): Likewise.
4432 (download_trace_state_variables): Likewise.
4434 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4435 Marcin Kościelnicki <koriakin@0x04.net>
4437 * tracepoint.c (struct tracepoint_action_ops): Remove.
4438 (struct tracepoint_action): Remove ops.
4439 (m_tracepoint_action_download, r_tracepoint_action_download)
4440 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4441 size and offset accordingly.
4442 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4443 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4444 (tracepoint_action_send, tracepoint_action_download): New functions.
4445 Helpers for trace action handlers.
4446 (add_tracepoint_action): Remove setup actions ops.
4447 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4449 2016-02-10 Yao Qi <yao.qi@linaro.org>
4451 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4453 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4455 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4457 * configure: Regenerate.
4459 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4461 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4462 void * to gdb_byte *.
4463 * linux-low.c (siginfo_fixup): Likewise.
4464 (linux_xfer_siginfo): Likewise.
4465 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4467 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4469 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4471 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4473 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4475 * linux-x86-low.c [__x86_64__]: Include
4476 "nat/amd64-linux-siginfo.h".
4477 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4478 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4479 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4480 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4481 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4482 (cpt_si_fd, si_timerid, si_overrun): Move from
4483 nat/amd64-linux-siginfo.c.
4484 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4486 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4488 * server.c (skip_to_semicolon): Remove.
4489 (process_point_options): Use strchrnul instead of
4492 2016-01-26 Yao Qi <yao.qi@linaro.org>
4494 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4495 * linux-low.c (install_software_single_step_breakpoints): Don't
4496 call regcache_read_pc.
4497 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4500 2016-01-26 Yao Qi <yao.qi@linaro.org>
4502 * linux-low.c (install_software_single_step_breakpoints): Call
4503 regcache_read_pc instead of get_pc.
4505 2016-01-26 Yao Qi <yao.qi@linaro.org>
4507 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4508 (unblock_async_io): Rename to ...
4509 (block_unblock_async_io): ... it. New function.
4510 (enable_async_io): Don't install SIGIO handler. Unblock it
4512 (disable_async_io): Don't ignore SIGIO. Block it instead.
4513 (initialize_async_io): Install SIGIO handler. Don't call
4516 2016-01-26 Yao Qi <yao.qi@linaro.org>
4518 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4519 first character is '\003', call *the_target->request_interrupt.
4521 2016-01-25 Yao Qi <yao.qi@linaro.org>
4523 * remote-utils.c (new_thread_notify): Remove.
4524 (dead_thread_notify): Likewise.
4525 * remote-utils.h (new_thread_notify): Remove declaration.
4526 (dead_thread_notify): Likewise.
4528 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4530 * gdb.trace/pending.exp: Fix expected message on continue.
4532 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4534 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4535 it works properly on big-endian machines where sizeof (CORE_ADDR)
4538 2016-01-21 Pedro Alves <palves@redhat.com>
4540 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4541 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4542 * configure: Regenerate.
4544 2016-01-21 Yao Qi <yao.qi@linaro.org>
4546 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4547 is_thumb and set it according to CPSR saved on the stack.
4548 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4549 arm_sigreturn_next_pc.
4551 2016-01-18 Yao Qi <yao.qi@linaro.org>
4553 * linux-low.c (linux_set_pc_64bit): New function.
4554 (linux_get_pc_64bit): New function.
4555 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4557 * linux-sparc-low.c (debug_threads): Remove declaration.
4558 (sparc_get_pc): Remove.
4559 (the_low_target): Use linux_get_pc_64bit instead of
4561 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4562 (the_low_target): Use linux_get_pc_64bit and
4565 2016-01-18 Yao Qi <yao.qi@linaro.org>
4567 * linux-arm-low.c (debug_threads): Remove declaration.
4568 (arm_get_pc, arm_set_pc): Remove.
4569 (the_low_target): Use linux_get_pc_32bit and
4571 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4572 (the_low_target): Use linux_get_pc_32bit and
4574 * linux-cris-low.c (debug_threads): Remove declaration.
4575 (cris_get_pc, cris_set_pc,): Remove.
4576 (the_low_target): Use linux_get_pc_32bit and
4578 * linux-crisv32-low.c (debug_threads): Remove declaration.
4579 (cris_get_pc, cris_set_pc): Remove.
4580 (the_low_target): Use linux_get_pc_32bit and
4582 * linux-low.c: Include inttypes.h.
4583 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4584 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4585 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4586 (the_low_target): Use linux_get_pc_32bit and
4588 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4589 (the_low_target): Use linux_get_pc_32bit and
4591 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4592 (the_low_target): Use linux_get_pc_32bit and
4594 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4595 (the_low_target): Use linux_get_pc_32bit and
4597 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4598 (the_low_target): Use linux_get_pc_32bit and
4601 2016-01-18 Gary Benson <gbenson@redhat.com>
4603 * configure.ac (AC_FUNC_FORK): New check.
4604 * config.in: Regenerate.
4605 * configure: Likewise.
4607 2016-01-14 Yao Qi <yao.qi@linaro.org>
4609 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4610 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4611 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4612 arm_get_next_pcs_ctor.
4614 2016-01-12 Josh Stone <jistone@redhat.com>
4615 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4617 * inferiors.h: Include "gdb_vecs.h".
4618 (struct process_info): Add syscalls_to_catch.
4619 * inferiors.c (remove_process): Free syscalls_to_catch.
4620 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4621 syscall_return stops.
4622 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4623 * server.c (handle_general_set): Handle QCatchSyscalls.
4624 (handle_query): Report support for QCatchSyscalls.
4625 * target.h (struct target_ops): Add supports_catch_syscall.
4626 (target_supports_catch_syscall): New macro.
4627 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4628 (struct lwp_info): Add syscall_state.
4629 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4630 Maintain syscall_state and syscalls_to_catch across exec.
4631 (get_syscall_trapinfo): New function, proxy to the_low_target.
4632 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4633 (linux_low_filter_event): Toggle syscall_state entry/return for
4634 syscall traps, and set it ignored for all others.
4635 (gdb_catching_syscalls_p): New function.
4636 (gdb_catch_this_syscall_p): New function.
4637 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4638 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4639 (linux_supports_catch_syscall): New function.
4640 (linux_target_ops): Install it.
4641 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4642 (the_low_target): Install it.
4644 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4646 * acinclude.m4: Include new ../warning.m4 file.
4647 * configure: Regenerated.
4648 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4650 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4652 * ax.c (is_goto_target): Mark static.
4653 * linux-low.c (register_addr): Likewise.
4654 (linux_fetch_registers, linux_store_registers): Likewise.
4655 * mem-break.c (any_persistent_commands): Fix old prototype.
4656 (add_commands_to_breakpoint): Mark static.
4657 * regcache.c (find_register_by_name): Delete unused func.
4658 * remote-utils.c (hex_or_minus_one): Mark static.
4659 * server.c (monitor_show_help): Mark static.
4660 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4661 handle_v_requests): Likewise.
4663 2016-01-12 Pedro Alves <palves@redhat.com>
4665 Remove use of the registered trademark symbol throughout.
4667 2016-01-08 Yao Qi <yao.qi@linaro.org>
4669 * remote-utils.c (getpkt): If c is '\003', call target hook
4672 2016-01-06 Yao Qi <yao.qi@linaro.org>
4674 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4675 linux-aarch32-low.c.
4676 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4677 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4678 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4679 (thumb2_breakpoint): Declare.
4680 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4681 linux-aarch32-low.h.
4682 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4683 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4684 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4686 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4688 * gdbreplay.c (gdbreplay_version): Change copyright year in
4690 * server.c (gdbserver_version): Likewise.
4692 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4694 * server.c (crc32_table): Delete.
4695 (crc32): Use libiberty's xcrc32 function.
4697 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4699 * lynx-low.c (lynx_delete_thread_callback): New function.
4700 (lynx_mourn): Properly delete our process and all of its
4701 threads. Remove call to clear_inferiors.
4703 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4705 * target.c (thread_search_callback): Add check that
4706 the thread_stopped target callback is not NULL before
4709 2015-12-21 Yao Qi <yao.qi@linaro.org>
4711 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4714 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4716 * server.c (handle_query): Call target_supports_software_single_step.
4718 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4720 * linux-low.c (single_step): New function.
4721 (linux_resume_one_lwp_throw): Call single_step.
4722 (start_step_over): Likewise.
4724 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4726 * Makefile.in (SFILES): Append arch/arm-linux.c,
4727 arch/arm-get-next-pcs.c.
4728 (arm-linux.o): New rule.
4729 (arm-get-next-pcs.o): New rule.
4730 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4732 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4733 to linux-aarch32-low.c.
4734 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4735 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4736 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4737 (thumb2_breakpoint_len): Likewise.
4738 (arm_is_thumb_mode): Make non-static.
4739 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4740 from linux-aarch32-low.c.
4741 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4742 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4743 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4744 (thumb2_breakpoint_len): Likewise.
4745 (arm_is_thumb_mode): New declaration.
4746 * linux-arm-low.c: Include arch/arm-linux.h
4747 aarch/arm-get-next-pcs.h, sys/syscall.h.
4748 (get_next_pcs_ops): New struct.
4749 (get_next_pcs_addr_bits_remove): New function.
4750 (get_next_pcs_is_thumb): New function.
4751 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4752 (arm_sigreturn_next_pc): Likewise.
4753 (get_next_pcs_syscall_next_pc): Likewise.
4754 (arm_gdbserver_get_next_pcs): Likewise.
4755 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4757 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4758 * server.h: Include gdb_vecs.h.
4760 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4762 * Makefile.in (SFILES): Append common/common-regcache.c.
4763 (OBS): Append common-regcache.o.
4764 (common-regcache.o): New rule.
4765 * regcache.c (init_register_cache): Initialize cache to
4767 (regcache_raw_read_unsigned): New function.
4768 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4769 register_status enum.
4771 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4773 * linux-aarch64-low.c (the_low_targets): Rename
4774 breakpoint_reinsert_addr to get_next_pcs.
4775 * linux-arm-low.c (the_low_targets): Likewise.
4776 * linux-bfin-low.c (the_low_targets): Likewise.
4777 * linux-cris-low.c (the_low_targets): Likewise.
4778 * linux-crisv32-low.c (the_low_targets): Likewise.
4779 * linux-low.c (can_software_single_step): Likewise.
4780 (install_software_single_step_breakpoints): New function.
4781 (start_step_over): Use install_software_single_step_breakpoints.
4782 * linux-low.h: New CORE_ADDR vector.
4783 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4785 * linux-mips-low.c (the_low_targets): Likewise.
4786 * linux-nios2-low.c (the_low_targets): Likewise.
4787 * linux-sparc-low.c (the_low_targets): Likewise.
4789 2015-12-17 Pedro Alves <palves@redhat.com>
4791 * linux-low.c (linux_kill_one_lwp): Remove references to
4793 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4795 (linux_init_signals): Delete.
4796 (initialize_low): Adjust.
4797 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4799 2015-12-16 Pedro Alves <palves@redhat.com>
4801 * configure.ac (compiler warning flags): When testing a
4802 -Wno-foo option, check whether -Wfoo works instead.
4803 * configure: Regenerate.
4805 2015-12-11 Don Breazeal <donb@codesourcery.com>
4807 * server.c (process_serial_event): Don't exit from gdbserver
4808 in remote mode if there are still active inferiors.
4810 2015-12-11 Yao Qi <yao.qi@linaro.org>
4812 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4813 arm_breakpoint_at if the process is 32-bit.
4815 2015-12-11 Yao Qi <yao.qi@linaro.org>
4817 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4820 2015-12-07 Yao Qi <yao.qi@linaro.org>
4822 * configure.srv: Append arm.o to srv_tgtobj for
4823 aarch64*-*-linux* target.
4824 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4825 from linux-arm-low.c.
4826 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4827 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4828 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4829 (thumb2_breakpoint_len): Likewise.
4830 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4831 (arm_breakpoint_kinds): Likewise.
4832 (arm_breakpoint_kind_from_pc): Likewise.
4833 (arm_sw_breakpoint_from_kind): Likewise.
4834 (arm_breakpoint_kind_from_current_state): Likewise.
4835 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4836 (arm_sw_breakpoint_from_kind): Declare.
4837 (arm_breakpoint_kind_from_current_state): Declare.
4838 (arm_breakpoint_at): Declare.
4839 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4840 arm_sw_breakpoint_from_kind if process is 32-bit.
4841 (aarch64_breakpoint_kind_from_pc): New function.
4842 (aarch64_breakpoint_kind_from_current_state): New function.
4843 (the_low_target): Initialize fields breakpoint_kind_from_pc
4844 and breakpoint_kind_from_current_state.
4845 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4846 linux-aarch32-low.c.
4847 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4848 (arm_breakpoint, arm_breakpoint_len): Likewise.
4849 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4850 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4851 (arm_is_thumb_mode): Likewise.
4852 (arm_breakpoint_at): Likewise.
4853 (arm_breakpoint_kind_from_pc): Likewise.
4854 (arm_sw_breakpoint_from_kind): Likewise.
4855 (arm_breakpoint_kind_from_current_state): Likewise.
4858 2015-08-04 Yao Qi <yao.qi@linaro.org>
4860 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4861 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4862 * server.c (extended_protocol): Remove "static".
4863 * server.h (extended_protocol): Declare it.
4865 2015-12-04 Josh Stone <jistone@redhat.com>
4867 * target.h (struct target_ops) <arch_setup>: Rename to ...
4868 (struct target_ops) <post_create_inferior>: ... this.
4869 (target_arch_setup): Rename to ...
4870 (target_post_create_inferior): ... this, calling post_create_inferior.
4871 * server.c (start_inferior): Update target_arch_setup calls to
4872 target_post_create_inferior.
4873 * linux-low.c (linux_low_ptrace_options): Forward declare.
4874 (linux_arch_setup): Update its comment for general use.
4875 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4876 (struct linux_target_ops): Use linux_post_create_inferior.
4877 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4878 to post_create_inferior.
4879 * nto-low.c (struct nto_target_ops): Likewise.
4880 * spu-low.c (struct spu_target_ops): Likewise.
4881 * win32-low.c (struct win32_target_ops): Likewise.
4883 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4885 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4887 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4889 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4890 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4891 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4892 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4893 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4894 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4895 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4896 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4897 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4898 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4899 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4900 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4902 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4904 * linux-low.c (linux_look_up_symbols): Don't call
4905 linux_supports_traceclone.
4906 * linux-low.h (thread_db_init): Remove use_events argument.
4907 * thread-db.c (thread_db_use_event): Remove global variable.
4908 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4909 (struct thread_db) <td_create_bp>: Remove field.
4910 (thread_db_create_event): Remove function.
4911 (thread_db_enable_reporting): Likewise.
4912 (find_one_thread): Don't check for thread_db_use_events.
4913 (attach_thread): Likewise.
4914 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4915 (try_thread_db_load_1): Don't check for thread_db_use_events.
4916 (thread_db_init): Remove use_events argument and thread events
4918 (remove_thread_event_breakpoints): Remove function.
4919 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4921 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4923 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4925 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4926 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4927 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4928 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4929 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4931 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4934 * linux-low.c (can_hardware_single_step): Use
4935 supports_hardware_single_step.
4936 (can_software_single_step): New function.
4937 (start_step_over): Call can_software_single_step.
4938 (linux_supports_hardware_single_step): New function.
4939 (struct target_ops) <supports_software_single_step>: Initialize.
4940 * linux-low.h (struct linux_target_ops)
4941 <supports_hardware_single_step>: Initialize.
4942 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4944 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4945 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4946 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4947 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4948 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4949 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4950 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4951 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4953 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4954 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4956 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4957 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4958 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4960 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4961 * target.h (struct target_ops): <supports_software_single_step>:
4963 (target_supports_software_single_step): New macro.
4965 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4967 * linux-low.c (linux_wait_1): Fix pc advance condition.
4968 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4969 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4971 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4973 * linux-arm-low.c (arm_is_thumb_mode): New function.
4974 (arm_breakpoint_at): Use arm_is_thumb_mode.
4975 (arm_breakpoint_kind_from_current_state): New function.
4976 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4978 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4979 (linux_breakpoint_kind_from_current_state): New function.
4980 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4981 * linux-low.h (struct linux_target_ops)
4982 <breakpoint_kind_from_current_state>: New field.
4983 * target.h (struct target_ops): Likewise.
4984 (target_breakpoint_kind_from_current_state): New macro.
4986 2015-11-30 Pedro Alves <palves@redhat.com>
4988 * linux-low.c (linux_resume): Wake up the event loop before
4991 2015-11-30 Pedro Alves <palves@redhat.com>
4993 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4995 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4997 * target.c (struct thread_search): New structure.
4998 (thread_search_callback): New function.
4999 (prev_general_thread): New global.
5000 (prepare_to_access_memory, done_accessing_memory): New functions.
5001 * target.h (prepare_to_access_memory, done_accessing_memory):
5002 Replace macros with function declarations.
5004 2015-11-30 Pedro Alves <palves@redhat.com>
5007 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5008 report TARGET_WAITKIND_NO_RESUMED.
5009 * remote-utils.c (prepare_resume_reply): Handle
5010 TARGET_WAITKIND_NO_RESUMED.
5011 * server.c (report_no_resumed): New global.
5012 (handle_query) <qSupported>: Handle "no-resumed+". Report
5013 "no-resumed+" support.
5014 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5015 return error if the client doesn't support no-resumed events.
5016 (push_stop_notification): New function.
5017 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5018 events if the client supports them.
5020 2015-11-30 Pedro Alves <palves@redhat.com>
5022 * linux-low.c (thread_still_has_status_pending_p): Don't check
5024 (lwp_resumed): New function.
5025 (status_pending_p_callback): Return early if the LWP is not
5026 supposed to be resumed.
5028 2015-11-30 Pedro Alves <palves@redhat.com>
5030 * linux-low.c (handle_extended_wait): Assert that the LWP's
5031 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5032 thread create events, leave the new child's status pending.
5033 (linux_low_filter_event): If GDB wants to hear about thread exit
5034 events, leave the LWP marked dead and don't delete it.
5035 (linux_wait_for_event_filtered): Don't check for thread exit.
5036 (filter_exit_event): New function.
5037 (linux_wait_1): Use it, when returning an exit event.
5038 (linux_resume_one_lwp_throw): Assert that the LWP's
5039 waitstatus is TARGET_WAITKIND_IGNORE.
5040 * remote-utils.c (prepare_resume_reply): Handle
5041 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5042 * server.c (report_thread_events): New global.
5043 (handle_general_set): Handle QThreadEvents.
5044 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5045 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5046 TARGET_WAITKIND_THREAD_EXITED.
5047 * server.h (report_thread_events): Declare.
5049 2015-11-30 Pedro Alves <palves@redhat.com>
5051 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5052 the thread's last_resume_kind was resume_stop.
5054 2015-11-30 Pedro Alves <palves@redhat.com>
5056 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5059 2015-11-30 Pedro Alves <palves@redhat.com>
5061 * server.c (handle_v_requests): Handle vCtrlC.
5063 2015-11-30 Pedro Alves <palves@redhat.com>
5065 * gdbthread.h (find_any_thread_of_pid): Declare.
5066 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5068 * server.c (handle_query): If current_thread is NULL, look for
5069 another thread of the selected process.
5071 2015-11-26 Daniel Colascione <dancol@dancol.org>
5072 Simon Marchi <simon.marchi@ericsson.com>
5074 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5075 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5077 * target.h (struct target_ops) <thread_name>: New field.
5078 (target_thread_name): New macro.
5080 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5082 * regcache.h (regcache_invalidate_pid): Add declaration.
5083 * regcache.c (regcache_invalidate_pid): New function, extracted
5084 from regcache_invalidate.
5085 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5086 Add trivial documentation comment.
5087 * lynx-low.c: Use regcache_invalidate_pid instead of
5088 regcache_invalidate.
5090 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5092 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5093 and Elf64_auxv_t if the target is Android.
5095 2015-11-22 Doug Evans <xdje42@gmail.com>
5097 * target.h: #include <sys/types.h>.
5099 2015-11-19 Pedro Alves <palves@redhat.com>
5101 * linux-low.c (linux_process_qsupported): Change prototype.
5103 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5105 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5106 and adjust to loop over all features.
5107 * server.c (handle_query) <qSupported>: Adjust to call
5108 target_process_qsupported once, passing it a vector of unprocessed
5110 * target.h (struct target_ops) <process_qsupported>: Change
5112 (target_process_qsupported): Adjust.
5114 2015-11-19 Pedro Alves <palves@redhat.com>
5116 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5118 * configure: Regenerate.
5120 2015-11-19 Pedro Alves <palves@redhat.com>
5122 * configure: Regenerate.
5124 2015-11-19 Yao Qi <yao.qi@linaro.org>
5126 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5129 2015-11-19 Yao Qi <yao.qi@linaro.org>
5131 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5132 (struct aarch64_operand): Move enum out.
5134 2015-11-19 Yao Qi <yao.qi@linaro.org>
5136 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5137 struct user_fpsimd_state *.
5138 (aarch64_store_fpregset): Likewise.
5140 2015-11-19 Yao Qi <yao.qi@linaro.org>
5142 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5143 struct user_pt_regs *.
5144 (aarch64_store_gregset): Likewise.
5146 2015-11-18 Pedro Alves <palves@redhat.com>
5148 * Makefile.in (all_object_files): Add $IPA_OBJS.
5150 2015-11-17 Pedro Alves <palves@redhat.com>
5152 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5153 GDB_SIGNAL_0 and gdb_signal_to_string.
5155 2015-11-17 Pedro Alves <palves@redhat.com>
5157 * win32-low.c (handle_output_debug_string): Remove parameter.
5158 (win32_kill): Remove our_status local and adjust call to
5159 handle_output_debug_string.
5160 (get_child_debug_event): Adjust call to
5161 handle_output_debug_string.
5163 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5165 * linux-mips-low.c (mips_fill_gregset): Add cast.
5166 (mips_store_gregset): Likewise.
5167 (mips_fill_fpregset): Likewise.
5168 (mips_store_fpregset): Likewise.
5170 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5172 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5175 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5177 * linux-mips-low.c (mips_linux_new_thread): Change type of
5178 watch_type to enum target_hw_bp_type.
5180 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5182 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5183 Change return type to arm_hwbp_type.
5185 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5187 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5188 (arm_store_gregset): Likewise.
5189 * linux-arm-low.c (arm_get_hwcap): Likewise.
5190 (arm_read_description): Likewise.
5192 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5194 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5196 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5198 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5199 (ppc_fill_vsxregset): Likewise.
5200 (ppc_store_vsxregset): Likewise.
5201 (ppc_fill_vrregset): Likewise.
5202 (ppc_store_vrregset): Likewise.
5203 (ppc_fill_evrregset): Likewise.
5204 (ppc_store_evrregset): Likewise.
5206 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5208 * linux-ppc-low.c (ppc_usrregs_info): Remove
5209 forward-declaration.
5210 (ppc_arch_setup): Move lower in file.
5212 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5214 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5215 (ps_pdwrite): Likewise.
5217 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5219 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5220 to after assert checks.
5222 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5224 * proc-service.c (ps_pdread): Add/adjust casts.
5225 (ps_pdwrite): Add/adjust casts.
5227 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5229 * server.c (handle_search_memory_1): Cast return value of
5232 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5234 * server.c (write_qxfer_response): Change type of data to
5237 2015-10-29 Pedro Alves <palves@redhat.com>
5239 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5241 2015-10-29 Pedro Alves <palves@redhat.com>
5243 * tracepoint.c (clear_installed_tracepoints): Add casts.
5245 2015-10-29 Pedro Alves <palves@redhat.com>
5247 * server.c (handle_v_cont, process_serial_event): Add enum
5248 gdb_signal casts to signal parsing code.
5250 2015-10-29 Pedro Alves <palves@redhat.com>
5252 * linux-low.h (NULL_REGSET): Define.
5253 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5254 * linux-arm-low.c (arm_regsets): Likewise.
5255 * linux-crisv32-low.c (cris_regsets): Likewise.
5256 * linux-m68k-low.c (m68k_regsets): Likewise.
5257 * linux-mips-low.c (mips_regsets): Likewise.
5258 * linux-nios2-low.c (nios2_regsets): Likewise.
5259 * linux-ppc-low.c (ppc_regsets): Likewise.
5260 * linux-s390-low.c (s390_regsets): Likewise.
5261 * linux-sh-low.c (sh_regsets): Likewise.
5262 * linux-sparc-low.c (sparc_regsets): Likewise.
5263 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5264 * linux-tile-low.c (tile_regsets): Likewise.
5265 * linux-x86-low.c (x86_regsets): Likewise.
5266 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5268 2015-10-29 Pedro Alves <palves@redhat.com>
5270 * linux-low.h (NULL_REGSET): Define.
5271 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5272 * linux-arm-low.c (arm_regsets): Likewise.
5273 * linux-crisv32-low.c (cris_regsets): Likewise.
5274 * linux-m68k-low.c (m68k_regsets): Likewise.
5275 * linux-mips-low.c (mips_regsets): Likewise.
5276 * linux-nios2-low.c (nios2_regsets): Likewise.
5277 * linux-ppc-low.c (ppc_regsets): Likewise.
5278 * linux-s390-low.c (s390_regsets): Likewise.
5279 * linux-sh-low.c (sh_regsets): Likewise.
5280 * linux-sparc-low.c (sparc_regsets): Likewise.
5281 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5282 * linux-tile-low.c (tile_regsets): Likewise.
5283 * linux-x86-low.c (x86_regsets): Likewise.
5284 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5286 2015-10-26 Doug Evans <dje@google.com>
5288 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5290 2015-10-26 Doug Evans <dje@google.com>
5292 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5294 2015-10-26 Doug Evans <dje@google.com>
5296 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5298 (attach_thread, find_new_threads_callback): Ditto.
5300 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5302 * mem-break.h (set_breakpoint_data): Remove.
5304 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5306 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5307 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5308 (initialize_low): Remove set_breakpoint_data call.
5309 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5310 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5311 (initialize_low): Remove set_breakpoint_data call.
5312 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5313 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5314 (initialize_low): Remove set_breakpoint_data call.
5316 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5318 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5319 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5320 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5321 * target.h (target_breakpoint_kind_from_pc): New macro.
5323 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5325 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5326 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5327 the default breakpoint kind.
5329 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5331 * linux-arm-low.c (arm_supports_z_point_type): Add software
5334 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5336 * linux-arm-low.c: Refactor breakpoint definitions.
5337 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5338 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5340 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5342 * Makefile.in: Add arm.c/o.
5343 * configure.srv: Likewise.
5344 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5345 (arm_breakpoint_kind_from_pc): New function.
5346 (arm_sw_breakpoint_from_kind): Return proper kind.
5347 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5349 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5351 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5353 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5354 (struct raw_breakpoint) <size>: Remove.
5355 (struct raw_breakpoint) <kind>: Add.
5356 (bp_size): New function.
5357 (bp_opcode): Likewise.
5358 (find_raw_breakpoint_at): Adjust for kind.
5359 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5360 (remove_memory_breakpoint): Adjust for kind call bp_size.
5361 (set_raw_breakpoint_at): Adjust for kind.
5362 (set_breakpoint): Likewise.
5363 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5364 (delete_raw_breakpoint): Adjust for kind.
5365 (delete_breakpoint): Likewise.
5366 (find_gdb_breakpoint): Likewise.
5367 (set_gdb_breakpoint_1): Likewise.
5368 (set_gdb_breakpoint): Likewise.
5369 (delete_gdb_breakpoint_1): Likewise.
5370 (delete_gdb_breakpoint): Likewise.
5371 (uninsert_raw_breakpoint): Likewise.
5372 (reinsert_raw_breakpoint): Likewise.
5373 (set_breakpoint_data): Remove.
5374 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5375 (check_mem_read): Adjust for kind call bp_size.
5376 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5377 (clone_one_breakpoint): Adjust for kind.
5378 * mem-break.h (set_gdb_breakpoint): Likewise.
5379 (delete_gdb_breakpoint): Likewise.
5380 * server.c (process_serial_event): Likewise.
5382 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5384 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5385 (struct linux_target_ops) <breakpoint>: Remove.
5386 (struct linux_target_ops) <breakpoint_len>: Remove.
5387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5389 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5390 (arm_sw_breakpoint_from_kind): New function.
5391 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5392 (struct linux_target_ops) <breakpoint>: Remove.
5393 (struct linux_target_ops) <breakpoint_len>: Remove.
5394 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5395 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5396 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5397 (struct linux_target_ops) <breakpoint>: Remove.
5398 (struct linux_target_ops) <breakpoint_len>: Remove.
5399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5401 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5402 (struct linux_target_ops) <breakpoint>: Remove.
5403 (struct linux_target_ops) <breakpoint_len>: Remove.
5404 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5406 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5407 and sw_breakpoint_from_kind to increment the pc.
5408 (linux_breakpoint_kind_from_pc): New function.
5409 (linux_sw_breakpoint_from_kind): New function.
5410 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5411 (initialize_low): Call breakpoint_kind_from_pc and
5412 sw_breakpoint_from_kind to replace breakpoint_data/len.
5413 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5415 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5416 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5417 (struct linux_target_ops) <breakpoint>: Remove.
5418 (struct linux_target_ops) <breakpoint_len>: Remove.
5419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5421 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5422 (struct linux_target_ops) <breakpoint>: Remove.
5423 (struct linux_target_ops) <breakpoint_len>: Remove.
5424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5426 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5427 (struct linux_target_ops) <breakpoint>: Remove.
5428 (struct linux_target_ops) <breakpoint_len>: Remove.
5429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5431 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5432 (struct linux_target_ops) <breakpoint>: Remove.
5433 (struct linux_target_ops) <breakpoint_len>: Remove.
5434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5436 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5437 (struct linux_target_ops) <breakpoint>: Remove.
5438 (struct linux_target_ops) <breakpoint_len>: Remove.
5439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5441 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5442 (struct linux_target_ops) <breakpoint>: Remove.
5443 (struct linux_target_ops) <breakpoint_len>: Remove.
5444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5446 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5447 (struct linux_target_ops) <breakpoint>: Remove.
5448 (struct linux_target_ops) <breakpoint_len>: Remove.
5449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5451 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5452 (struct linux_target_ops) <breakpoint>: Remove.
5453 (struct linux_target_ops) <breakpoint_len>: Remove.
5454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5456 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5457 (struct linux_target_ops) <breakpoint>: Remove.
5458 (struct linux_target_ops) <breakpoint_len>: Remove.
5459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5461 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5462 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5463 (struct linux_target_ops) <breakpoint>: Remove.
5464 (struct linux_target_ops) <breakpoint_len>: Remove.
5465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5467 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5468 (struct linux_target_ops) <breakpoint>: Remove.
5469 (struct linux_target_ops) <breakpoint_len>: Remove.
5470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5473 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5475 * linux-cris-low.c (cris_get_pc): Remove void arg.
5477 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5479 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5482 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5484 * inferiors.c (thread_pid_matches_callback): New function.
5485 (find_thread_process): New function.
5486 (remove_thread): Reset current_thread.
5487 (remove_process): Assert threads have been removed first.
5489 2015-10-15 Yao Qi <yao.qi@linaro.org>
5491 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5493 (aarch64_remove_point): Likewise.
5494 * regcache.c (regcache_register_size): New function.
5496 2015-10-12 Yao Qi <yao.qi@linaro.org>
5498 * linux-aarch64-low.c: Update all callers as emit_load_store
5499 is renamed to aarch64_emit_load_store.
5501 2015-10-12 Yao Qi <yao.qi@linaro.org>
5503 * linux-aarch64-low.c: Update all callers of function renaming
5504 from emit_insn to aarch64_emit_insn.
5506 2015-10-12 Yao Qi <yao.qi@linaro.org>
5508 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5509 arch/aarch64-insn.h.
5510 (struct aarch64_memory_operand): Likewise.
5512 (emit_insn): Move to arch/aarch64-insn.c.
5513 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5514 (emit_load_store): Move to arch/aarch64-insn.c.
5515 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5516 (can_encode_int32): Remove.
5518 2015-10-12 Yao Qi <yao.qi@linaro.org>
5520 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5521 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5522 (aarch64_relocate_instruction): Likewise.
5523 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5524 (struct aarch64_insn_visitor): Likewise.
5526 2015-10-12 Yao Qi <yao.qi@linaro.org>
5528 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5529 (struct aarch64_insn_visitor): New.
5530 (struct aarch64_insn_relocation_data): New.
5531 (aarch64_ftrace_insn_reloc_b): New function.
5532 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5533 (aarch64_ftrace_insn_reloc_cb): Likewise.
5534 (aarch64_ftrace_insn_reloc_tb): Likewise.
5535 (aarch64_ftrace_insn_reloc_adr): Likewise.
5536 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5537 (aarch64_ftrace_insn_reloc_others): Likewise.
5539 (aarch64_relocate_instruction): Use visitor.
5541 2015-10-12 Yao Qi <yao.qi@linaro.org>
5543 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5544 int. Add argument buf.
5545 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5546 aarch64_relocate_instruction.
5548 2015-10-12 Yao Qi <yao.qi@linaro.org>
5550 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5551 argument insn. Remove local variable insn. Don't call
5553 (aarch64_install_fast_tracepoint_jump_pad): Call
5556 2015-09-30 Yao Qi <yao.qi@linaro.org>
5558 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5559 (emit_load_store_pair): Likewise.
5561 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5563 * dll.c (match_dll): Add cast(s).
5564 (unloaded_dll): Likewise.
5565 * linux-low.c (second_thread_of_pid_p): Likewise.
5566 (delete_lwp_callback): Likewise.
5567 (count_events_callback): Likewise.
5568 (select_event_lwp_callback): Likewise.
5569 (linux_set_resume_request): Likewise.
5570 * server.c (accumulate_file_name_length): Likewise.
5571 (emit_dll_description): Likewise.
5572 (handle_qxfer_threads_worker): Likewise.
5573 (visit_actioned_threads): Likewise.
5574 * thread-db.c (any_thread_of): Likewise.
5575 * tracepoint.c (same_process_p): Likewise.
5576 (match_blocktype): Likewise.
5577 (build_traceframe_info_xml): Likewise.
5579 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5581 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5583 (gdb_unparse_agent_expr): Likewise.
5584 * hostio.c (require_data): Likewise.
5585 (handle_pread): Likewise.
5586 * linux-low.c (disable_regset): Likewise.
5587 (fetch_register): Likewise.
5588 (store_register): Likewise.
5589 (get_dynamic): Likewise.
5590 (linux_qxfer_libraries_svr4): Likewise.
5591 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5592 (set_fast_tracepoint_jump): Likewise.
5593 (uninsert_fast_tracepoint_jumps_at): Likewise.
5594 (reinsert_fast_tracepoint_jumps_at): Likewise.
5595 (validate_inserted_breakpoint): Likewise.
5596 (clone_agent_expr): Likewise.
5597 * regcache.c (init_register_cache): Likewise.
5598 * remote-utils.c (putpkt_binary_1): Likewise.
5599 (decode_M_packet): Likewise.
5600 (decode_X_packet): Likewise.
5601 (look_up_one_symbol): Likewise.
5602 (relocate_instruction): Likewise.
5603 (monitor_output): Likewise.
5604 * server.c (handle_search_memory): Likewise.
5605 (handle_qxfer_exec_file): Likewise.
5606 (handle_qxfer_libraries): Likewise.
5607 (handle_qxfer): Likewise.
5608 (handle_query): Likewise.
5609 (handle_v_cont): Likewise.
5610 (handle_v_run): Likewise.
5611 (captured_main): Likewise.
5612 * target.c (write_inferior_memory): Likewise.
5613 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5614 * tracepoint.c (init_trace_buffer): Likewise.
5615 (add_tracepoint_action): Likewise.
5616 (add_traceframe): Likewise.
5617 (add_traceframe_block): Likewise.
5618 (cmd_qtdpsrc): Likewise.
5619 (cmd_qtdv): Likewise.
5620 (cmd_qtstatus): Likewise.
5621 (response_source): Likewise.
5622 (response_tsv): Likewise.
5623 (cmd_qtnotes): Likewise.
5624 (gdb_collect): Likewise.
5625 (initialize_tracepoint): Likewise.
5627 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5629 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5630 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5631 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5633 (enum aarch64_condition_codes): New enum.
5634 (w0): New static global.
5637 (struct aarch64_memory_operand) <type>: New
5638 MEMORY_OPERAND_POSTINDEX type.
5639 (postindex_memory_operand): New helper function.
5640 (emit_ret): New function.
5641 (emit_load_store_pair): New function, factored out of emit_stp
5642 with support for MEMORY_OPERAND_POSTINDEX.
5643 (emit_stp): Rewrite using emit_load_store_pair.
5644 (emit_ldp): New function.
5645 (emit_load_store): Likewise.
5646 (emit_ldr): Mention post-index instruction in comment.
5647 (emit_ldrh): New function.
5648 (emit_ldrb): New function.
5649 (emit_ldrsw): Mention post-index instruction in comment.
5650 (emit_str): Likewise.
5651 (emit_subs): New function.
5652 (emit_cmp): Likewise.
5653 (emit_and): Likewise.
5654 (emit_orr): Likewise.
5655 (emit_orn): Likewise.
5656 (emit_eor): Likewise.
5657 (emit_mvn): Likewise.
5658 (emit_lslv): Likewise.
5659 (emit_lsrv): Likewise.
5660 (emit_asrv): Likewise.
5661 (emit_mul): Likewise.
5662 (emit_sbfm): Likewise.
5663 (emit_sbfx): Likewise.
5664 (emit_ubfm): Likewise.
5665 (emit_ubfx): Likewise.
5666 (emit_csinc): Likewise.
5667 (emit_cset): Likewise.
5668 (emit_nop): Likewise.
5669 (emit_ops_insns): New helper function.
5670 (emit_pop): Likewise.
5671 (emit_push): Likewise.
5672 (aarch64_emit_prologue): New function.
5673 (aarch64_emit_epilogue): Likewise.
5674 (aarch64_emit_add): Likewise.
5675 (aarch64_emit_sub): Likewise.
5676 (aarch64_emit_mul): Likewise.
5677 (aarch64_emit_lsh): Likewise.
5678 (aarch64_emit_rsh_signed): Likewise.
5679 (aarch64_emit_rsh_unsigned): Likewise.
5680 (aarch64_emit_ext): Likewise.
5681 (aarch64_emit_log_not): Likewise.
5682 (aarch64_emit_bit_and): Likewise.
5683 (aarch64_emit_bit_or): Likewise.
5684 (aarch64_emit_bit_xor): Likewise.
5685 (aarch64_emit_bit_not): Likewise.
5686 (aarch64_emit_equal): Likewise.
5687 (aarch64_emit_less_signed): Likewise.
5688 (aarch64_emit_less_unsigned): Likewise.
5689 (aarch64_emit_ref): Likewise.
5690 (aarch64_emit_if_goto): Likewise.
5691 (aarch64_emit_goto): Likewise.
5692 (aarch64_write_goto_address): Likewise.
5693 (aarch64_emit_const): Likewise.
5694 (aarch64_emit_call): Likewise.
5695 (aarch64_emit_reg): Likewise.
5696 (aarch64_emit_pop): Likewise.
5697 (aarch64_emit_stack_flush): Likewise.
5698 (aarch64_emit_zero_ext): Likewise.
5699 (aarch64_emit_swap): Likewise.
5700 (aarch64_emit_stack_adjust): Likewise.
5701 (aarch64_emit_int_call_1): Likewise.
5702 (aarch64_emit_void_call_2): Likewise.
5703 (aarch64_emit_eq_goto): Likewise.
5704 (aarch64_emit_ne_goto): Likewise.
5705 (aarch64_emit_lt_goto): Likewise.
5706 (aarch64_emit_le_goto): Likewise.
5707 (aarch64_emit_gt_goto): Likewise.
5708 (aarch64_emit_ge_got): Likewise.
5709 (aarch64_emit_ops_impl): New static global variable.
5710 (aarch64_emit_ops): New target function, return
5711 &aarch64_emit_ops_impl.
5712 (struct linux_target_ops): Install it.
5714 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5716 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5717 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5719 * linux-aarch64-ipa.c: New file.
5720 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5722 (aarch64_get_thread_area): New target method.
5723 (extract_signed_bitfield): New helper function.
5724 (aarch64_decode_ldr_literal): New function.
5725 (enum aarch64_opcodes): New enum.
5726 (struct aarch64_register): New struct.
5727 (struct aarch64_operand): New struct.
5728 (x0): New static global.
5737 (aarch64_register): New helper function.
5738 (register_operand): Likewise.
5739 (immediate_operand): Likewise.
5740 (struct aarch64_memory_operand): New struct.
5741 (offset_memory_operand): New helper function.
5742 (preindex_memory_operand): Likewise.
5743 (enum aarch64_system_control_registers): New enum.
5744 (ENCODE): New macro.
5745 (emit_insn): New helper function.
5746 (emit_b): New function.
5747 (emit_bcond): Likewise.
5748 (emit_cb): Likewise.
5749 (emit_tb): Likewise.
5750 (emit_blr): Likewise.
5751 (emit_stp): Likewise.
5752 (emit_ldp_q_offset): Likewise.
5753 (emit_stp_q_offset): Likewise.
5754 (emit_load_store): Likewise.
5755 (emit_ldr): Likewise.
5756 (emit_ldrsw): Likewise.
5757 (emit_str): Likewise.
5758 (emit_ldaxr): Likewise.
5759 (emit_stxr): Likewise.
5760 (emit_stlr): Likewise.
5761 (emit_data_processing_reg): Likewise.
5762 (emit_data_processing): Likewise.
5763 (emit_add): Likewise.
5764 (emit_sub): Likewise.
5765 (emit_mov): Likewise.
5766 (emit_movk): Likewise.
5767 (emit_mov_addr): Likewise.
5768 (emit_mrs): Likewise.
5769 (emit_msr): Likewise.
5770 (emit_sevl): Likewise.
5771 (emit_wfe): Likewise.
5772 (append_insns): Likewise.
5773 (can_encode_int32_in): New helper function.
5774 (aarch64_relocate_instruction): New function.
5775 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5776 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5777 (struct linux_target_ops): Install aarch64_get_thread_area,
5778 aarch64_install_fast_tracepoint_jump_pad and
5779 aarch64_get_min_fast_tracepoint_insn_len.
5781 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5783 * Makefile.in (aarch64-insn.o): New rule.
5784 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5786 2015-09-21 Yao Qi <yao.qi@linaro.org>
5788 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5790 2015-09-21 Yao Qi <yao.qi@linaro.org>
5792 * tracepoint.c (max_jump_pad_size): Remove.
5794 2015-09-18 Yao Qi <yao.qi@linaro.org>
5796 * linux-aarch64-low.c: Don't include sys/uio.h.
5797 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5799 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5801 * tracepoint.c (eval_result_type): Change prototype.
5802 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5804 2015-09-15 Pedro Alves <palves@redhat.com>
5806 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5807 Check whether to report exec events instead of checking whether
5808 multiprocess is enabled.
5810 2015-09-15 Pedro Alves <palves@redhat.com>
5813 * remote-utils.c (prepare_resume_reply): Merge
5814 TARGET_WAITKIND_VFORK_DONE switch case with the
5815 TARGET_WAITKIND_FORKED case.
5817 2015-09-15 Yao Qi <yao.qi@linaro.org>
5819 * server.c (handle_query): Check string comparison using
5820 "else if" instead of "if".
5822 2015-09-15 Yao Qi <yao.qi@linaro.org>
5824 * server.c (vCont_supported): New global variable.
5825 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5826 matches. Append ";vContSupported+" to own_buf.
5827 (handle_v_requests): Append ";s;S" to own_buf if target supports
5828 hardware single step or vCont_supported is false.
5829 (capture_main): Set vCont_supported to zero.
5831 2015-09-15 Yao Qi <yao.qi@linaro.org>
5833 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5835 (linux_supports_hardware_single_step): ... New function.
5836 (linux_target_ops): Update.
5837 * lynx-low.c (lynx_target_ops): Set field
5838 supports_hardware_single_step to target_can_do_hardware_single_step.
5839 * nto-low.c (nto_target_ops): Likewise.
5840 * spu-low.c (spu_target_ops): Likewise.
5841 * win32-low.c (win32_target_ops): Likewise.
5842 * target.c (target_can_do_hardware_single_step): New function.
5843 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5844 Remove. <supports_hardware_single_step>: New field.
5845 (target_supports_conditional_breakpoints): Remove.
5846 (target_supports_hardware_single_step): New macro.
5847 (target_can_do_hardware_single_step): Declare.
5848 * server.c (handle_query): Use target_supports_hardware_single_step
5849 instead of target_supports_conditional_breakpoints.
5851 2015-09-15 Yao Qi <yao.qi@linaro.org>
5853 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5855 (struct linux_target_ops the_low_target): Install
5856 aarch64_linux_siginfo_fixup.
5858 2015-09-11 Don Breazeal <donb@codesourcery.com>
5859 Luis Machado <lgustavo@codesourcery.com>
5861 * linux-low.c (linux_mourn): Static declaration.
5862 (linux_arch_setup): Move in front of
5863 handle_extended_wait.
5864 (linux_arch_setup_thread): New function.
5865 (handle_extended_wait): Handle exec events. Call
5866 linux_arch_setup_thread. Make event_lwp argument a
5867 pointer-to-a-pointer.
5868 (check_zombie_leaders): Do not check stopped threads.
5869 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5870 (linux_low_filter_event): Add lwp and thread for exec'ing
5871 non-leader thread if leader thread has been deleted.
5872 Refactor code into linux_arch_setup_thread and call it.
5873 Pass child lwp pointer by reference to handle_extended_wait.
5874 (linux_wait_for_event_filtered): Update comment.
5875 (linux_wait_1): Prevent clobbering exec event status.
5876 (linux_supports_exec_events): New function.
5877 (linux_target_ops) <supports_exec_events>: Initialize new member.
5878 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5880 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5881 * server.c (report_exec_events): New global variable.
5882 (handle_query): Handle qSupported query for exec-events feature.
5883 (captured_main): Initialize report_exec_events.
5884 * server.h (report_exec_events): Declare new global variable.
5885 * target.h (struct target_ops) <supports_exec_events>: New
5887 (target_supports_exec_events): New macro.
5888 * win32-low.c (win32_target_ops) <supports_exec_events>:
5889 Initialize new member.
5891 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5893 * linux-low.c (linux_low_enable_btrace): Remove.
5894 (linux_target_ops): Replace linux_low_enable_btrace with
5895 linux_enable_btrace.
5897 2015-09-03 Yao Qi <yao.qi@linaro.org>
5899 * linux-aarch64-low.c (aarch64_insert_point): Call
5900 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5903 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5905 * linux-low.c (check_stopped_by_breakpoint): Use
5906 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5908 2015-08-27 Pedro Alves <palves@redhat.com>
5910 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5912 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5914 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5915 the XNEW-family equivalent.
5916 (compile_bytecodes): Likewise.
5917 * dll.c (loaded_dll): Likewise.
5918 * event-loop.c (append_callback_event): Likewise.
5919 (create_file_handler): Likewise.
5920 (create_file_event): Likewise.
5921 * hostio.c (handle_open): Likewise.
5922 * inferiors.c (add_thread): Likewise.
5923 (add_process): Likewise.
5924 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5925 * linux-arm-low.c (arm_new_process): Likewise.
5926 (arm_new_thread): Likewise.
5927 * linux-low.c (add_to_pid_list): Likewise.
5928 (linux_add_process): Likewise.
5929 (handle_extended_wait): Likewise.
5930 (add_lwp): Likewise.
5931 (enqueue_one_deferred_signal): Likewise.
5932 (enqueue_pending_signal): Likewise.
5933 (linux_resume_one_lwp_throw): Likewise.
5934 (linux_resume_one_thread): Likewise.
5935 (linux_read_memory): Likewise.
5936 (linux_write_memory): Likewise.
5937 * linux-mips-low.c (mips_linux_new_process): Likewise.
5938 (mips_linux_new_thread): Likewise.
5939 (mips_add_watchpoint): Likewise.
5940 * linux-x86-low.c (initialize_low_arch): Likewise.
5941 * lynx-low.c (lynx_add_process): Likewise.
5942 * mem-break.c (set_raw_breakpoint_at): Likewise.
5943 (set_breakpoint): Likewise.
5944 (add_condition_to_breakpoint): Likewise.
5945 (add_commands_to_breakpoint): Likewise.
5946 (clone_agent_expr): Likewise.
5947 (clone_one_breakpoint): Likewise.
5948 * regcache.c (new_register_cache): Likewise.
5949 * remote-utils.c (look_up_one_symbol): Likewise.
5950 * server.c (queue_stop_reply): Likewise.
5951 (start_inferior): Likewise.
5952 (queue_stop_reply_callback): Likewise.
5953 (handle_target_event): Likewise.
5954 * spu-low.c (fetch_ppc_memory): Likewise.
5955 (store_ppc_memory): Likewise.
5956 * target.c (set_target_ops): Likewise.
5957 * thread-db.c (thread_db_load_search): Likewise.
5958 (try_thread_db_load_1): Likewise.
5959 * tracepoint.c (add_tracepoint): Likewise.
5960 (add_tracepoint_action): Likewise.
5961 (create_trace_state_variable): Likewise.
5962 (cmd_qtdpsrc): Likewise.
5963 (cmd_qtro): Likewise.
5964 (add_while_stepping_state): Likewise.
5965 * win32-low.c (child_add_thread): Likewise.
5966 (get_image_name): Likewise.
5968 2015-08-25 Yao Qi <yao.qi@linaro.org>
5970 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5972 2015-08-25 Yao Qi <yao.qi@linaro.org>
5974 * Makefile.in (aarch64-linux.o): New rule.
5975 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5977 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5978 (aarch64_init_debug_reg_state): Make it extern.
5979 (aarch64_linux_prepare_to_resume): Remove.
5981 2015-08-25 Yao Qi <yao.qi@linaro.org>
5983 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5984 lwp_arch_private_info and ptid_of_lwp.
5986 2015-08-25 Yao Qi <yao.qi@linaro.org>
5988 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5989 Find proc_info by find_process_pid. All callers updated.
5991 2015-08-25 Yao Qi <yao.qi@linaro.org>
5993 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5995 (debug_reg_change_callback): Remove.
5996 (aarch64_notify_debug_reg_change): Remove.
5998 2015-08-25 Yao Qi <yao.qi@linaro.org>
6000 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6001 Call current_lwp_ptid.
6003 2015-08-25 Yao Qi <yao.qi@linaro.org>
6005 * linux-aarch64-low.c (debug_reg_change_callback): Use
6008 2015-08-25 Yao Qi <yao.qi@linaro.org>
6010 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6012 2015-08-25 Yao Qi <yao.qi@linaro.org>
6014 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6016 2015-08-25 Yao Qi <yao.qi@linaro.org>
6018 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6021 2015-08-25 Yao Qi <yao.qi@linaro.org>
6023 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6025 (debug_reg_change_callback): Remove argument entry and add argument
6026 lwp. Remove local variable thread. Don't print thread id in the
6027 debugging output. Don't check whether pid of thread equals to pid.
6028 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6029 iterate_over_lwps instead find_inferior.
6031 2015-08-24 Pedro Alves <palves@redhat.com>
6033 * inferiors.c (get_first_process): New function.
6034 * inferiors.h (get_first_process): New declaration.
6035 * remote-utils.c (read_ptid): Default to the first process in the
6036 list, instead of to the current thread's process.
6038 2015-08-24 Pedro Alves <palves@redhat.com>
6040 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6041 * event-loop.c: Likewise.
6042 * remote-utils.c: Likewise.
6043 * tracepoint.c: Likewise.
6045 2015-08-24 Pedro Alves <palves@redhat.com>
6047 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6050 2015-08-21 Pedro Alves <palves@redhat.com>
6052 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6053 instead of literal 1.
6055 2015-08-21 Pedro Alves <palves@redhat.com>
6057 * tdesc.c (default_description): Explicitly zero-initialize.
6059 2015-08-21 Pedro Alves <palves@redhat.com>
6062 * inferiors.c (remove_thread): Discard any pending stop reply for
6064 * server.c (remove_all_on_match_pid): Rename to ...
6065 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6067 (discard_queued_stop_replies): Change parameter to a ptid. Now
6069 (handle_v_kill, kill_inferior_callback, captured_main)
6070 (process_serial_event): Adjust.
6071 * server.h (discard_queued_stop_replies): Declare.
6073 2015-08-21 Pedro Alves <palves@redhat.com>
6075 * linux-low.c (wait_for_sigstop): Always switch to no thread
6076 selected if the previously current thread dies.
6077 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6078 process instead of the current thread's.
6079 * remote-utils.c (input_interrupt): Don't check if there's no
6081 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6082 current thread to the general thread fails, error out.
6083 (handle_qxfer_auxv, handle_qxfer_libraries)
6084 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6085 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6086 (handle_query): Check if there's a thread selected instead of
6087 checking whether there's any thread in the thread list.
6088 (handle_qxfer_threads, handle_qxfer_btrace)
6089 (handle_qxfer_btrace_conf): Don't error out early if there's no
6090 thread in the thread list.
6091 (handle_v_cont, myresume): Don't set the current thread to the
6093 (process_serial_event) <Hg handling>: Also set thread_id if the
6094 previous general thread is still alive.
6095 (process_serial_event) <g/G handling>: If setting the current
6096 thread to the general thread fails, error out.
6097 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6098 thread's lwp instead of the current thread's.
6099 * target.c (set_desired_thread): If the desired thread was not
6100 found, leave the current thread pointing to NULL. Return an int
6101 (boolean) indicating success.
6102 * target.h (set_desired_thread): Change return type to int.
6104 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6106 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6107 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6109 (ps_get_thread_area): New function.
6111 2015-08-19 Gary Benson <gbenson@redhat.com>
6113 * hostio.c (handle_pread): Do not attempt to read more data
6114 than hostio_reply_with_data can fit in a packet.
6116 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6118 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6120 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6122 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6124 2015-08-06 Pedro Alves <palves@redhat.com>
6126 * tracepoint.c (expr_eval_result): Now an int.
6128 2015-08-06 Pedro Alves <palves@redhat.com>
6130 * gdbthread.h (struct regcache): Forward declare.
6131 (struct thread_info) <regcache_data>: Now a struct regcache
6133 * inferiors.c (inferior_regcache_data)
6134 (set_inferior_regcache_data): Now work with struct regcache
6136 * inferiors.h (struct regcache): Forward declare.
6137 (inferior_regcache_data, set_inferior_regcache_data): Now work
6138 with struct regcache pointers.
6139 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6140 (free_register_cache_thread): Remove struct regcache pointer
6143 2015-08-06 Pedro Alves <palves@redhat.com>
6145 * server.c (captured_main): On error, print the exception message
6146 to stderr, and if run_once is set, throw a quit.
6148 2015-08-06 Pedro Alves <palves@redhat.com>
6150 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6153 2015-08-06 Pedro Alves <palves@redhat.com>
6155 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6156 reading beyond the passed in buffer length.
6158 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6160 * tracepoint.c (symbol_list) <required>: Remove.
6162 2015-08-06 Pedro Alves <palves@redhat.com>
6164 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6165 count if stopping and suspending threads.
6166 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6167 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6168 (linux_detach): Complete an ongoing step-over.
6169 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6171 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6172 (linux_wait_1): If passing a signal to the inferior after
6173 finishing a step-over, unsuspend and re-resume all lwps. If we
6174 see a single-step event but the thread should be continuing, don't
6175 pass the trap to gdb.
6176 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6177 internal_error instead of gdb_assert.
6178 (enqueue_pending_signal): New function.
6179 (check_ptrace_stopped_lwp_gone): Add debug output.
6180 (start_step_over): Use internal_error instead of gdb_assert.
6181 (complete_ongoing_step_over): New function.
6182 (linux_resume_one_thread): Don't resume a suspended thread.
6183 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6186 2015-08-06 Pedro Alves <palves@redhat.com>
6188 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6189 (linux_thread_alive): Use lwp_is_marked_dead.
6190 (extended_event_reported): Delete.
6191 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6192 instead of extended_event_reported.
6193 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6195 (lwp_is_marked_dead): New function.
6196 (lwp_running): Use lwp_is_marked_dead.
6197 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6200 2015-08-06 Pedro Alves <palves@redhat.com>
6202 * linux-low.c (linux_wait_1): Move fork event output out of the
6203 !report_to_gdb check. Pass event_child->waitstatus to
6204 target_waitstatus_to_string instead of ourstatus.
6206 2015-08-04 Yao Qi <yao.qi@linaro.org>
6208 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6209 if current_thread is 32 bit.
6211 2015-08-04 Yao Qi <yao.qi@linaro.org>
6213 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6214 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6215 * server.c (extended_protocol): Remove "static".
6216 * server.h (extended_protocol): Declare it.
6218 2015-08-04 Yao Qi <yao.qi@linaro.org>
6220 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6221 both aarch64 and aarch32.
6222 (aarch64_set_pc): Likewise.
6224 2015-08-04 Yao Qi <yao.qi@linaro.org>
6226 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6227 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6228 arm-with-neon.xml to srv_xmlfiles.
6229 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6230 (is_64bit_tdesc): New function.
6231 (aarch64_linux_read_description): New function.
6232 (aarch64_arch_setup): Call aarch64_linux_read_description.
6233 (regs_info): Rename to regs_info_aarch64.
6234 (aarch64_regs_info): Return right regs_info.
6235 (initialize_low_arch): Call initialize_low_arch_aarch32.
6237 2015-08-04 Yao Qi <yao.qi@linaro.org>
6239 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6240 * linux-aarch32-low.c: New file.
6241 * linux-aarch32-low.h: New file.
6242 * linux-arm-low.c (arm_fill_gregset): Move it to
6243 linux-aarch32-low.c.
6244 (arm_store_gregset): Likewise.
6245 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6246 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6247 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6248 (regs_info): Rename to regs_info_arm.
6249 (arm_regs_info): Return regs_info_aarch32 if
6250 have_ptrace_getregset is 1 and target description is
6251 arm_with_neon or arm_with_vfpv3.
6252 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6253 Call initialize_low_arch_aarch32 instead.
6255 2015-08-04 Yao Qi <yao.qi@linaro.org>
6257 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6258 * linux-low.c: ... here.
6259 * linux-low.h (have_ptrace_getregset): Declare it.
6261 2015-08-04 Pedro Alves <palves@redhat.com>
6263 * thread-db.c (struct thread_db): Use new typedefs.
6264 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6266 (disable_thread_event_reporting): Cast result of dlsym to
6267 destination function pointer type.
6268 (thread_db_mourn): Use td_ta_delete_ftype.
6270 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6272 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6274 (CDX_BREAKPOINT): Define for R2.
6275 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6276 (the_low_target): Add comments.
6278 2015-07-30 Yao Qi <yao.qi@linaro.org>
6280 * linux-arm-low.c (arm_hwcap): Remove it.
6281 (arm_read_description): New local variable arm_hwcap. Don't
6282 set arm_hwcap to zero.
6284 2015-07-30 Yao Qi <yao.qi@linaro.org>
6286 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6287 Use regcache->tdesc instead.
6288 (arm_store_wmmxregset): Likewise.
6289 (arm_fill_vfpregset): Likewise.
6290 (arm_store_vfpregset): Likewise.
6292 2015-07-30 Yao Qi <yao.qi@linaro.org>
6294 * linux-arm-low.c: Include arch/arm.h.
6295 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6296 (arm_store_gregset): Likewise.
6298 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6300 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6301 ptrace's 4th parameter.
6303 2015-07-27 Yao Qi <yao.qi@linaro.org>
6305 * configure.srv (case aarch64*-*-linux*): Don't set
6308 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6310 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6312 * linux-arm-low.c: Likewise.
6313 * linux-cris-low.c: Likewise.
6314 * linux-crisv32-low.c: Likewise.
6315 * linux-low.c: Likewise.
6316 * linux-m68k-low.c: Likewise.
6317 * linux-mips-low.c: Likewise.
6318 * linux-nios2-low.c: Likewise.
6319 * linux-s390-low.c: Likewise.
6320 * linux-sparc-low.c: Likewise.
6321 * linux-tic6x-low.c: Likewise.
6322 * linux-tile-low.c: Likewise.
6323 * linux-x86-low.c: Likewise.
6325 2015-07-24 Pedro Alves <palves@redhat.com>
6327 * config.in: Regenerate.
6328 * configure: Regenerate.
6330 2015-07-24 Pedro Alves <palves@redhat.com>
6332 * acinclude.m4: Include ../ptrace.m4.
6333 * configure.ac: Call GDB_AC_PTRACE.
6334 * config.in, configure: Regenerate.
6336 2015-07-24 Yao Qi <yao.qi@linaro.org>
6338 * linux-low.c (linux_create_inferior): Remove setting to
6339 proc->priv->new_inferior.
6340 (linux_attach): Likewise.
6341 (linux_low_filter_event): Likewise.
6342 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6344 2015-07-24 Yao Qi <yao.qi@linaro.org>
6346 * linux-low.c (linux_arch_setup): New function.
6347 (linux_low_filter_event): If proc->tdesc is NULL and
6348 proc->attached is true, call the_low_target.arch_setup.
6349 Otherwise, keep status pending, and return.
6350 (linux_resume_one_lwp_throw): Don't call get_pc if
6351 thread->while_stepping isn't NULL. Don't call
6352 get_thread_regcache if proc->tdesc is NULL.
6353 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6354 (linux_target_ops): Install arch_setup.
6355 * server.c (start_inferior): Call the_target->arch_setup.
6356 * target.h (struct target_ops) <arch_setup>: New field.
6357 (target_arch_setup): New marco.
6358 * lynx-low.c (lynx_target_ops): Update.
6359 * nto-low.c (nto_target_ops): Update.
6360 * spu-low.c (spu_target_ops): Update.
6361 * win32-low.c (win32_target_ops): Update.
6363 2015-07-24 Yao Qi <yao.qi@linaro.org>
6365 * linux-low.c (linux_add_process): Don't set
6366 proc->priv->new_inferior.
6367 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6368 (linux_attach): Likewise.
6370 2015-07-24 Yao Qi <yao.qi@linaro.org>
6372 * server.c (start_inferior): Code refactor.
6374 2015-07-24 Yao Qi <yao.qi@linaro.org>
6376 * server.c (process_serial_event): Set general_thread.
6378 2015-07-21 Yao Qi <yao.qi@linaro.org>
6380 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6381 aarch64_linux_get_debug_reg_capacity.
6383 2015-07-17 Yao Qi <yao.qi@linaro.org>
6385 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6386 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6387 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6388 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6389 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6390 (AARCH64_HWP_ALIGNMENT): Likewise.
6391 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6392 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6393 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6394 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6395 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6396 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6397 (struct aarch64_debug_reg_state): Likewise.
6398 (struct arch_lwp_info): Likewise.
6399 (aarch64_align_watchpoint): Likewise.
6400 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6401 (aarch64_watchpoint_length): Likewise.
6402 (aarch64_point_encode_ctrl_reg): Likewise
6403 (aarch64_point_is_aligned): Likewise.
6404 (aarch64_align_watchpoint): Likewise.
6405 (aarch64_linux_set_debug_regs):
6406 (aarch64_dr_state_insert_one_point): Likewise.
6407 (aarch64_dr_state_remove_one_point): Likewise.
6408 (aarch64_handle_breakpoint): Likewise.
6409 (aarch64_handle_aligned_watchpoint): Likewise.
6410 (aarch64_handle_unaligned_watchpoint): Likewise.
6411 (aarch64_handle_watchpoint): Likewise.
6413 2015-07-17 Yao Qi <yao.qi@linaro.org>
6415 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6416 and don't aarch64_get_debug_reg_state. All callers update.
6417 (aarch64_handle_aligned_watchpoint): Likewise.
6418 (aarch64_handle_unaligned_watchpoint): Likewise.
6419 (aarch64_handle_watchpoint): Likewise.
6420 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6421 (aarch64_remove_point): Likewise.
6423 2015-07-17 Yao Qi <yao.qi@linaro.org>
6425 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6427 (aarch64_handle_unaligned_watchpoint): Likewise.
6429 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6431 Revert the previous 3 commits:
6432 Move gdb_regex* to common/
6433 Move linux_find_memory_regions_full & co.
6434 gdbserver build-id attribute generator
6436 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6437 Jan Kratochvil <jan.kratochvil@redhat.com>
6439 gdbserver build-id attribute generator.
6440 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6441 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6442 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6444 (get_dynamic): Use find_pdhr to traverse program headers.
6445 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6446 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6447 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6448 (get_hex_build_id): New.
6449 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6450 to reply XML document.
6452 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6453 Jan Kratochvil <jan.kratochvil@redhat.com>
6455 * target.c: Include target/target-utils.h and fcntl.h.
6456 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6457 (target_fileio_read_stralloc): New functions.
6459 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6461 * Makefile.in (OBS): Add gdb_regex.o.
6463 * config.in: Rebuilt.
6464 * configure: Rebuilt.
6466 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6467 Jan Kratochvil <jan.kratochvil@redhat.com>
6469 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6470 * Makefile.in (OBS): Add target-utils.o.
6471 (linux-maps.o, target-utils.o): New.
6472 * configure.srv (srv_linux_obj): Add linux-maps.o.
6474 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6476 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6478 (the_low_target): Install it.
6480 2015-07-14 Pedro Alves <palves@redhat.com>
6482 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6483 Instead, ignore ECHILD, and throw an error for other errnos.
6485 2015-07-10 Pedro Alves <palves@redhat.com>
6487 * event-loop.c (struct callback_event) <data>: Change type to
6488 gdb_client_data instance instead of gdb_client_data pointer.
6489 (append_callback_event): Adjust.
6491 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6493 * linux-aarch64-low.c: Add comments for each linux_target_ops
6494 method. Remove comments already covered in target_ops and
6495 linux_target_ops definitions.
6496 (the_low_target): Add comments for each unimplemented method.
6498 2015-07-09 Yao Qi <yao.qi@linaro.org>
6500 * linux-aarch64-low.c (aarch64_regmap): Remove.
6501 (aarch64_usrregs_info): Remove.
6502 (regs_info): Set field usrregs to NULL.
6504 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6506 * linux-low.c: Include "rsp-low.h"
6507 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6508 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6509 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6510 (handle_btrace_enable_pt): New.
6511 (handle_btrace_general_set): Support "pt".
6512 (handle_btrace_conf_general_set): Support "pt:size".
6514 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6516 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6519 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6521 * linux-aarch64-low.c: Remove comment about endianness.
6522 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6523 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6526 2015-06-24 Gary Benson <gbenson@redhat.com>
6528 * linux-i386-ipa.c (stdint.h): Do not include.
6529 * lynx-i386-low.c (stdint.h): Likewise.
6530 * lynx-ppc-low.c (stdint.h): Likewise.
6531 * mem-break.c (stdint.h): Likewise.
6532 * thread-db.c (stdint.h): Likewise.
6533 * tracepoint.c (stdint.h): Likewise.
6534 * win32-low.c (stdint.h): Likewise.
6536 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6538 * server.c (write_qxfer_response): Update call to
6539 remote_escape_output.
6541 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6542 Jan Kratochvil <jan.kratochvil@redhat.com>
6544 Merge multiple hex conversions.
6545 * gdbreplay.c (tohex): Rename to 'fromhex'.
6546 (logchar): Use fromhex.
6548 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6550 * server.c (handle_qxfer_libraries): Set `version' attribute for
6553 2015-06-10 Gary Benson <gbenson@redhat.com>
6555 * target.h (struct target_ops) <multifs_open>: New field.
6556 <multifs_unlink>: Likewise.
6557 <multifs_readlink>: Likewise.
6558 * linux-low.c (nat/linux-namespaces.h): New include.
6559 (linux_target_ops): Initialize the_target->multifs_open,
6560 the_target->multifs_unlink and the_target->multifs_readlink.
6561 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6562 * hostio.c (hostio_fs_pid): New static variable.
6563 (hostio_handle_new_gdb_connection): New function.
6564 (handle_setfs): Likewise.
6565 (handle_open): Use the_target->multifs_open as appropriate.
6566 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6567 (handle_readlink): Use the_target->multifs_readlink as
6569 (handle_vFile): Handle vFile:setfs packets.
6570 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6571 after target_handle_new_gdb_connection.
6573 2015-06-10 Gary Benson <gbenson@redhat.com>
6575 * configure.ac (AC_CHECK_FUNCS): Add setns.
6576 * config.in: Regenerate.
6577 * configure: Likewise.
6578 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6579 (linux-namespaces.o): New rule.
6580 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6582 2015-06-09 Gary Benson <gbenson@redhat.com>
6584 * hostio.c (handle_open): Process mode argument with
6585 fileio_to_host_mode.
6587 2015-06-01 Yao Qi <yao.qi@linaro.org>
6589 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6590 * linux-x86-low.c: Likewise.
6592 2015-05-28 Don Breazeal <donb@codesourcery.com>
6594 * linux-low.c (handle_extended_wait): Initialize
6595 thread_info.last_resume_kind for new fork children.
6597 2015-05-15 Pedro Alves <palves@redhat.com>
6599 * target.h (target_handle_new_gdb_connection): Rewrite using if
6600 wrapped in do/while.
6602 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6604 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6605 * configure, config.in: Regenerate.
6606 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6609 2015-05-12 Don Breazeal <donb@codesourcery.com>
6611 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6612 PTRACE_EVENT_VFORK_DONE.
6613 (linux_low_ptrace_options, extended_event_reported): Add vfork
6615 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6616 and "vforkdone" for RSP 'T' Stop Reply Packet.
6617 * server.h (report_vfork_events): Declare
6620 2015-05-12 Don Breazeal <donb@codesourcery.com>
6622 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6623 (the_low_target) <new_fork>: Initialize new member.
6624 * linux-arm-low.c (arm_new_fork): New function.
6625 (the_low_target) <new_fork>: Initialize new member.
6626 * linux-low.c (handle_extended_wait): Call new target function
6628 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6629 * linux-mips-low.c (mips_add_watchpoint): New function
6630 extracted from mips_insert_point.
6631 (the_low_target) <new_fork>: Initialize new member.
6632 (mips_linux_new_fork): New function.
6633 (mips_insert_point): Call mips_add_watchpoint.
6634 * linux-x86-low.c (x86_linux_new_fork): New function.
6635 (the_low_target) <new_fork>: Initialize new member.
6637 2015-05-12 Don Breazeal <donb@codesourcery.com>
6639 * linux-low.c (handle_extended_wait): Implement return value,
6640 rename argument 'event_child' to 'event_lwp', handle
6641 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6642 (linux_low_ptrace_options): New function.
6643 (linux_low_filter_event): Call linux_low_ptrace_options,
6644 use different argument fo linux_enable_event_reporting,
6645 use return value from handle_extended_wait.
6646 (extended_event_reported): New function.
6647 (linux_wait_1): Call extended_event_reported and set
6648 status to report fork events.
6649 (linux_write_memory): Add pid to debug message.
6650 (reset_lwp_ptrace_options_callback): New function.
6651 (linux_handle_new_gdb_connection): New function.
6652 (linux_target_ops): Initialize new structure member.
6653 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6654 * lynx-low.c: Initialize new structure member.
6655 * remote-utils.c (prepare_resume_reply): Implement stop reason
6656 "fork" for "T" stop message.
6657 * server.c (handle_query): Call handle_new_gdb_connection.
6658 * server.h (report_fork_events): Declare global flag.
6659 * target.h (struct target_ops) <handle_new_gdb_connection>:
6661 (target_handle_new_gdb_connection): New macro.
6662 * win32-low.c: Initialize new structure member.
6664 2015-05-12 Don Breazeal <donb@codesourcery.com>
6666 * mem-break.c (APPEND_TO_LIST): Define macro.
6667 (clone_agent_expr): New function.
6668 (clone_one_breakpoint): New function.
6669 (clone_all_breakpoints): New function.
6670 * mem-break.h: Declare new functions.
6672 2015-05-12 Don Breazeal <donb@codesourcery.com>
6674 * linux-low.c (linux_supports_fork_events): New function.
6675 (linux_supports_vfork_events): New function.
6676 (linux_target_ops): Initialize new structure members.
6677 (initialize_low): Call linux_check_ptrace_features.
6678 * lynx-low.c (lynx_target_ops): Initialize new structure
6680 * server.c (report_fork_events, report_vfork_events):
6682 (handle_query): Add new features to qSupported packet and
6684 (captured_main): Initialize new global variables.
6685 * target.h (struct target_ops) <supports_fork_events>:
6687 <supports_vfork_events>: New member.
6688 (target_supports_fork_events): New macro.
6689 (target_supports_vfork_events): New macro.
6690 * win32-low.c (win32_target_ops): Initialize new structure
6693 2015-05-12 Gary Benson <gbenson@redhat.com>
6695 * server.c (handle_qxfer_exec_file): Use current process
6698 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6700 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6701 Remove HAVE_PTRACE_GETREGS conditionals.
6702 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6703 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6705 2015-05-08 Yao Qi <yao.qi@linaro.org>
6707 * linux-low.c (linux_supports_conditional_breakpoints): New
6709 (linux_target_ops): Install new target method.
6710 * lynx-low.c (lynx_target_ops): Install NULL hook for
6711 supports_conditional_breakpoints.
6712 * nto-low.c (nto_target_ops): Likewise.
6713 * spu-low.c (spu_target_ops): Likewise.
6714 * win32-low.c (win32_target_ops): Likewise.
6715 * server.c (handle_query): Check
6716 target_supports_conditional_breakpoints.
6717 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6719 (target_supports_conditional_breakpoints): New macro.
6721 2015-05-06 Pedro Alves <palves@redhat.com>
6724 * server.c (start_inferior): If the process exits, mourn it.
6726 2015-04-21 Gary Benson <gbenson@redhat.com>
6728 * hostio.c (fileio_open_flags_to_host): Factored out to
6729 fileio_to_host_openflags in common/fileio.c. Single use
6732 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6734 * linux-xtensa-low.c (xtensa_fill_gregset)
6735 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6738 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6740 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6741 (regs_info): Replace usrregs pointer with NULL.
6743 2015-04-17 Gary Benson <gbenson@redhat.com>
6745 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6746 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6747 * server.c (handle_qxfer_exec_file): New function.
6748 (qxfer_packets): Add exec-file entry.
6749 (handle_query): Report qXfer:exec-file:read as supported packet.
6751 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6753 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6755 2015-04-09 Gary Benson <gbenson@redhat.com>
6757 * hostio-errno.c (errno_to_fileio_error): Remove function.
6758 Update caller to use remote_fileio_to_fio_error.
6760 2015-04-09 Yao Qi <yao.qi@linaro.org>
6762 * linux-low.c (linux_insert_point): Call
6763 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6764 (linux_remove_point): Call remove_memory_breakpoint if type is
6766 * linux-x86-low.c (x86_insert_point): Don't call
6767 insert_memory_breakpoint.
6768 (x86_remove_point): Don't call remove_memory_breakpoint.
6770 2015-04-01 Pedro Alves <palves@redhat.com>
6771 Cleber Rosa <crosa@redhat.com>
6773 * server.c (gdbserver_usage): Reorganize and extend the usage
6776 2015-03-24 Pedro Alves <palves@redhat.com>
6778 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6779 output. Also dump TRAP_TRACE.
6780 (linux_low_filter_event): In debug output, distinguish a
6781 resume_stop SIGSTOP from a delayed SIGSTOP.
6783 2015-03-24 Gary Benson <gbenson@redhat.com>
6785 * linux-x86-low.c (x86_linux_new_thread): Moved to
6787 (x86_linux_prepare_to_resume): Likewise.
6789 2015-03-24 Gary Benson <gbenson@redhat.com>
6791 * Makefile.in (x86-linux-dregs.o): New rule.
6792 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6793 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6794 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6795 (x86_linux_dr_get): Likewise.
6796 (x86_linux_dr_set): Likewise.
6797 (update_debug_registers_callback): Likewise.
6798 (x86_linux_dr_set_addr): Likewise.
6799 (x86_linux_dr_get_addr): Likewise.
6800 (x86_linux_dr_set_control): Likewise.
6801 (x86_linux_dr_get_control): Likewise.
6802 (x86_linux_dr_get_status): Likewise.
6803 (x86_linux_update_debug_registers): Likewise.
6805 2015-03-24 Gary Benson <gbenson@redhat.com>
6807 * linux-x86-low.c (x86_linux_update_debug_registers):
6808 New function, factored out from...
6809 (x86_linux_prepare_to_resume): ...this.
6811 2015-03-24 Gary Benson <gbenson@redhat.com>
6813 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6814 (x86_linux_dr_set): Likewise.
6815 (update_debug_registers_callback): Likewise.
6816 (x86_linux_dr_set_addr): Likewise.
6817 (x86_linux_dr_get_addr): Likewise.
6818 (x86_linux_dr_set_control): Likewise.
6819 (x86_linux_dr_get_control): Likewise.
6820 (x86_linux_dr_get_status): Likewise.
6821 (x86_linux_prepare_to_resume): Likewise.
6823 2015-03-24 Gary Benson <gbenson@redhat.com>
6825 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6826 Use perror_with_name. Pass string through gettext.
6827 (x86_linux_dr_set): Likewise.
6829 2015-03-24 Gary Benson <gbenson@redhat.com>
6831 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6832 (x86_linux_dr_set_addr): ...this.
6833 (x86_dr_low_get_addr): Rename to...
6834 (x86_linux_dr_get_addr): ...this.
6835 (x86_dr_low_set_control): Rename to...
6836 (x86_linux_dr_set_control): ...this.
6837 (x86_dr_low_get_control): Rename to...
6838 (x86_linux_dr_get_control): ...this.
6839 (x86_dr_low_get_status): Rename to...
6840 (x86_linux_dr_get_status): ...this.
6841 (x86_dr_low): Update with new function names.
6843 2015-03-24 Gary Benson <gbenson@redhat.com>
6845 * Makefile.in (x86-linux.o): New rule.
6846 * configure.srv: Add x86-linux.o to relevant targets.
6847 * linux-low.c (lwp_set_arch_private_info): New function.
6848 (lwp_arch_private_info): Likewise.
6849 * linux-x86-low.c: Include nat/x86-linux.h.
6850 (arch_lwp_info): Removed structure.
6851 (update_debug_registers_callback):
6852 Use lwp_set_debug_registers_changed.
6853 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6854 and lwp_set_debug_registers_changed.
6855 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6857 2015-03-24 Gary Benson <gbenson@redhat.com>
6859 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6860 * linux-arm-low.c (arm_new_thread): Likewise.
6861 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6862 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6863 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6864 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6866 2015-03-24 Gary Benson <gbenson@redhat.com>
6868 * linux-low.c (ptid_of_lwp): New function.
6869 (lwp_is_stopped): Likewise.
6870 (lwp_stop_reason): Likewise.
6871 * linux-x86-low.c (update_debug_registers_callback):
6873 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6876 2015-03-24 Gary Benson <gbenson@redhat.com>
6878 * linux-low.h (linux_stop_lwp): Remove declaration.
6880 2015-03-24 Gary Benson <gbenson@redhat.com>
6882 * linux-low.h: Include nat/linux-nat.h.
6883 * linux-low.c (iterate_over_lwps_args): New structure.
6884 (iterate_over_lwps_filter): New function.
6885 (iterate_over_lwps): Likewise.
6886 * linux-x86-low.c (update_debug_registers_callback):
6887 Update signature to what iterate_over_lwps expects.
6888 Remove PID check that iterate_over_lwps now performs.
6889 (x86_dr_low_set_addr): Use iterate_over_lwps.
6890 (x86_dr_low_set_control): Likewise.
6892 2015-03-24 Gary Benson <gbenson@redhat.com>
6894 * linux-x86-low.c (x86_debug_reg_state): New function.
6895 (x86_linux_prepare_to_resume): Use the above.
6897 2015-03-24 Gary Benson <gbenson@redhat.com>
6899 * linux-low.c (current_lwp_ptid): New function.
6900 * linux-x86-low.c: Include nat/linux-nat.h.
6901 (x86_dr_low_get_addr): Use current_lwp_ptid.
6902 (x86_dr_low_get_control): Likewise.
6903 (x86_dr_low_get_status): Likewise.
6905 2015-03-20 Pedro Alves <palves@redhat.com>
6907 * tracepoint.c (cmd_qtstatus): Make "str" const.
6909 2015-03-20 Pedro Alves <palves@redhat.com>
6911 * server.c (handle_general_set): Make "req_str" const.
6913 2015-03-19 Pedro Alves <palves@redhat.com>
6915 * linux-low.c (linux_resume_one_lwp): Rename to ...
6916 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6917 instead call perror_with_name.
6918 (check_ptrace_stopped_lwp_gone): New function.
6919 (linux_resume_one_lwp): Reimplement as wrapper around
6920 linux_resume_one_lwp_throw that swallows errors if the LWP is
6923 2015-03-19 Pedro Alves <palves@redhat.com>
6925 * linux-low.c (count_events_callback, select_event_lwp_callback):
6926 No longer check whether the thread has resume_stop as last resume
6929 2015-03-19 Pedro Alves <palves@redhat.com>
6931 * linux-low.c (count_events_callback, select_event_lwp_callback):
6932 Use the lwp's status_pending_p field, not the thread's.
6934 2015-03-19 Pedro Alves <palves@redhat.com>
6936 * linux-low.c (select_event_lwp_callback): Update comments to
6937 no longer mention SIGTRAP.
6939 2015-03-18 Gary Benson <gbenson@redhat.com>
6941 * server.c (handle_query): Do not report vFile:fstat as supported.
6943 2015-03-11 Gary Benson <gbenson@redhat.com>
6945 * hostio.c (sys/types.h): New include.
6946 (sys/stat.h): Likewise.
6947 (common-remote-fileio.h): Likewise.
6948 (handle_fstat): New function.
6949 (handle_vFile): Handle vFile:fstat packets.
6951 2015-03-11 Gary Benson <gbenson@redhat.com>
6953 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6954 struct stat.st_blocks and struct stat.st_blksize.
6955 * configure: Regenerate.
6956 * config.in: Likewise.
6957 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6958 (OBS): Add common-remote-fileio.o.
6959 (common-remote-fileio.o): New rule.
6961 2015-03-09 Pedro Alves <palves@redhat.com>
6963 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6964 'struct sockaddr' pointer in 'accept' call.
6966 2015-03-09 Pedro Alves <palves@redhat.com>
6969 2015-03-07 Pedro Alves <palves@redhat.com>
6970 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6971 or <winsock2.h> here. Instead include "gdb_socket.h".
6972 (remote_open): Use union gdb_sockaddr_u.
6973 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6974 or <winsock2.h> here. Instead include "gdb_socket.h".
6975 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6976 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6978 (init_named_socket, gdb_agent_helper_thread): Use union
6981 2015-03-07 Pedro Alves <palves@redhat.com>
6983 * configure.ac (build_warnings): Move
6984 -Wdeclaration-after-statement to the C-specific set.
6985 * configure: Regenerate.
6987 2015-03-07 Pedro Alves <palves@redhat.com>
6989 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6990 or <winsock2.h> here. Instead include "gdb_socket.h".
6991 (remote_open): Use union gdb_sockaddr_u.
6992 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6993 or <winsock2.h> here. Instead include "gdb_socket.h".
6994 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6995 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6997 (init_named_socket, gdb_agent_helper_thread): Use union
7000 2015-03-07 Pedro Alves <palves@redhat.com>
7002 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7005 2015-03-06 Yao Qi <yao.qi@linaro.org>
7007 * linux-aarch64-low.c (aarch64_insert_point): Use
7008 show_debug_regs as a boolean.
7009 (aarch64_remove_point): Likewise.
7011 2015-03-05 Pedro Alves <palves@redhat.com>
7013 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7014 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7015 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7016 * nto-low.c (nto_target_ops): Likewise.
7017 * spu-low.c (spu_target_ops): Likewise.
7018 * win32-low.c (win32_target_ops): Likewise.
7020 2015-03-04 Pedro Alves <palves@redhat.com>
7022 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7023 Decide whether a breakpoint triggered based on the SIGTRAP's
7025 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7026 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7027 (linux_low_filter_event): Check for breakpoints before checking
7029 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7031 (linux_stopped_by_sw_breakpoint)
7032 (linux_supports_stopped_by_sw_breakpoint)
7033 (linux_stopped_by_hw_breakpoint)
7034 (linux_supports_stopped_by_hw_breakpoint): New functions.
7035 (linux_target_ops): Install new target methods.
7037 2015-03-04 Pedro Alves <palves@redhat.com>
7039 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7040 * server.c (swbreak_feature, hwbreak_feature): New globals.
7041 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7042 (captured_main): Clear swbreak_feature and hwbreak_feature.
7043 * server.h (swbreak_feature, hwbreak_feature): Declare.
7044 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7045 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7046 supports_stopped_by_hw_breakpoint>: New fields.
7047 (target_supports_stopped_by_sw_breakpoint)
7048 (target_stopped_by_sw_breakpoint)
7049 (target_supports_stopped_by_hw_breakpoint)
7050 (target_stopped_by_hw_breakpoint): Declare.
7052 2015-03-04 Pedro Alves <palves@redhat.com>
7054 enum lwp_stop_reason -> enum target_stop_reason
7055 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7056 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7057 (linux_wait_1, stuck_in_jump_pad_callback)
7058 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7059 (linux_stopped_by_watchpoint):
7060 * linux-low.h (enum lwp_stop_reason): Delete.
7061 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7062 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7064 2015-03-04 Yao Qi <yao.qi@linaro.org>
7066 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7068 2015-03-03 Gary Benson <gbenson@redhat.com>
7070 * hostio.c (handle_vFile): Fix prefix lengths.
7072 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7074 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7077 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7079 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7080 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7081 (clean): Add "rm -f" for above C files.
7082 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7083 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7084 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7085 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7086 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7087 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7088 (init_registers_s390x_vx_linux64)
7089 (init_registers_s390x_tevx_linux64)
7090 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7091 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7093 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7094 (s390_store_vxrs_high): New functions.
7095 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7097 (s390_arch_setup): Add logic for selecting one of the new target
7098 descriptions. Activate the new vector regsets if applicable.
7099 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7100 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7101 and init_registers_s390x_tevx_linux64.
7103 2015-03-01 Pedro Alves <palves@redhat.com>
7105 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7108 2015-02-27 Pedro Alves <palves@redhat.com>
7110 * linux-x86-low.c (u_debugreg_offset): New function.
7111 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7113 2015-02-27 Pedro Alves <palves@redhat.com>
7115 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7116 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7117 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7118 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7119 (ps_lsetfpregs, ps_getpid)
7120 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7121 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7122 (ps_lsetxregs, ps_plog): Declare.
7124 2015-02-27 Pedro Alves <palves@redhat.com>
7126 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7127 IP_AGENT_EXPORT_FUNC.
7128 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7129 IP_AGENT_EXPORT_FUNC.
7130 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7131 (IP_AGENT_EXPORT): Delete.
7132 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7133 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7134 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7135 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7136 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7137 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7138 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7139 (traceframe_read_count, traceframe_write_count)
7140 (traceframes_created, trace_state_variables, get_raw_reg)
7141 (get_trace_state_variable_value, set_trace_state_variable_value)
7142 (ust_loaded, helper_thread_id, cmd_buf): Use
7143 IPA_SYM_EXPORTED_NAME.
7144 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7145 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7146 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7147 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7148 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7149 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7150 EXTERN_C_PUSH/EXTERN_C_POP.
7151 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7152 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7153 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7154 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7155 (traceframe_write_count, traceframe_read_count)
7156 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7157 (about_to_request_buffer_space, get_trace_state_variable_value)
7158 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7159 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7160 EXTERN_C_PUSH/EXTERN_C_POP.
7161 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7162 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7163 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7164 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7165 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7166 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7167 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7168 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7170 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7171 (IP_AGENT_EXPORT_VAR_DECL): Define.
7173 (gdb_agent_get_raw_reg): Declare.
7175 2015-02-27 Tom Tromey <tromey@redhat.com>
7176 Pedro Alves <palves@redhat.com>
7178 Rename symbols whose names are reserved C++ keywords throughout.
7180 2015-02-27 Pedro Alves <palves@redhat.com>
7182 * Makefile.in (COMPILER): New, get it from autoconf.
7183 (CXX): Get from autoconf instead.
7184 (COMPILE.pre): Use COMPILER.
7185 (CC-LD): Rename to ...
7186 (CC_LD): ... this. Use COMPILER.
7187 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7188 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7189 * acinclude.m4: Include build-with-cxx.m4.
7190 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7191 Disable -Werror by default if building in C++ mode.
7192 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7193 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7194 the C++ compiler. Save/restore CXXFLAGS too.
7195 * configure: Regenerate.
7197 2015-02-27 Pedro Alves <palves@redhat.com>
7199 * acinclude.m4: Include libiberty.m4.
7200 * configure.ac: Call libiberty_INIT.
7201 * config.in, configure: Regenerate.
7203 2015-02-26 Pedro Alves <palves@redhat.com>
7205 * linux-low.c (linux_wait_1): When incrementing the PC past a
7206 program breakpoint always use the_low_target.breakpoint_len as
7207 increment, rather than the maximum between that and
7208 the_low_target.decr_pc_after_break.
7210 2015-02-23 Pedro Alves <palves@redhat.com>
7212 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7213 thread was doing a step-over; always adjust the PC if
7214 we stepped over a permanent breakpoint.
7215 (linux_wait_1): If we stepped over breakpoint that was on top of a
7216 permanent breakpoint, manually advance the PC past it.
7218 2015-02-23 Pedro Alves <palves@redhat.com>
7220 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7222 (x86_fill_gregset, x86_store_gregset): Use it when handling
7225 2015-02-20 Pedro Alves <palves@redhat.com>
7227 * thread-db.c: Include "nat/linux-procfs.h".
7228 (thread_db_init): Skip listing new threads if the kernel supports
7229 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7231 2015-02-20 Pedro Alves <palves@redhat.com>
7233 * linux-low.c (status_pending_p_callback): Use ptid_match.
7235 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7237 PR breakpoints/16812
7238 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7239 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7240 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7242 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7244 PR breakpoints/15956
7245 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7247 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7249 * linux-low.c (linux_low_btrace_conf): Print size.
7250 * server.c (handle_btrace_conf_general_set): New.
7251 (hanle_general_set): Call handle_btrace_conf_general_set.
7252 (handle_query): Report Qbtrace-conf:bts:size as supported.
7254 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7256 * linux-low.c (linux_low_enable_btrace): Update parameters.
7257 (linux_low_btrace_conf): New.
7258 (linux_target_ops)<to_btrace_conf>: Initialize.
7259 * server.c (current_btrace_conf): New.
7260 (handle_btrace_enable): Rename to ...
7261 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7262 to target_enable_btrace. Update comment. Update users.
7263 (handle_qxfer_btrace_conf): New.
7264 (qxfer_packets): Add btrace-conf entry.
7265 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7266 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7267 (target_ops)<read_btrace_conf>: New.
7268 (target_enable_btrace): Update parameters.
7269 (target_read_btrace_conf): New.
7271 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7273 * server.c (handle_btrace_general_set): Remove call to
7274 target_supports_btrace.
7275 (supported_btrace_packets): New.
7276 (handle_query): Call supported_btrace_packets.
7277 * target.h: include btrace-common.h.
7278 (btrace_target_info): Removed.
7279 (supports_btrace, target_supports_btrace): Update parameters.
7281 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7283 * Makefile.in (SFILES): Add common/btrace-common.c.
7284 (OBS): Add common/btrace-common.o.
7285 (btrace-common.o): Add build rules.
7286 * linux-low: Include btrace-common.h.
7287 (linux_low_read_btrace): Use struct btrace_data. Call
7288 btrace_data_init and btrace_data_fini.
7290 2015-02-06 Pedro Alves <palves@redhat.com>
7292 * thread-db.c (find_new_threads_callback): Add debug output.
7294 2015-02-04 Pedro Alves <palves@redhat.com>
7296 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7297 (resume_stopped_resumed_lwps): New function.
7298 (linux_wait_for_event_filtered): Use it.
7300 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7302 * Makefile.in (SFILES): Add linux-personality.c.
7303 (linux-personality.o): New rule.
7304 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7305 list of objects to be built.
7306 * linux-low.c: Include nat/linux-personality.h.
7307 (linux_create_inferior): Remove code to disable address space
7308 randomization (moved to ../nat/linux-personality.c). Create
7309 cleanup to disable address space randomization.
7311 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7313 * Makefile.in (posix-strerror.o): New rule.
7314 (mingw-strerror.o): Likewise.
7315 * configure: Regenerated.
7316 * configure.ac: Source file ../common/common.host. Initialize new
7317 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7319 2015-01-14 Yao Qi <yao@codesourcery.com>
7321 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7322 (ppc-linux.o): New rule.
7323 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7324 * configure.ac: AC_CHECK_FUNCS(getauxval).
7325 * config.in: Re-generated.
7326 * configure: Re-generated.
7327 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7328 ppc64_64bit_inferior_p
7330 2015-01-14 Yao Qi <yao@codesourcery.com>
7332 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7333 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7334 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7335 (PT_ORIG_R3, PT_TRAP): Likewise.
7336 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7337 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7338 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7340 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7342 * i387-fp.c (i387_cache_to_xsave): In look over
7343 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7344 zmmh_low_space field by use of zmmh_high_space.
7346 2015-01-09 Pedro Alves <palves@redhat.com>
7348 * linux-low.c (step_over_bkpt): Move higher up in the file.
7349 (handle_extended_wait): Don't store the stop_pc here.
7350 (get_stop_pc): Adjust comments and rename to ...
7351 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7352 stopped for a software breakpoint or hardware breakpoint.
7353 (thread_still_has_status_pending_p): New function.
7354 (status_pending_p_callback): Use
7355 thread_still_has_status_pending_p. If the event is no longer
7356 interesting, resume the LWP.
7357 (handle_tracepoints): Add assert.
7358 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7359 (wstatus_maybe_breakpoint): New function.
7360 (cancel_breakpoint): Delete function.
7361 (check_stopped_by_watchpoint): New function, factored out from
7362 linux_low_filter_event.
7363 (lp_status_maybe_breakpoint): Delete function.
7364 (linux_low_filter_event): Remove filter_ptid argument.
7365 Leave thread group exits pending here. Store the LWP's stop PC.
7366 Always leave events pending.
7367 (linux_wait_for_event_filtered): Pull all events out of the
7368 kernel, and leave them all pending.
7369 (count_events_callback, select_event_lwp_callback): Consider all
7371 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7372 (select_event_lwp): Only give preference to the stepping LWP in
7373 all-stop mode. Adjust comments.
7374 (ignore_event): New function.
7375 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7376 references to cancel_breakpoints. Adjust to renames. Also give
7377 equal priority to all LWPs that have had events in non-stop mode.
7378 If reporting a software breakpoint event, unadjust the LWP's PC.
7379 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7380 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7382 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7383 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7384 (linux_stopped_by_watchpoint): Adjust.
7385 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7386 * linux-low.h (enum lwp_stop_reason): New.
7387 (struct lwp_info) <stop_pc>: Adjust comment.
7388 <stopped_by_watchpoint>: Delete field.
7389 <stop_reason>: New field.
7390 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7391 * mem-break.c (software_breakpoint_inserted_here)
7392 (hardware_breakpoint_inserted_here): New function.
7393 * mem-break.h (software_breakpoint_inserted_here)
7394 (hardware_breakpoint_inserted_here): Declare.
7395 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7396 (cancel_breakpoints): Delete.
7397 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7398 (upload_fast_traceframes): Remove references to
7401 2015-01-09 Pedro Alves <palves@redhat.com>
7403 * thread-db.c (find_new_threads_callback): Ignore thread if the
7404 kernel thread ID is -1.
7406 2015-01-09 Pedro Alves <palves@redhat.com>
7408 * linux-low.c (linux_attach_fail_reason_string): Move to
7409 nat/linux-ptrace.c, and rename.
7410 (linux_attach_lwp): Update comment.
7411 (attach_proc_task_lwp_callback): New function.
7412 (linux_attach): Adjust to rename and use
7413 linux_proc_attach_tgid_threads.
7414 (linux_attach_fail_reason_string): Delete declaration.
7416 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7418 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7419 * server.c (gdbserver_version): Likewise.
7421 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7423 * remote-utils.c: Include ctype.h.
7424 (input_interrupt): Explicitly handle the case when the char
7425 received is the NUL byte. Improve the printing of non-ASCII
7428 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7430 * linux-low.c (linux_low_filter_event): Update call to
7431 linux_enable_event_reporting following the addition of
7432 a new parameter to that function.
7434 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7437 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7438 (AARCH64_FPCR_REGNO): Likewise.
7439 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7440 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7441 (aarch64_store_fpregset): Likewise.
7443 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7445 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7446 Remove FIXME comment about assumption about N.
7448 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7450 * configure.ac: If large-file support is disabled in GDBserver,
7451 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7452 * configure: Regenerate.
7454 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7456 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7457 warning upon ENODATA from ptrace.
7458 * linux-s390-low.c (s390_store_tdb): New.
7459 (s390_regsets): Add regset for NT_S390_TDB.
7461 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7463 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7464 without a fill_function.
7465 * linux-s390-low.c (s390_fill_last_break): Remove.
7466 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7467 (s390_arch_setup): Use regset's size instead of fill_function for
7470 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7472 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7473 the regset's store function when ptrace returned an error.
7474 * regcache.c (get_thread_regcache): Invalidate register cache
7475 before fetching inferior's registers.
7477 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7479 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7480 while-loop as for-loop.
7481 (regsets_store_inferior_registers): Likewise.
7483 2014-11-28 Yao Qi <yao@codesourcery.com>
7485 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7486 * config.in, configure: Re-generate.
7487 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7490 2014-11-21 Yao Qi <yao@codesourcery.com>
7492 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7493 (AC_CHECK_HEADERS): Remove malloc.h.
7494 * configure: Re-generated.
7495 * config.in: Re-generated.
7496 * server.h: Don't include alloca.h and malloc.h.
7497 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7498 Don't include malloc.h.
7500 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7502 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7503 corresponding ERRNO check in same block.
7505 2014-11-12 Pedro Alves <palves@redhat.com>
7507 * server.c (cont_thread): Update comment.
7508 (start_inferior, attach_inferior): No longer clear cont_thread.
7509 (handle_v_cont): No longer set cont_thread.
7510 (captured_main): Clear cont_thread each time a GDB connects.
7512 2014-11-12 Pedro Alves <palves@redhat.com>
7514 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7515 thread, and don't resume all threads if the Hc thread has exited.
7517 2014-11-12 Pedro Alves <palves@redhat.com>
7519 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7520 the process group instead of to a specific LWP.
7522 2014-10-15 Pedro Alves <palves@redhat.com>
7525 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7527 (arm_set_thread_context): Delete.
7528 (the_low_target): Adjust.
7529 * win32-i386-low.c (debug_registers_changed)
7530 (debug_registers_used): Delete.
7531 (update_debug_registers_callback): New function.
7532 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7533 needing to update their debug registers.
7534 (win32_get_current_dr): New function.
7535 (x86_dr_low_get_addr, x86_dr_low_get_control)
7536 (x86_dr_low_get_status): Fetch the debug register from the thread
7538 (i386_initial_stuff): Adjust.
7539 (i386_get_thread_context): Remove current_event parameter. Don't
7540 clear debug_registers_changed nor copy DR values to
7542 (i386_set_thread_context): Delete.
7543 (i386_prepare_to_resume): New function.
7544 (i386_thread_added): Mark the thread as needing to update irs
7546 (the_low_target): Remove i386_set_thread_context and install
7547 i386_prepare_to_resume.
7548 * win32-low.c (win32_get_thread_context): Adjust.
7549 (win32_set_thread_context): Use SetThreadContext
7551 (win32_prepare_to_resume): New function.
7552 (win32_require_context): New function, factored out from ...
7553 (thread_rec): ... this.
7554 (continue_one_thread): Call win32_prepare_to_resume on each thread
7555 we're about to continue.
7556 (win32_resume): Call win32_prepare_to_resume on the event thread.
7557 * win32-low.h (struct win32_thread_info)
7558 <debug_registers_changed>: New field.
7559 (struct win32_target_ops): Change prototype of set_thread_context,
7560 delete set_thread_context and add prepare_to_resume.
7561 (win32_require_context): New declaration.
7563 2014-10-08 Gary Benson <gbenson@redhat.com>
7565 * server.h: Do not include common-exceptions.h.
7567 2014-10-08 Gary Benson <gbenson@redhat.com>
7569 * server.h: Do not include cleanups.h.
7571 2014-09-30 James Hogan <james.hogan@imgtec.com>
7573 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7576 2014-09-23 Yao Qi <yao@codesourcery.com>
7578 * linux-low.c (lp_status_maybe_breakpoint): New function.
7579 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7580 (count_events_callback): Likewise.
7581 (select_event_lwp_callback): Likewise.
7582 (cancel_breakpoints_callback): Likewise.
7584 2014-09-19 Don Breazeal <donb@codesourcery.com>
7586 * linux-low.c (handle_extended_wait): Call
7587 linux_ptrace_get_extended_event.
7588 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7589 linux_is_extended_waitstatus.
7591 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7593 * Makefile.in (CPPFLAGS): Define.
7594 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7595 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7597 2014-09-16 Gary Benson <gbenson@redhat.com>
7599 * inferiors.h (current_inferior): Renamed as...
7600 (current_thread): New variable. All uses updated.
7601 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7602 (maybe_move_out_of_jump_pad): Likewise.
7603 (cancel_breakpoint): Likewise.
7604 (linux_low_filter_event): Likewise.
7605 (wait_for_sigstop): Likewise.
7606 (linux_resume_one_lwp): Likewise.
7607 (need_step_over_p): Likewise.
7608 (start_step_over): Likewise.
7609 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7610 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7611 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7612 and save_inferior as saved_thread.
7613 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7615 (regcache_invalidate_thread): Likewise.
7616 * remote-utils.c (prepare_resume_reply): Likewise.
7617 * thread-db.c (thread_db_get_tls_address): Likewise.
7618 (disable_thread_event_reporting): Likewise.
7619 (remove_thread_event_breakpoints): Likewise.
7620 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7622 * target.h (set_desired_inferior): Renamed as...
7623 (set_desired_thread): New declaration. All uses updated.
7624 * server.c (myresume): Updated comment to reference thread instead
7626 (handle_serial_event): Likewise.
7627 (handle_target_event): Likewise.
7629 2014-09-12 Tom Tromey <tromey@redhat.com>
7630 Gary Benson <gbenson@redhat.com>
7632 * regcache.h: Include common-regcache.h.
7633 (regcache_read_pc): Don't declare.
7634 * regcache.c (get_thread_regcache_for_ptid): New function.
7636 2014-09-11 Tom Tromey <tromey@redhat.com>
7637 Gary Benson <gbenson@redhat.com>
7639 * symbol.c: New file.
7640 * Makefile.in (SFILES): Add symbol.c.
7641 (OBS): Add symbol.o.
7643 2014-09-11 Gary Benson <gbenson@redhat.com>
7645 * target.c (target_stop_ptid, target_continue_ptid): New
7648 2014-09-11 Tom Tromey <tromey@redhat.com>
7649 Gary Benson <gbenson@redhat.com>
7651 * target.h: Include target/target.h.
7652 * target.c (target_read_memory, target_read_uint32)
7653 (target_write_memory): New functions.
7655 2014-09-11 Gary Benson <gbenson@redhat.com>
7657 * server.h (debug_hw_points): Don't declare.
7658 * server.c (debug_hw_points): Don't define. Replace all uses
7659 with show_debug_regs.
7660 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7661 all uses with show_debug_regs.
7663 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7665 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7666 endianness into account.
7667 (ppc_supply_ptrace_register): Likewise.
7669 2014-09-03 James Hogan <james.hogan@imgtec.com>
7671 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7672 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7674 2014-09-03 Gary Benson <gbenson@redhat.com>
7676 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7677 ALL_DEBUG_ADDRESS_REGISTERS.
7679 2014-09-02 Gary Benson <gbenson@redhat.com>
7681 * i386-low.h: Renamed as...
7682 * x86-low.h: New file. All type, function and variable name
7683 prefixes changed from "i386_" to "x86_". All references updated.
7684 * i386-low.c: Renamed as...
7685 * x86-low.c: New file. All type, function and variable name
7686 prefixes changed from "i386_" to "x86_". All references updated.
7688 2014-09-02 Gary Benson <gbenson@redhat.com>
7690 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7691 (x86_linux_new_thread): Likewise.
7693 2014-08-29 Gary Benson <gbenson@redhat.com>
7695 * server.h (setjmp.h): Do not include.
7696 (toplevel): Do not declare.
7697 (common-exceptions.h): Include.
7698 (cleanups.h): Likewise.
7699 * server.c (toplevel): Do not define.
7700 (exit_code): New static global.
7701 (detach_or_kill_for_exit_cleanup): New function.
7702 (main): New function. Original main renamed to...
7703 (captured_main): New function.
7704 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7706 2014-08-29 Gary Benson <gbenson@redhat.com>
7708 * Makefile.in (SFILES): Add common/common-exceptions.c.
7709 (OBS): Add common-exceptions.o.
7710 (common-exceptions.o): New rule.
7711 * utils.c (prepare_to_throw_exception): New function.
7713 2014-08-29 Gary Benson <gbenson@redhat.com>
7715 * config.in: Regenerate.
7716 * configure: Likewise.
7718 2014-08-29 Gary Benson <gbenson@redhat.com>
7720 * Makefile.in (SFILES): Add common/cleanups.c.
7722 (cleanups.o): New rule.
7724 2014-08-29 Gary Benson <gbenson@redhat.com>
7726 * utils.c (internal_vwarning): New function.
7728 2014-08-28 Gary Benson <gbenson@redhat.com>
7730 * utils.h (fatal): Remove declaration.
7731 * utils.c (fatal): Remove function.
7733 2014-08-28 Gary Benson <gbenson@redhat.com>
7735 * tracepoint.c (gdb_agent_init): Replace fatal with
7737 (initialize_tracepoint): Likewise.
7739 2014-08-28 Gary Benson <gbenson@redhat.com>
7741 * remote-utils.c (remote_prepare): Replace fatal with error.
7743 2014-08-28 Gary Benson <gbenson@redhat.com>
7745 * linux-low.c (linux_async): Replace fatal with warning.
7747 (linux_start_non_stop): Return -1 if linux_async failed.
7749 2014-08-28 Gary Benson <gbenson@redhat.com>
7751 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7753 (i386_dr_low_get_addr): Remove vague comment.
7754 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7757 2014-08-28 Gary Benson <gbenson@redhat.com>
7759 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7760 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7762 (linux_resume_one_lwp): Likewise.
7763 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7765 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7766 with internal_error.
7767 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7768 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7769 (find_register_by_name): Replace fatal with internal_error.
7770 (find_regno): Likewise.
7771 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7772 * thread-db.c (thread_db_create_event): Likewise.
7773 (thread_db_load_search): Likewise.
7774 (try_thread_db_load_1): Likewise.
7775 * tracepoint.c (get_jump_space_head): Replace fatal with
7777 (claim_trampoline_space): Likewise.
7778 (have_fast_tracepoint_trampoline_buffer): Likewise.
7779 (cmd_qtstart): Likewise.
7780 (stop_tracing): Likewise.
7781 (fast_tracepoint_collecting): Likewise.
7782 (target_malloc): Likewise.
7783 (download_tracepoint): Likewise.
7784 (download_trace_state_variables): Replace check with gdb_assert.
7785 (upload_fast_traceframes): Replace fatal with internal_error.
7787 2014-08-19 Tom Tromey <tromey@redhat.com>
7788 Gary Benson <gbenson@redhat.com>
7790 * Makefile.in (SFILES): Add common/common-debug.c.
7791 (OBS): Add common-debug.o.
7792 (common-debug.o): New rule.
7793 * debug.h (debug_printf): Don't declare.
7794 * debug.c (debug_printf): Renamed and rewritten as...
7795 (debug_vprintf): New function.
7797 2014-08-19 Gary Benson <gbenson@redhat.com>
7799 * utils.h: Do not include print-utils.h.
7801 2014-08-19 Tom Tromey <tromey@redhat.com>
7802 Gary Benson <gbenson@redhat.com>
7804 * server.h: Add static assertion.
7805 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7807 2014-08-19 Tom Tromey <tromey@redhat.com>
7808 Gary Benson <gbenson@redhat.com>
7810 * Makefile.in (SFILES): Add common/errors.c.
7811 (OBS): Add errors.o.
7812 (IPA_OBS): Add errors-ipa.o.
7813 (errors.o): New rule.
7814 (errors-ipa.o): Likewise.
7815 * utils.h (perror_with_name, error, warning): Don't declare.
7816 * utils.c (warning): Renamed and rewritten as...
7817 (vwarning): New function.
7818 (error): Renamed and rewritten as...
7819 (verror): New function.
7820 (internal_error): Renamed and rewritten as...
7821 (internal_verror): New function.
7823 2014-08-07 Gary Benson <gbenson@redhat.com>
7825 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7826 * configure: Regenerate.
7827 * config.in: Likewise.
7828 * server.h: Do not include errno.h.
7829 * event-loop.c: Likewise.
7830 * hostio-errno.c: Likewise.
7831 * linux-low.c: Likewise.
7832 * remote-utils.c: Likewise.
7833 * spu-low.c: Likewise.
7834 * utils.c: Likewise.
7835 * gdbreplay.c: Unconditionally include errno.h.
7837 2014-08-07 Gary Benson <gbenson@redhat.com>
7839 * server.h: Do not include string.h.
7840 * event-loop.c: Likewise.
7841 * linux-low.c: Likewise.
7842 * regcache.c: Likewise.
7843 * remote-utils.c: Likewise.
7844 * spu-low.c: Likewise.
7845 * utils.c: Likewise.
7847 2014-08-07 Gary Benson <gbenson@redhat.com>
7849 * server.h: Do not include gdb_assert.h.
7851 2014-08-07 Gary Benson <gbenson@redhat.com>
7853 * server.h: Do not include common-utils.h.
7855 2014-08-07 Gary Benson <gbenson@redhat.com>
7857 * server.h: Do not include ptid.h.
7858 * notif.h: Likewise.
7860 2014-08-07 Gary Benson <gbenson@redhat.com>
7862 * server.h: Do not include gdb_locale.h.
7864 2014-08-07 Gary Benson <gbenson@redhat.com>
7866 * server.h: Do not include gdb/signals.h.
7867 * win32-low.c: Likewise.
7869 2014-08-07 Gary Benson <gbenson@redhat.com>
7871 * server.h: Do not include pathmax.h.
7873 2014-08-07 Gary Benson <gbenson@redhat.com>
7875 * server.h: Do not include libiberty.h.
7876 * linux-bfin-low.c: Likewise.
7878 2014-08-07 Gary Benson <gbenson@redhat.com>
7880 * server.h: Do not include ansidecl.h.
7882 2014-08-07 Gary Benson <gbenson@redhat.com>
7884 * linux-x86-low.c: Do not include stddef.h.
7885 * lynx-ppc-low.c: Likewise.
7886 * tracepoint.c: Likewise.
7888 2014-08-07 Gary Benson <gbenson@redhat.com>
7890 * server.h: Do not include stdarg.h.
7891 * nto-low.c: Likewise.
7893 2014-08-07 Gary Benson <gbenson@redhat.com>
7895 * server.h: Do not include stdlib.h.
7896 * inferiors.c: Likewise.
7897 * linux-low.c: Likewise.
7898 * regcache.c: Likewise.
7899 * spu-low.c: Likewise.
7900 * tracepoint.c: Likewise.
7901 * utils.c: Likewise.
7903 2014-08-07 Gary Benson <gbenson@redhat.com>
7905 * server.h: Do not include stdio.h.
7906 * linux-low.c: Likewise.
7907 * remote-utils.c: Likewise.
7908 * spu-low.c: Likewise.
7909 * utils.c: Likewise.
7910 * wincecompat.c: Likewise.
7912 2014-08-06 Gary Benson <gbenson@redhat.com>
7914 * regcache.c (init_register_cache): Move conditionals inside if.
7916 2014-08-06 Gary Benson <gbenson@redhat.com>
7918 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7920 2014-07-31 Gary Benson <gbenson@redhat.com>
7922 * ax.h: Do not include server.h.
7923 * gdbthread.h: Likewise.
7924 * lynx-low.h: Likewise.
7925 * notif.h: Likewise.
7927 2014-07-30 Gary Benson <gbenson@redhat.com>
7929 * server.h: Include common-defs.h.
7930 Do not include config.h or build-gnulib-gdbserver/config.h.
7932 2014-07-30 Gary Benson <gbenson@redhat.com>
7934 * hostio-errno.c: Move server.h to top of includes list.
7935 * inferiors.c: Likewise.
7936 * linux-x86-low.c: Likewise.
7937 * notif.c: Include server.h.
7939 2014-07-24 Tom Tromey <tromey@redhat.com>
7940 Gary Benson <gbenson@redhat.com>
7942 * server.h (CORE_ADDR): Now unsigned.
7944 2014-07-16 Pedro Alves <palves@redhat.com>
7946 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7948 2014-07-15 Pedro Alves <palves@redhat.com>
7950 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7953 2014-07-11 Pedro Alves <palves@redhat.com>
7955 * linux-low.c (kill_wait_lwp): New function, based on
7956 kill_one_lwp_callback, but use my_waitpid directly.
7957 (kill_one_lwp_callback, linux_kill): Use it.
7959 2014-06-23 Pedro Alves <palves@redhat.com>
7961 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7962 before setting DR0..DR3.
7964 2014-06-20 Gary Benson <gbenson@redhat.com>
7966 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7967 * configure: Regenerated.
7968 * config.in: Likewise.
7970 2014-06-20 Gary Benson <gbenson@redhat.com>
7972 * Makefile.in (SFILES): Update locations for files moved
7974 (object file files): Reordered.
7976 2014-06-20 Gary Benson <gbenson@redhat.com>
7978 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7979 (i386_dr_low_set_addr): Likewise.
7980 (i386_dr_low_get_addr): Likewise.
7981 (i386_dr_low_can_set_control): Likewise.
7982 (i386_dr_low_set_control): Likewise.
7983 (i386_dr_low_get_control): Likewise.
7984 (i386_dr_low_get_status): Likewise.
7985 (i386_get_debug_register_length): Likewise.
7986 * linux-x86-low.c (i386_dr_low_set_addr):
7987 Changed signature. Made static.
7988 (i386_dr_low_get_addr): Likewise.
7989 (i386_dr_low_set_control): Likewise.
7990 (i386_dr_low_get_control): Likewise.
7991 (i386_dr_low_get_status): Likewise.
7992 (i386_dr_low): New global variable.
7993 * win32-i386-low.c (i386_dr_low_set_addr):
7994 Changed signature. Made static.
7995 (i386_dr_low_get_addr): Likewise.
7996 (i386_dr_low_set_control): Likewise.
7997 (i386_dr_low_get_control): Likewise.
7998 (i386_dr_low_get_status): Likewise.
7999 (i386_dr_low): New global variable.
8001 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8003 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8004 * Makefile.in (AR, AR_FLAGS): Define.
8005 * configure: Regenerate.
8007 2014-06-19 Gary Benson <gbenson@redhat.com>
8009 * Makefile.in (i386-dregs.o): New rule.
8010 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8011 * i386-low.c (target.h): Remove include.
8012 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8013 (DR_CONTROL_SHIFT): Likewise.
8014 (DR_CONTROL_SIZE): Likewise.
8015 (DR_RW_EXECUTE): Likewise.
8016 (DR_RW_WRITE): Likewise.
8017 (DR_RW_READ): Likewise.
8018 (DR_RW_IORW): Likewise.
8019 (DR_LEN_1): Likewise.
8020 (DR_LEN_2): Likewise.
8021 (DR_LEN_4): Likewise.
8022 (DR_LEN_8): Likewise.
8023 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8024 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8025 (DR_ENABLE_SIZE): Likewise.
8026 (DR_LOCAL_SLOWDOWN): Likewise.
8027 (DR_GLOBAL_SLOWDOWN): Likewise.
8028 (DR_CONTROL_RESERVED): Likewise.
8029 (I386_DR_CONTROL_MASK): Likewise.
8030 (I386_DR_VACANT): Likewise.
8031 (I386_DR_LOCAL_ENABLE): Likewise.
8032 (I386_DR_GLOBAL_ENABLE): Likewise.
8033 (I386_DR_DISABLE): Likewise.
8034 (I386_DR_SET_RW_LEN): Likewise.
8035 (I386_DR_GET_RW_LEN): Likewise.
8036 (I386_DR_WATCH_HIT): Likewise.
8037 (i386_wp_op_t): Likewise.
8038 (i386_show_dr): Likewise.
8039 (i386_length_and_rw_bits): Likewise.
8040 (i386_insert_aligned_watchpoint): Likewise.
8041 (i386_remove_aligned_watchpoint): Likewise.
8042 (i386_handle_nonaligned_watchpoint): Likewise.
8043 i386_update_inferior_debug_regs(): Likewise.
8044 (i386_dr_insert_watchpoint): Likewise.
8045 (i386_dr_remove_watchpoint): Likewise.
8046 (i386_dr_region_ok_for_watchpoint): Likewise.
8047 (i386_dr_stopped_data_address): Likewise.
8048 (i386_dr_stopped_by_watchpoint): Likewise.
8050 2014-06-19 Gary Benson <gbenson@redhat.com>
8052 * i386-low.c (i386_dr_show): Renamed to
8053 i386_show_dr and made static. All uses updated.
8054 (i386_dr_length_and_rw_bits): Renamed to
8055 i386_length_and_rw_bits and made static.
8057 (i386_dr_insert_aligned_watchpoint): Renamed to
8058 i386_insert_aligned_watchpoint and made static.
8060 (i386_dr_remove_aligned_watchpoint): Renamed to
8061 i386_remove_aligned_watchpoint and made static.
8063 (i386_dr_update_inferior_debug_regs): Renamed to
8064 i386_update_inferior_debug_regs and made static.
8067 2014-06-18 Gary Benson <gbenson@redhat.com>
8069 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8070 (i386_dr_low_can_set_control): Likewise.
8071 (i386_get_debug_register_length): Likewise.
8072 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8073 (i386_dr_low_can_set_control): Likewise.
8074 (i386_get_debug_register_length): Likewise.
8076 2014-06-17 Gary Benson <gbenson@redhat.com>
8078 * i386-low.h (i386-dregs.h): New include.
8079 (DR_FIRSTADDR): Now in i386-dregs.h.
8080 (DR_LASTADDR): Likewise.
8081 (DR_NADDR): Likewise.
8082 (DR_STATUS): Likewise.
8083 (DR_CONTROL): Likewise.
8084 (i386_debug_reg_state): Likewise.
8085 (i386_dr_insert_watchpoint): Likewise.
8086 (i386_dr_remove_watchpoint): Likewise.
8087 (i386_dr_region_ok_for_watchpoint): Likewise.
8088 (i386_dr_stopped_data_address): Likewise.
8089 (i386_dr_stopped_by_watchpoint): Likewise.
8090 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8092 2014-06-18 Gary Benson <gbenson@redhat.com>
8094 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8095 i386_dr_insert_watchpoint.
8096 (i386_low_remove_watchpoint): Renamed to
8097 i386_dr_remove_watchpoint.
8098 (i386_low_region_ok_for_watchpoint): Renamed to
8099 i386_dr_region_ok_for_watchpoint.
8100 (i386_low_stopped_data_address): Renamed to
8101 i386_dr_stopped_data_address.
8102 (i386_low_stopped_by_watchpoint): Renamed to
8103 i386_dr_stopped_by_watchpoint.
8104 * i386-low.c (i386_show_dr): Renamed to
8105 i386_dr_show and made nonstatic. All uses updated.
8106 (i386_length_and_rw_bits): Renamed to
8107 i386_dr_length_and_rw_bits and made nonstatic.
8109 (i386_insert_aligned_watchpoint): Renamed to
8110 i386_dr_insert_aligned_watchpoint and made nonstatic.
8112 (i386_remove_aligned_watchpoint): Renamed to
8113 i386_dr_remove_aligned_watchpoint and made nonstatic.
8115 (i386_update_inferior_debug_regs): Renamed to
8116 i386_dr_update_inferior_debug_regs and made nonstatic.
8118 (i386_low_insert_watchpoint): Renamed to
8119 i386_dr_insert_watchpoint. All uses updated.
8120 (i386_low_remove_watchpoint): Renamed to
8121 i386_dr_remove_watchpoint. All uses updated.
8122 (i386_low_region_ok_for_watchpoint): Renamed to
8123 i386_dr_region_ok_for_watchpoint. All uses updated.
8124 (i386_low_stopped_data_address): Renamed to
8125 i386_dr_stopped_data_address. All uses updated.
8126 (i386_low_stopped_by_watchpoint): Renamed to
8127 i386_dr_stopped_by_watchpoint. All uses updated.
8129 2014-06-18 Gary Benson <gbenson@redhat.com>
8131 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8132 (i386_dr_low_can_set_control): Likewise.
8133 (i386_insert_aligned_watchpoint): New check.
8135 2014-06-18 Gary Benson <gbenson@redhat.com>
8137 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8140 2014-06-18 Gary Benson <gbenson@redhat.com>
8142 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8143 instead of fatal and error.
8144 (i386_handle_nonaligned_watchpoint): Likewise.
8146 2014-06-18 Gary Benson <gbenson@redhat.com>
8148 * i386-low.c (i386_get_debug_register_length): New macro.
8149 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8150 (i386_show_dr): Use debug_printf instead of fprintf. Use
8151 phex to format values.
8153 2014-06-18 Gary Benson <gbenson@redhat.com>
8155 * i386-low.h: Comment changes.
8156 * i386-low.c: Likewise.
8158 2014-06-18 Gary Benson <gbenson@redhat.com>
8160 * i386-low.c: Whitespace changes.
8162 2014-06-12 Tom Tromey <tromey@redhat.com>
8164 * utils.c (freeargv): Remove.
8166 2014-06-12 Tom Tromey <tromey@redhat.com>
8168 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8169 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8170 (parse_debug_format_options): Likewise.
8171 (gdbserver_usage): Likewise.
8172 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8173 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8174 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8176 ($(LIBGNU)): Depend on libiberty.
8177 (all-lib): Recurse into all subdirs.
8178 (install-only): Invoke "install" target in subdirs.
8179 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8181 * configure: Rebuild.
8182 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8183 for vasprintf, vsnprintf, or gettimeofday.
8184 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8187 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8189 * development.sh: Delete.
8190 * Makefile.in (config.status): Adjust dependency on development.sh.
8191 * configure.ac: Adjust development.sh source call.
8192 * configure: Regenerate.
8194 2014-06-02 Pedro Alves <palves@redhat.com>
8196 * ax.c (gdb_free_agent_expr): New function.
8197 * ax.h (gdb_free_agent_expr): New declaration.
8198 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8200 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8202 (clear_breakpoint_conditions_and_commands): New function.
8203 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8204 (clear_breakpoint_conditions_and_commands): New declaration.
8206 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8208 * linux-aarch64-low.c (asm/ptrace.h): Include.
8210 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8212 Fix TLS access for -static -pthread.
8213 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8214 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8215 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8217 2014-05-20 Pedro Alves <palves@redhat.com>
8219 * linux-aarch64-low.c (aarch64_insert_point)
8220 (aarch64_remove_point): No longer check whether the type is
8221 supported here. Adjust to new interface.
8222 (the_low_target): Install aarch64_supports_z_point_type as
8223 supports_z_point_type method.
8224 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8225 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8226 instead of a Z packet char. Adjust.
8227 (arm_supports_z_point_type): New function.
8228 (arm_insert_point, arm_remove_point): Adjust to new interface.
8229 (the_low_target): Install arm_supports_z_point_type.
8230 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8231 (cris_insert_point, cris_remove_point): Adjust to new interface.
8232 Don't check whether the type is supported here.
8233 (the_low_target): Install cris_supports_z_point_type.
8234 * linux-low.c (linux_supports_z_point_type): New function.
8235 (linux_insert_point, linux_remove_point): Adjust to new interface.
8236 * linux-low.h (struct linux_target_ops) <insert_point,
8237 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8238 raw_breakpoint pointer parameter.
8239 <supports_z_point_type>: New method.
8240 * linux-mips-low.c (mips_supports_z_point_type): New function.
8241 (mips_insert_point, mips_remove_point): Adjust to new interface.
8242 Use mips_supports_z_point_type.
8243 (the_low_target): Install mips_supports_z_point_type.
8244 * linux-ppc-low.c (the_low_target): Install NULL as
8245 supports_z_point_type method.
8246 * linux-s390-low.c (the_low_target): Install NULL as
8247 supports_z_point_type method.
8248 * linux-sparc-low.c (the_low_target): Install NULL as
8249 supports_z_point_type method.
8250 * linux-x86-low.c (x86_supports_z_point_type): New function.
8251 (x86_insert_point): Adjust to new insert_point interface. Use
8252 insert_memory_breakpoint. Adjust to new
8253 i386_low_insert_watchpoint interface.
8254 (x86_remove_point): Adjust to remove_point interface. Use
8255 remove_memory_breakpoint. Adjust to new
8256 i386_low_remove_watchpoint interface.
8257 (the_low_target): Install x86_supports_z_point_type.
8258 * lynx-low.c (lynx_target_ops): Install NULL as
8259 supports_z_point_type callback.
8260 * nto-low.c (nto_supports_z_point_type): New.
8261 (nto_insert_point, nto_remove_point): Adjust to new interface.
8262 (nto_target_ops): Install nto_supports_z_point_type.
8263 * mem-break.c: Adjust intro comment.
8264 (struct raw_breakpoint) <raw_type, size>: New fields.
8265 <inserted>: Update comment.
8266 <shlib_disabled>: Delete field.
8267 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8268 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8269 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8270 (raw_bkpt_type_to_target_hw_bp_type): New function.
8271 (find_enabled_raw_code_breakpoint_at): New function.
8272 (find_raw_breakpoint_at): New type and size parameters. Use them.
8273 (insert_memory_breakpoint): New function, based off
8274 set_raw_breakpoint_at.
8275 (remove_memory_breakpoint): New function.
8276 (set_raw_breakpoint_at): Reimplement.
8277 (set_breakpoint): New, based on set_breakpoint_at.
8278 (set_breakpoint_at): Reimplement.
8279 (delete_raw_breakpoint): Go through the_target->remove_point
8280 instead of assuming memory breakpoints.
8281 (find_gdb_breakpoint_at): Delete.
8282 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8283 (find_gdb_breakpoint): New function.
8284 (set_gdb_breakpoint_at): Delete.
8285 (z_type_supported): New function.
8286 (set_gdb_breakpoint_1): New function, loosely based off
8287 set_gdb_breakpoint_at.
8288 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8289 (delete_gdb_breakpoint_at): Delete.
8290 (delete_gdb_breakpoint_1): New function, loosely based off
8291 delete_gdb_breakpoint_at.
8292 (delete_gdb_breakpoint): New function.
8293 (clear_gdb_breakpoint_conditions): Rename to ...
8294 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8296 (add_condition_to_breakpoint): Make static.
8297 (add_breakpoint_condition): Take a struct breakpoint pointer
8298 instead of an address. Adjust.
8299 (gdb_condition_true_at_breakpoint): Rename to ...
8300 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8302 (gdb_condition_true_at_breakpoint): Reimplement.
8303 (add_breakpoint_commands): Take a struct breakpoint pointer
8304 instead of an address. Adjust.
8305 (gdb_no_commands_at_breakpoint): Rename to ...
8306 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8307 parameter. Return true if no breakpoint was found. Change debug
8309 (gdb_no_commands_at_breakpoint): Reimplement.
8310 (run_breakpoint_commands): Rename to ...
8311 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8312 and change return type to boolean.
8313 (run_breakpoint_commands): New function.
8314 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8315 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8316 breakpoint. Go through the_target->remove_point instead of
8317 assuming memory breakpoint.
8318 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8319 software and hardware breakpoints.
8320 (reinsert_raw_breakpoint): Go through the_target->insert_point
8321 instead of assuming memory breakpoint.
8322 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8323 software and hardware breakpoints.
8324 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8325 Check both software and hardware breakpoints.
8326 (validate_inserted_breakpoint): Assert the breakpoint is a
8327 software breakpoint. Set the inserted flag to -1 instead of
8328 setting shlib_disabled.
8329 (delete_disabled_breakpoints): Adjust.
8330 (validate_breakpoints): Only validate software breakpoints.
8331 Adjust to inserted flag change.
8332 (check_mem_read, check_mem_write): Skip breakpoint types other
8333 than software breakpoints. Adjust to inserted flag change.
8334 * mem-break.h (enum raw_bkpt_type): New enum.
8335 (raw_breakpoint, struct process_info): Forward declare.
8336 (Z_packet_to_target_hw_bp_type): Delete declaration.
8337 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8338 (set_gdb_breakpoint, delete_gdb_breakpoint)
8339 (clear_breakpoint_conditions): New declarations.
8340 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8341 (breakpoint_inserted_here): Update comment.
8342 (add_breakpoint_condition, add_breakpoint_commands): Replace
8343 address parameter with a breakpoint pointer parameter.
8344 (gdb_breakpoint_here): Update comment.
8345 (delete_gdb_breakpoint_at): Delete.
8346 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8347 * server.c (process_point_options): Take a struct breakpoint
8348 pointer instead of an address. Adjust.
8349 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8350 delete_gdb_breakpoint.
8351 * spu-low.c (spu_target_ops): Install NULL as
8352 supports_z_point_type method.
8353 * target.h: Include mem-break.h.
8354 (struct target_ops) <prepare_to_access_memory>: Update comment.
8355 <supports_z_point_type>: New field.
8356 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8357 instead of a char. Also take a raw breakpoint pointer.
8358 * win32-arm-low.c (the_low_target): Install NULL as
8359 supports_z_point_type.
8360 * win32-i386-low.c (i386_supports_z_point_type): New function.
8361 (i386_insert_point, i386_remove_point): Adjust to new interface.
8362 (the_low_target): Install i386_supports_z_point_type.
8363 * win32-low.c (win32_supports_z_point_type): New function.
8364 (win32_insert_point, win32_remove_point): Adjust to new interface.
8365 (win32_target_ops): Install win32_supports_z_point_type.
8366 * win32-low.h (struct win32_target_ops):
8367 <supports_z_point_type>: New method.
8368 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8369 instead of a char. Also take a raw breakpoint pointer.
8371 2014-05-20 Pedro Alves <palves@redhat.com>
8373 * mem-break.h: Include break-common.h.
8374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8376 (Z_packet_to_target_hw_bp_type): New declaration.
8377 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8378 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8379 (Z_PACKET_ACCESS_WP): Delete macros.
8380 (Z_packet_to_hw_type): Delete function.
8381 * i386-low.h: Don't include break-common.h here.
8382 (Z_packet_to_hw_type): Delete declaration.
8383 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8384 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8385 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8386 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8387 * linux-aarch64-low.c: Don't include break-common.h here.
8388 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8389 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8390 (Z_packet_to_target_hw_bp_type): Delete function.
8391 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8393 (mips_insert_point, mips_remove_point): Use
8394 Z_packet_to_target_hw_bp_type.
8396 2014-05-20 Pedro Alves <palves@redhat.com>
8398 * linux-aarch64-low.c: Include break-common.h.
8399 (enum target_point_type): Delete.
8400 (Z_packet_to_point_type): Rename to ...
8401 (Z_packet_to_target_hw_bp_type): ... this, and return a
8402 target_hw_bp_type instead.
8403 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8404 instead of an enum target_point_type.
8405 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8407 (aarch64_dr_state_insert_one_point)
8408 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8409 (aarch64_handle_aligned_watchpoint)
8410 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8411 Take an enum target_hw_bp_type instead of an enum
8413 (aarch64_supports_z_point_type): New function.
8414 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8415 use Z_packet_to_target_hw_bp_type.
8417 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8419 * configure.ac: Only use -Werror by default when DEVELOPMENT
8421 * configure: Regenerate.
8423 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8425 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8426 * linux-x86-low.c (X86_64_USER_REGS): New.
8427 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8429 2014-04-28 Yao Qi <yao@codesourcery.com>
8431 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8434 2014-04-25 Pedro Alves <palves@redhat.com>
8437 * linux-low.c (linux_attach_fail_reason_string): New function.
8438 (linux_attach_lwp): Delete.
8439 (linux_attach_lwp_1): Rename to ...
8440 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8441 argument. Remove "initial" parameter. Return int instead of
8442 void. Don't error or warn here.
8443 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8444 failure to attach to the tgid. Call warning when failing to
8446 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8447 argument. Remove "initial" parameter. Return int instead of
8448 void. Don't error or warn here.
8449 (linux_attach_fail_reason_string): New declaration.
8450 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8451 interface change. Use linux_attach_fail_reason_string.
8453 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8454 Walfred Tedeschi <walfred.tedeschi@intel.com>
8456 * Makefile.in: Added rules to handle new files
8457 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8458 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8459 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8460 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8461 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8462 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8464 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8465 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8466 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8467 i386/x32-avx512.xml.
8468 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8469 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8470 i386/x32-avx512-linux.xml.
8471 * i387-fp.c (num_avx512_k_registers): New constant for number
8473 (num_avx512_zmmh_low_registers): New constant for number of
8474 lower ZMM registers (0-15).
8475 (num_avx512_zmmh_high_registers): New constant for number of
8476 higher ZMM registers (16-31).
8477 (num_avx512_ymmh_registers): New contant for number of higher
8478 YMM registers (ymm16-31 added by avx521 on x86_64).
8479 (num_avx512_xmm_registers): New constant for number of higher
8480 XMM registers (xmm16-31 added by AVX512 on x86_64).
8481 (struct i387_xsave): Add space for AVX512 registers.
8482 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8483 Add code to handle AVX512 registers.
8484 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8485 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8486 prototypei from generated file.
8487 (tdesc_amd64_avx512_linux): Likewise.
8488 (init_registers_x32_avx512_linux): Likewise.
8489 (tdesc_x32_avx512_linux): Likewise.
8490 (init_registers_i386_avx512_linux): Likewise.
8491 (tdesc_i386_avx512_linux): Likewise.
8492 (x86_64_regmap): Add AVX512 registers.
8493 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8495 (initialize_low_arch): Add code to initialize AVX512 registers.
8497 2014-04-23 Pedro Alves <palves@redhat.com>
8499 * mem-break.c (find_gdb_breakpoint_at): Make static.
8500 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8502 2014-04-23 Pedro Alves <palves@redhat.com>
8504 * i386-low.c: Don't include break-common.h here.
8505 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8506 prototype to take target_hw_bp_type as argument instead of a Z
8508 * i386-low.h: Include break-common.h here.
8509 (Z_packet_to_hw_type): Declare.
8510 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8512 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8513 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8514 (x86_remove_point): Convert the packet number to a
8515 target_hw_bp_type before calling i386_low_remove_watchpoint.
8516 * win32-i386-low.c (i386_insert_point): Convert the packet number
8517 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8518 (i386_remove_point): Convert the packet number to a
8519 target_hw_bp_type before calling i386_low_remove_watchpoint.
8521 2014-04-23 Pedro Alves <palves@redhat.com>
8523 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8525 2014-04-10 Pedro Alves <palves@redhat.com>
8527 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8528 Check if the condition or command is NULL before checking if the
8529 breakpoint is known. On success, return true.
8530 * mem-break.h (add_breakpoint_condition): Document return.
8531 (add_breakpoint_commands): Add describing comment.
8532 * server.c (skip_to_semicolon): New function.
8533 (process_point_options): Use it.
8535 2014-04-09 Pedro Alves <palves@redhat.com>
8537 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8540 2014-02-27 Pedro Alves <palves@redhat.com>
8543 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8545 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8547 (last_thread_of_process_p): Take a PID argument instead of a
8549 (linux_wait_for_lwp): Delete.
8550 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8552 (linux_low_filter_event): New function, party factored out from
8553 linux_wait_for_event.
8554 (linux_wait_for_event): Rename to ...
8555 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8556 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8557 sigsuspend. Check for zombie leaders.
8558 (linux_wait_for_event): Reimplement as wrapper around
8559 linux_wait_for_event_filtered.
8560 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8561 a normal or signal exit is seen, it's the whole process exiting.
8562 (wait_for_sigstop): No longer a for_each_inferior callback.
8563 Rewrite on top of linux_wait_for_event_filtered.
8564 (stop_all_lwps): Call wait_for_sigstop directly.
8565 * server.c (resume, handle_target_event): Handle
8566 TARGET_WAITKIND_NO_RESUMED.
8568 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8570 * win32-low.c (psapi_get_dll_name,
8571 * win32_CreateToolhelp32Snapshot): Delete.
8572 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8573 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8575 (handle_load_dll): Add function description.
8576 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8578 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8580 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8582 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8583 base address when calling win32_add_one_solib.
8584 (handle_load_dll): Delete local variable load_addr.
8585 Remove 0x1000 offset applied to DLL base address when calling
8586 win32_add_one_solib.
8587 (handle_unload_dll): Add comment.
8589 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8591 * win32-low.c (win32_add_all_dlls): Renames
8592 win32_ensure_ntdll_loaded. Rewrite function documentation.
8593 Adjust implementation to always load all DLLs.
8594 Add 0x1000 offset to DLL base address when calling
8595 win32_add_one_solib.
8596 (child_initialization_done): New static global.
8597 (do_initial_child_stuff): Set child_initialization_done to
8598 zero during child initialization, and 1 after. Replace call
8599 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8601 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8602 (handle_unload_dll): Add function documentation.
8603 (get_child_debug_event): Ignore load and unload DLL events
8604 during child initialization.
8606 2014-02-20 Doug Evans <dje@google.com>
8608 Remove global all_lwps.
8609 * inferiors.h (ptid_of): Move here from linux-low.h.
8610 (pid_of, lwpid_of): Ditto.
8611 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8612 parameter is a struct thread_info * now.
8613 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8614 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8615 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8617 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8618 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8619 * linux-arm-low.c (update_registers_callback): Update, "entry"
8620 parameter is a struct thread_info * now.
8621 Fetch lwpid from current_inferior directly.
8622 (arm_insert_point): Pass &all_threads to find_inferior instead of
8624 (arm_remove_point): Ditto.
8625 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8626 (arm_prepare_to_resume): Fetch pid from thread.
8627 (arm_read_description): Fetch lwpid from current_inferior directly.
8628 * linux-low.c (all_lwps): Delete.
8629 (delete_lwp): Delete call to remove_inferior.
8630 (handle_extended_wait): Fetch lwpid from thread.
8631 (add_lwp): Don't set lwp->entry.id. Remove call to
8632 add_inferior_to_list.
8633 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8634 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8635 (kill_one_lwp_callback): Ditto.
8636 (linux_kill): Don't dereference NULL pointer.
8637 Fetch ptid,lwpid from thread.
8638 (get_detach_signal): Fetch ptid from thread.
8639 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8640 Simplify call to regcache_invalidate_thread.
8641 (delete_lwp_callback): Update, "entry" parameter is a
8642 struct thread_info * now. Fetch pid from thread.
8643 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8644 (status_pending_p_callback): Update, "entry" parameter is a
8645 struct thread_info * now. Fetch ptid from thread.
8646 (find_lwp_pid): Update, "entry" parameter is a
8647 struct thread_info * now.
8648 (linux_wait_for_lwp): Fetch pid from thread.
8649 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8650 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8651 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8652 (dequeue_one_deferred_signal): Ditto.
8653 (cancel_breakpoint): Fetch ptid from current_inferior.
8654 (linux_wait_for_event): Pass &all_threads to find_inferior,
8655 not &all_lwps. Fetch ptid, lwpid from thread.
8656 (count_events_callback): Update, "entry" parameter is a
8657 struct thread_info * now.
8658 (select_singlestep_lwp_callback): Ditto.
8659 (select_event_lwp_callback): Ditto.
8660 (cancel_breakpoints_callback): Ditto.
8661 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8663 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8664 (unsuspend_one_lwp): Update, "entry" parameter is a
8665 struct thread_info * now.
8666 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8668 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8669 Fetch lwpid from thread, not lwp.
8670 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8671 Pass &all_threads to find_inferior, not &all_lwps.
8672 (send_sigstop): Fetch lwpid from thread, not lwp.
8673 (send_sigstop_callback): Update, "entry" parameter is a
8674 struct thread_info * now.
8675 (suspend_and_send_sigstop_callback): Ditto.
8676 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8677 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8678 struct thread_info * now.
8679 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8681 (lwp_running): Update, "entry" parameter is a
8682 struct thread_info * now.
8683 (stop_all_lwps): Fetch ptid from thread.
8684 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8685 (linux_resume_one_lwp): Fetch lwpid from thread.
8686 (linux_set_resume_request): Update, "entry" parameter is a
8687 struct thread_info * now. Fetch pid, lwpid from thread.
8688 (resume_status_pending_p): Update, "entry" parameter is a
8689 struct thread_info * now.
8690 (need_step_over_p): Ditto. Fetch lwpid from thread.
8691 (start_step_over): Fetch lwpid from thread.
8692 (linux_resume_one_thread): Update, "entry" parameter is a
8693 struct thread_info * now. Fetch lwpid from thread.
8694 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8695 (proceed_one_lwp): Update, "entry" parameter is a
8696 struct thread_info * now. Fetch lwpid from thread.
8697 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8698 struct thread_info * now.
8699 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8700 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8701 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8703 (regsets_store_inferior_registers): Ditto.
8704 (fetch_register, store_register): Ditto.
8705 (linux_read_memory, linux_write_memory): Ditto.
8706 (linux_request_interrupt): Ditto.
8707 (linux_read_auxv): Ditto.
8708 (linux_xfer_siginfo): Ditto.
8709 (linux_qxfer_spu): Ditto.
8710 (linux_qxfer_libraries_svr4): Ditto.
8711 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8712 moved to inferiors.h.
8714 (get_thread_lwp): Update.
8715 (struct lwp_info): Delete member "entry". Simplify comment for
8718 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8719 current_inferior directly.
8720 (update_watch_registers_callback): Update, "entry" parameter is a
8721 struct thread_info * now. Fetch pid from thread.
8722 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8723 (mips_insert_point): Fetch lwpid from current_inferior.
8724 Pass &all_threads to find_inferior, not &all_lwps.
8725 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8726 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8728 (mips_stopped_data_address): Ditto.
8729 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8731 * linux-tile-low.c (tile_arch_setup): Ditto.
8732 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8733 (update_debug_registers_callback): Update, "entry" parameter is a
8734 struct thread_info * now. Fetch pid from thread.
8735 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8736 Pass &all_threads to find_inferior, not &all_lwps.
8737 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8738 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8739 Pass &all_threads to find_inferior, not &all_lwps.
8740 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8741 (i386_dr_low_get_status): Ditto.
8742 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8743 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8744 (x86_linux_read_description): Ditto.
8745 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8747 2014-02-20 Doug Evans <dje@google.com>
8749 * inferiors.c (get_first_inferior): Fix buglet.
8751 2014-02-19 Doug Evans <dje@google.com>
8753 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8754 * inferiors.c (add_thread): Change result type to struct thread_info *.
8755 All callers updated.
8756 (add_lwp): Call add_thread here instead of in callers.
8757 All callers updated.
8758 * linux-low.h (get_lwp_thread): Rewrite.
8759 (struct lwp_info): New member "thread".
8761 2014-02-19 Doug Evans <dje@google.com>
8763 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8764 All callers updated.
8766 2014-02-19 Doug Evans <dje@google.com>
8768 * inferiors.c (add_thread): Fix whitespace.
8770 2014-02-19 Doug Evans <dje@google.com>
8772 * dll.c (clear_dlls): Replace accessing list implemention details
8774 * gdbthread.h (get_first_thread): Declare.
8775 * inferiors.c (for_each_inferior_with_data): New function.
8776 (get_first_thread): New function.
8777 (find_thread_ptid): Simplify.
8778 (get_first_inferior): New function.
8779 (clear_list): Delete.
8780 (one_inferior_p): New function.
8781 (clear_inferior_list): New function.
8782 (clear_inferiors): Update.
8783 * inferiors.h (for_each_inferior_with_data): Declare.
8784 (clear_inferior_list): Declare.
8785 (one_inferior_p): Declare.
8786 (get_first_inferior): Declare.
8787 * linux-low.c (linux_wait_for_event): Replace accessing list
8788 implemention details with API function.
8789 * server.c (target_running): Ditto.
8790 (accumulate_file_name_length): New function.
8791 (emit_dll_description): New function.
8792 (handle_qxfer_libraries): Replace accessing list implemention
8793 details with API function.
8794 (handle_qxfer_threads_worker): New function.
8795 (handle_qxfer_threads_proper): Replace accessing list implemention
8796 details with API function.
8797 (handle_query): Ditto.
8798 (visit_actioned_threads_callback_ftype): New typedef.
8799 (visit_actioned_threads_data): New struct.
8800 (visit_actioned_threads): Rewrite to be find_inferior callback.
8801 (resume): Call find_inferior.
8802 (handle_status): Replace accessing list implemention
8803 details with API function.
8804 (process_serial_event): Replace accessing list implemention details
8806 * target.c (set_desired_inferior): Replace accessing list implemention
8807 details with API function.
8808 * tracepoint.c (same_process_p): New function.
8809 (gdb_agent_about_to_close): Replace accessing list implemention
8810 details with API function.
8811 * win32-low.c (child_delete_thread): Replace accessing list
8812 implemention details with API function.
8813 (match_dll_by_basename): New function.
8814 (dll_is_loaded_by_basename): New function.
8815 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8816 details call to dll_is_loaded_by_basename.
8818 2014-02-19 Doug Evans <dje@google.com>
8820 * dll.h (struct dll_info): Add comment.
8821 * gdbthread.h (struct thread_info): Add comment.
8822 (current_ptid): Simplify.
8823 * inferiors.c (add_process): Update.
8824 (remove_process): Update.
8825 * inferiors.h (struct process_info): Rename member "head" to "entry".
8826 * linux-low.c (delete_lwp): Update.
8828 (last_thread_of_process_p): Update.
8829 (kill_one_lwp_callback, linux_kill): Update.
8830 (status_pending_p_callback): Update.
8831 (wait_for_sigstop): Update. Simplify read of ptid.
8832 (start_step_over): Update.
8833 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8834 (get_lwp_thread): Update.
8835 (struct lwp_info): Rename member "head" to "entry".
8836 * regcache.h (inferior_list_entry): Delete.
8837 * server.c (kill_inferior_callback): Update.
8838 (detach_or_kill_inferior_callback): Update.
8839 (print_started_pid): Update.
8840 (print_attached_pid): Update.
8841 (process_serial_event): Simplify read of ptid.
8842 * thread-db.c (thread_db_create_event): Update.
8843 (thread_db_get_tls_address): Update.
8844 * win32-low.c (current_inferior_ptid): Simplify.
8846 2014-02-19 Tom Tromey <tromey@redhat.com>
8848 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8850 (target_supports_btrace): Update.
8852 2014-02-14 Yao Qi <yao@codesourcery.com>
8854 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8855 (rsp-low-ipa.o): New target.
8857 2014-02-12 Tom Tromey <tromey@redhat.com>
8859 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8860 convert_ascii_to_int.
8861 * regcache.c (registers_to_string): Likewise.
8862 * remote-utils.c (decode_M_packet): Likewise.
8863 * server.c (process_serial_event): Likewise.
8865 2014-02-12 Tom Tromey <tromey@redhat.com>
8867 * server.c (handle_query, handle_v_run): Use hex2bin, not
8869 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8871 2014-02-12 Tom Tromey <tromey@redhat.com>
8873 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8874 convert_int_to_ascii.
8875 * regcache.c (registers_to_string, collect_register_as_string):
8877 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8879 * server.c (process_serial_event): Likewise.
8880 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8881 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8883 2014-02-12 Tom Tromey <tromey@redhat.com>
8885 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8886 bin2hex, not hexify.
8887 * tracepoint.c (cmd_qtstatus): Likewise.
8889 2014-02-12 Tom Tromey <tromey@redhat.com>
8891 * remote-utils.c (monitor_output): Pass explicit length to
8894 2014-02-12 Tom Tromey <tromey@redhat.com>
8896 * tracepoint.c: Include rsp-low.h.
8897 * server.c: Include rsp-low.h.
8898 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8899 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8901 * remote-utils.c: Include rsp-low.h.
8902 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8903 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8904 (convert_int_to_ascii, convert_ascii_to_int): Move to
8906 * regcache.c: Include rsp-low.h.
8907 * ax.c: Include rsp-low.h.
8908 * Makefile.in (SFILES): Add common/rsp-low.c.
8909 (OBS): Add rsp-low.o.
8910 (rsp-low.o): New target.
8912 2014-02-12 Tom Tromey <tromey@redhat.com>
8914 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8915 Include print-utils.h.
8916 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8917 (plongest, thirty_two, phex_nz): Remove.
8918 * Makefile.in (SFILES): Add common/print-utils.c.
8919 (OBS): Add print-utils.o.
8920 (print-utils-ipa.o): New target.
8921 (print-utils.o): New target.
8922 (IPA_OBJS): Add print-utils-ipa.o.
8924 2014-02-06 Tom Tromey <tromey@redhat.com>
8926 * Makefile.in (SFILES): Fix indentation.
8928 2014-02-05 Doug Evans <dje@google.com>
8930 * linux-low.c (linux_wait_for_event): Improve comment.
8931 (linux_wait_1): Keep current_inferior in sync with event_child.
8933 2014-01-22 Doug Evans <dje@google.com>
8935 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8937 2014-01-22 Doug Evans <dje@google.com>
8939 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8940 * configure: Regenerate.
8941 * config.in: Regenerate.
8942 * Makefile.in (SFILES): Add debug.c.
8944 * debug.c: New file.
8945 * debug.h: New file.
8946 * linux-aarch64-low.c (*): Update all debugging printfs to use
8947 debug_printf instead of fprintf.
8948 * linux-arm-low.c (*): Ditto.
8949 * linux-cris-low.c (*): Ditto.
8950 * linux-crisv32-low.c (*): Ditto.
8951 * linux-m32r-low.c (*): Ditto.
8952 * linux-sparc-low.c (*): Ditto.
8953 * linux-x86.c (*): Ditto.
8954 * linux-low.c (*): Ditto.
8955 (linux_wait_1): Add calls to debug_enter, debug_exit.
8956 (linux_wait): Remove redundant debugging printf.
8957 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8958 (linux_resume, unstop_all_lwps): Ditto.
8959 * mem-break.c (*): Update all debugging printfs to use
8960 debug_printf instead of fprintf.
8961 * remote-utils.c (*): Ditto.
8962 * thread-db.c (*): Ditto.
8963 * server.c #include <ctype.h>, "gdb_vecs.h".
8964 (debug_threads): Moved to debug.c.
8965 (*): Update all debugging printfs to use debug_printf instead of
8967 (start_inferior): Replace call to fflush with call to debug_flush.
8968 (monitor_show_help): Mention set debug-format.
8969 (parse_debug_format_options): New function.
8970 (handle_monitor_command): Handle "monitor set debug-format".
8971 (gdbserver_usage): Mention --debug-format.
8972 (main): Parse --debug-format.
8973 * server.h (debug_threads): Declaration moved to debug.h.
8975 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8976 trace_debug_1 that uses debug_printf.
8977 (tracepoint_look_up_symbols): Update all debugging printfs to use
8978 debug_printf instead of fprintf.
8980 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8982 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8985 2014-01-17 Pedro Alves <palves@redhat.com>
8988 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8989 defined after including gdb_proc_service.h.
8991 2014-01-16 Doug Evans <dje@google.com>
8993 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8994 (match_dll): Use it.
8996 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8998 * target.h (target_ops) <read_btrace>: Change parameters and
8999 return type to allow error reporting.
9000 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9001 trace reading errors on.
9002 * linux-low.c (linux_low_read_btrace): Pass trace reading
9004 (linux_low_disable_btrace): New.
9006 2014-01-15 Doug Evans <dje@google.com>
9008 * inferiors.c (thread_id_to_gdb_id): Delete.
9009 * inferiors.h (thread_id_to_gdb_id): Delete.
9011 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9013 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9014 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9017 2014-01-08 Pedro Alves <palves@redhat.com>
9019 * server.c (handle_status): Don't discard previous queued stop
9020 replies or thread's pending status here.
9021 (main) <disconnection>: Do it here instead.
9023 2014-01-08 Pedro Alves <palves@redhat.com>
9025 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9026 * server.c (visit_actioned_threads, handle_pending_status): New
9028 (handle_v_cont): Factor out parts to ...
9029 (resume): ... this new function. If in all-stop, and a thread
9030 being resumed has a pending status, report it without actually
9032 (myresume): Adjust to use the new 'resume' function.
9033 (clear_pending_status_callback, set_pending_status_callback)
9034 (find_status_pending_thread_callback): New functions.
9035 (handle_status): Handle the case of multiple threads having
9036 interesting statuses to report. Report threads' real last signal
9037 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9038 with an interesting thread to report the status for, instead of
9039 always reporting the status of the first thread.
9041 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9043 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9044 * gdbreplay.c (gdbreplay_version): Likewise.
9046 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9048 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9049 iov.iov_len with the real length in use.
9051 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9053 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9054 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9055 for all targets that use win32-low.c.
9056 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9057 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9059 2013-12-13 Pedro Alves <palves@redhat.com>
9061 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9062 if equal to TARGET_WAITKIND_LOADED.
9063 * win32-low.c (cached_status): New static global.
9064 (win32_wait): Add declaration.
9065 (do_initial_child_stuff): Flush all initial pending debug events
9066 up to the initial breakpoint.
9067 (win32_wait): If CACHED_STATUS was set, return that instead
9068 of doing a real wait. Remove the code resuming the execution
9069 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9070 during the initial phase. Also remove the code changing
9071 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9072 TARGET_WAITKIND_STOPPED.
9074 2013-12-11 Yao Qi <yao@codesourcery.com>
9076 * notif.c (handle_notif_ack): Return 0 if no notification
9079 2013-11-20 Doug Evans <dje@google.com>
9081 * linux-low.c (linux_set_resume_request): Fix comment.
9083 2013-11-20 Doug Evans <dje@google.com>
9085 * linux-low.c (resume_status_pending_p): Tweak comment.
9087 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9089 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9090 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9091 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9092 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9093 (srv_amd64_regobj): Add amd64-mpx.o.
9094 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9095 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9096 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9097 * i387-fp.c (num_pl_bnd_register) Added constant.
9098 (num_pl_bnd_cfg_registers) Added constant.
9099 (struct i387_xsave) Added reserved area and MPX fields.
9100 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9101 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9103 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9104 (init_registers_amd64_mpx_linux): Declare new function.
9105 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9106 (x86_64_regmap): Add MPX registers.
9107 (x86_linux_read_description): Add MPX case.
9108 (initialize_low_arch): Initialize MPX targets.
9110 2013-11-18 Tom Tromey <tromey@redhat.com>
9112 * configure: Rebuild.
9113 * configure.ac: Don't check for stdlib.h.
9114 * gdbreplay.c: Unconditionally include stdlib.h.
9116 2013-11-18 Tom Tromey <tromey@redhat.com>
9118 * config.in: Rebuild.
9119 * configure: Rebuild.
9120 * configure.ac: Don't use AC_HEADER_DIRENT.
9122 2013-11-18 Tom Tromey <tromey@redhat.com>
9124 * server.h: Don't check HAVE_STRING_H.
9125 * gdbreplay.c: Don't check HAVE_STRING_H.
9126 * configure: Rebuild.
9128 2013-11-18 Tom Tromey <tromey@redhat.com>
9130 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9133 2013-11-08 Tom Tromey <tromey@redhat.com>
9135 * configure, config.in: Rebuild.
9136 * configure.ac: Remove unused configury.
9138 2013-11-08 Tom Tromey <tromey@redhat.com>
9140 * acinclude.m4: Include common.m4, codeset.m4.
9141 * configure, config.in: Rebuild.
9142 * configure.ac: Use GDB_AC_COMMON.
9144 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9146 * linux-s390-low.c (HWCAP_S390_TE): New define.
9147 (s390_arch_setup): Consider the TE field in the HWCAP for
9148 determining 'have_regset_tdb'.
9150 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9153 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9156 2013-10-02 Pedro Alves <palves@redhat.com>
9158 * server.c (process_serial_event): Don't output "GDBserver
9159 exiting" if GDB is connected through stdio.
9160 * target.c (mywait): Likewise, be silent if GDB is connected
9163 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9165 * lynx-low.c (lynx_add_threads_after_attach): New function.
9166 (lynx_attach): Remove call to add_thread. Add call to
9167 lynx_add_threads_after_attach instead.
9169 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9171 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9172 * config.in, configure: Regenerated.
9174 2013-09-18 Yao Qi <yao@codesourcery.com>
9177 * server.c (start_inferior): Clear 'resume_info'.
9179 2013-09-16 Jiong Wang <jiwang@tilera.com>
9181 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9184 2013-09-16 Jiong Wang <jiwang@tilera.com>
9186 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9187 linux-tile-low.o to srv_tgtobj.
9189 2013-09-16 Will Newton <will.newton@linaro.org>
9191 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9194 2013-09-06 Pedro Alves <palves@redhat.com>
9196 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9197 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9198 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9199 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9200 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9201 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9203 2013-09-06 Pedro Alves <palves@redhat.com>
9205 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9206 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9208 2013-09-06 Pedro Alves <palves@redhat.com>
9210 * linux-amd64-ipa.c: Include tracepoint.h.
9211 * linux-i386-ipa.c: Include tracepoint.h.
9213 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9215 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9216 (ps_get_thread_area): New function.
9218 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9220 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9221 (initialize_low_arch): Call init_registers_crisv32 rather than
9222 init_register_crisv32.
9224 2013-09-05 Pedro Alves <palves@redhat.com>
9226 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9228 * hostio.h: ... this new file.
9229 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9230 win32-low.c: Include hostio.h.
9232 2013-09-05 Pedro Alves <palves@redhat.com>
9234 * server.h (gdb_client_data, handler_func, callback_handler_func)
9235 (delete_file_handler, add_file_handler, append_callback_event)
9236 (delete_callback_event, start_event_loop, initialize_event_loop):
9237 Move to event-loop.h and include it.
9238 * event-loop.h: New file.
9240 2013-09-05 Pedro Alves <palves@redhat.com>
9242 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9243 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9244 (loaded_dll, unloaded_dll): Move to ...
9245 * dll.h: ... this new file.
9246 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9248 2013-09-05 Pedro Alves <palves@redhat.com>
9250 * server.h (current_process, get_thread_process, all_processes)
9251 (add_inferior_to_list, for_each_inferior, current_inferior)
9252 (remove_inferior, add_process, remove_process, find_process_pid)
9253 (have_started_inferiors_p, have_attached_inferiors_p)
9254 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9255 (clear_inferiors, find_inferior, find_inferior_id)
9256 (inferior_target_data, set_inferior_target_data)
9257 (inferior_regcache_data, set_inferior_regcache_data): Move to
9258 inferiors.h, and include it.
9259 * inferiors.h: New file.
9261 2013-09-05 Pedro Alves <palves@redhat.com>
9263 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9267 2013-09-05 Pedro Alves <palves@redhat.com>
9269 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9271 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9272 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9273 (handle_tracepoint_general_set, handle_tracepoint_query)
9274 (tracepoint_finished_step, tracepoint_was_hit)
9275 (release_while_stepping_state_list, current_traceframe)
9276 (in_readonly_region, traceframe_read_mem)
9277 (fetch_traceframe_registers, traceframe_read_sdata)
9278 (traceframe_read_info, struct fast_tpoint_collect_status)
9279 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9280 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9281 (supply_fast_tracepoint_registers)
9282 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9283 (ipa_tdesc, claim_trampoline_space)
9284 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9285 (agent_mem_read, agent_get_trace_state_variable_value)
9286 (agent_set_trace_state_variable_value, agent_tsv_read)
9287 (agent_mem_read_string, get_raw_reg_func_addr)
9288 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9289 * tracepoint.h: ... this new file.
9291 2013-09-05 Pedro Alves <palves@redhat.com>
9293 * server.h (perror_with_name, error, fatal, warning, paddress)
9294 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9296 * utils.h: New file.
9298 2013-09-05 Pedro Alves <palves@redhat.com>
9300 * server.h (remote_debug, noack_mode, transport_is_reliable)
9301 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9302 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9303 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9304 (write_enn, initialize_async_io, enable_async_io)
9305 (disable_async_io, check_remote_input_interrupt_request)
9306 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9307 (dead_thread_notify, prepare_resume_reply)
9308 (decode_address_to_semicolon, decode_address, decode_m_packet)
9309 (decode_M_packet, decode_X_packet, decode_xfer_write)
9310 (decode_search_memory_packet, unhexify, hexify)
9311 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9312 (look_up_one_symbol, relocate_instruction)
9313 (monitor_output): Move to remote-utils.h, and include it.
9314 * remote-utils.h: New file.
9316 2013-09-05 Pedro Alves <palves@redhat.com>
9318 * server.h (_): Delete.
9320 2013-09-02 Pedro Alves <palves@redhat.com>
9322 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9323 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9325 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9327 2013-09-02 Pierre Muller <muller@sourceware.org>
9329 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9330 or WriteProcessMemory complete successfully and handle
9331 ERROR_PARTIAL_COPY error.
9333 2013-09-02 Pedro Alves <palves@redhat.com>
9335 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9336 error instead of EIO.
9338 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9341 * linux-low.c: Include filestuff.h.
9342 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9343 * lynx-low.c: Include filestuff.h.
9344 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9345 * server.c: Include filestuff.h.
9346 (main): Call notice_open_fds.
9347 * spu-low.c: Include filestuff.h.
9348 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9350 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9352 * Makefile.in: Explain why ../target and ../nat are not
9353 listed as include file search paths.
9354 (linux-waitpid.o): New object file rule.
9355 * configure.srv (srv_native_linux_obj): New variable.
9356 Replace all occurrences of linux native object files with
9357 $srv_native_linux_obj.
9358 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9359 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9360 (linux_enable_event_reporting): Remove declaration.
9361 (my_waitpid): Moved to common/linux-waitpid.c.
9362 (linux_wait_for_event): Pass ptid when calling
9363 linux_enable_event_reporting.
9364 (linux_supports_tracefork_flag): Remove.
9365 (linux_enable_event_reporting): Likewise.
9366 (linux_tracefork_grandchild): Remove.
9367 (STACK_SIZE): Moved to common/linux-ptrace.c.
9368 (linux_tracefork_child): Remove.
9369 (linux_test_for_tracefork): Remove.
9370 (linux_look_up_symbols): Call linux_supports_traceclone.
9371 (initialize_low): Remove call to linux_test_for_tracefork.
9372 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9373 common/linux-ptrace.h.
9374 (PTRACE_TYPE_ARG4): Likewise.
9375 Include linux-ptrace.h.
9377 2013-08-21 Pedro Alves <palves@redhat.com>
9379 * config.in: Renegerate.
9381 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9383 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9384 (SFILES): Remove $(srcdir)/common/target-common.c and
9385 add $(srcdir)/target/waitstatus.c.
9386 (OBS): Remove target-common.o and add waitstatus.o.
9387 (server_h): Remove $(srcdir)/../common/target-common.h and
9388 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9389 and $(srcdir)/../target/waitstatus.h.
9390 (target-common.o): Remove.
9391 (waitstatus.o): New target object file.
9392 * target.h: Do not include target-common.h and
9393 include target/resume.h, target/wait.h and
9394 target/waitstatus.h.
9396 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9398 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9399 to PTRACE_TYPE_ARG3.
9400 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9401 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9403 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9404 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9406 2013-07-27 Jie Zhang <jie@codesourcery.com>
9407 Daniel Jacobowitz <dan@codesourcery.com>
9408 Yao Qi <yao@codesourcery.com>
9410 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9411 (mips-linux-watch.o): New rule.
9412 (mips_linux_watch_h): New variable.
9413 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9415 * linux-mips-low.c: Include mips-linux-watch.h.
9416 (struct arch_process_info, struct arch_lwp_info): New.
9417 (update_watch_registers_callback): New function.
9418 (mips_linux_new_process, mips_linux_new_thread) New functions.
9419 (mips_linux_prepare_to_resume, mips_insert_point): New
9421 (mips_remove_point, mips_stopped_by_watchpoint): New
9423 (rsp_bp_type_to_target_hw_bp_type): New function.
9424 (mips_stopped_data_address): New function.
9425 (the_low_target): Add watchpoint support functions.
9427 2013-07-27 Yao Qi <yao@codesourcery.com>
9429 * i386-low.c: Include break-common.h.
9430 (enum target_hw_bp_type): Remove.
9432 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9434 * Makefile.in (SFILES): /common/target-common.c.
9435 (OBS): Add target-common.o.
9436 (server_h): Add $(srcdir)/../common/target-common.h.
9437 (target-common.o): New target.
9438 * server.c (queue_stop_reply_callback): Free
9439 status string after use.
9440 * target.c (target_waitstatus_to_string): Remove.
9441 * target.h: Include target-common.h.
9442 (resume_kind): Likewise.
9443 (target_waitkind): Likewise.
9444 (target_waitstatus): Likewise.
9445 (TARGET_WNOHANG): Likewise.
9447 2013-07-04 Yao Qi <yao@codesourcery.com>
9449 * Makefile.in (host_alias): Use @host_noncanonical@.
9450 (target_alias): Use @target_noncanonical@.
9451 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9452 ACX_NONCANONICAL_HOST.
9453 * configure: Regenerated.
9456 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9458 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9459 * configure: Rebuild.
9460 * Makefile.in (version_host, version_target): Get from configure.
9461 (version.c): Use $(version_host) and $(version_target).
9463 2013-07-03 Pedro Alves <palves@redhat.com>
9465 * Makefile.in (config.status): Depend on development.sh.
9466 * acinclude.m4: Include libmcheck.m4.
9467 * configure: Regenerate.
9469 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9471 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9472 attribute inside the parentheses.
9473 (winapi_DebugSetProcessKillOnExit): Ditto.
9474 (winapi_DebugBreakProcess): Ditto.
9475 (winapi_GenerateConsoleCtrlEvent): Ditto.
9477 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9479 * notif.h (notif_event): Add a dummy member to avoid compiler
9482 2013-07-01 Pedro Alves <palves@redhat.com>
9484 * hostio.c (HOSTIO_PATH_MAX): Define.
9485 (require_filename, handle_open, handle_unlink, handle_readlink):
9488 2013-07-01 Pedro Alves <palves@redhat.com>
9490 * server.h: Include "pathmax.h".
9491 * linux-low.c: Don't include sys/param.h.
9492 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9494 * win32-low.c: Don't include sys/param.h.
9495 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9497 2013-07-01 Pedro Alves <palves@redhat.com>
9499 * event-loop.c: Don't check HAVE_UNISTD_H before including
9501 * gdbreplay.c: Likewise.
9502 * remote-utils.c: Likewise.
9503 * server.c: Likewise.
9504 * configure.ac: Don't check for unistd.h.
9505 * configure: Regenerate.
9507 2013-06-28 Tom Tromey <tromey@redhat.com>
9509 * Makefile.in (version.c): Use version.in, not
9512 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9514 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9515 * configure: Rebuild.
9516 * Makefile.in (version_host, version_target): Get from configure.
9517 (version.c): Use $(version_host) and $(version_target).
9519 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9521 Fix trace-status to output user name without trailing colon.
9522 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9524 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9526 Fix trace-status to output proper start-time and stop-time.
9527 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9528 output start time and stop time in hex as gdb expects.
9530 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9532 * tracepoint.c (build_traceframe_info_xml): Output trace state
9533 variables present in the trace buffer.
9535 2013-06-24 Tom Tromey <tromey@redhat.com>
9537 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9539 (version.o): Remove.
9540 * gdbreplay.c: Include version.h.
9541 (version, host_name): Don't declare.
9542 * server.h: Include version.h.
9543 (version, host_name): Don't declare.
9545 2013-06-12 Pedro Alves <palves@redhat.com>
9547 * linux-x86-low.c (linux_is_elf64): Delete global.
9548 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9549 with local linux_pid_exe_is_elf_64_file use.
9551 2013-06-11 Pedro Alves <palves@redhat.com>
9553 * linux-low.c (regset_disabled, disable_regset): New functions.
9554 (regsets_fetch_inferior_registers)
9555 (regsets_store_inferior_registers): Use them.
9556 (initialize_regsets_info); Don't allocate the disabled_regsets
9558 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9561 2013-06-11 Pedro Alves <palves@redhat.com>
9563 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9566 2013-06-11 Pedro Alves <palves@redhat.com>
9568 * linux-x86-low.c (initialize_low_arch): Call
9569 init_registers_x32_avx_linux.
9571 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9573 Fix compatibility with Android Bionic.
9574 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9577 2013-06-07 Pedro Alves <palves@redhat.com>
9580 * Makefile.in (OBS): Add tdesc.o.
9581 (IPA_OBJS): Add tdesc-ipa.o.
9582 (tdesc-ipa.o): New rule.
9583 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9585 * linux-low.c (new_inferior): Delete.
9586 (disabled_regsets, num_regsets): Delete.
9587 (linux_add_process): Adjust to set the new per-process
9589 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9590 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9591 was a stop. When calling arch_setup, switch the current inferior
9592 to the thread that got an event.
9593 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9594 (regsets_fetch_inferior_registers)
9595 (regsets_store_inferior_registers): New regsets_info parameter.
9597 (linux_register_in_regsets): New regs_info parameter. Adjust to
9599 (register_addr, fetch_register, store_register): New usrregs_info
9600 parameter. Adjust to use it.
9601 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9602 parameter regs_info. Adjust to use it.
9603 (linux_fetch_registers): Get the current inferior's regs_info, and
9605 (linux_store_registers): Ditto.
9606 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9607 (initialize_low): Don't initialize the target_regsets here. Call
9608 initialize_low_arch.
9609 * linux-low.h (target_regsets): Delete declaration.
9610 (struct regsets_info): New.
9611 (struct usrregs_info): New.
9612 (struct regs_info): New.
9613 (struct process_info_private) <new_inferior>: New field.
9614 (struct linux_target_ops): Delete the num_regs, regmap, and
9615 regset_bitmap fields. New field regs_info.
9616 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9617 * i387-fp.c (num_xmm_registers): Delete.
9618 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9619 calls to new interface.
9620 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9621 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9622 Infer the number of xmm registers from the regcache's target
9624 * i387-fp.h (num_xmm_registers): Delete.
9625 * inferiors.c (add_thread): Don't install the thread's regcache
9627 * proc-service.c (gregset_info): Fetch the current inferior's
9628 regs_info. Adjust to use it.
9629 * regcache.c: Include tdesc.h.
9630 (register_bytes, reg_defs, num_registers)
9631 (gdbserver_expedite_regs): Delete.
9632 (get_thread_regcache): If the thread doesn't have a regcache yet,
9633 create one, instead of aborting gdbserver.
9634 (regcache_invalidate_one): Rename to ...
9635 (regcache_invalidate_thread): ... this.
9636 (regcache_invalidate_one): New.
9637 (regcache_invalidate): Only invalidate registers of the current
9639 (init_register_cache): Add target_desc parameter, and use it.
9640 (new_register_cache): Ditto. Assert the target description has a
9641 non zero registers_size.
9642 (regcache_cpy): Add assertions. Adjust.
9643 (realloc_register_cache, set_register_cache): Delete.
9644 (registers_to_string, registers_from_string): Adjust.
9645 (find_register_by_name, find_regno, find_register_by_number)
9646 (register_cache_size): Add target_desc parameter, and use it.
9647 (free_register_cache_thread, free_register_cache_thread_one)
9648 (regcache_release, register_cache_size): New.
9649 (register_size): Add target_desc parameter, and use it.
9650 (register_data, supply_register, supply_register_zeroed)
9651 (supply_regblock, supply_register_by_name, collect_register)
9652 (collect_register_as_string, collect_register_by_name): Adjust.
9653 * regcache.h (struct target_desc): Forward declare.
9654 (struct regcache) <tdesc>: New field.
9655 (init_register_cache, new_register_cache): Add target_desc
9657 (regcache_invalidate_thread): Declare.
9658 (regcache_invalidate_one): Delete declaration.
9659 (regcache_release): Declare.
9660 (find_register_by_number, register_cache_size, register_size)
9661 (find_regno): Add target_desc parameter.
9662 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9664 * remote-utils.c: Include tdesc.h.
9665 (outreg, prepare_resume_reply): Adjust.
9666 * server.c: Include tdesc.h.
9667 (gdbserver_xmltarget): Delete declaration.
9668 (get_features_xml, process_serial_event): Adjust.
9669 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9671 (struct process_info) <tdesc>: New field.
9672 (ipa_tdesc): Declare.
9673 * tdesc.c: New file.
9674 * tdesc.h: New file.
9675 * tracepoint.c: Include tdesc.h.
9676 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9677 (get_context_regcache): Adjust to pass ipa_tdesc down.
9678 (do_action_at_tracepoint): Adjust to get the register cache size
9679 from the context regcache's description.
9680 (traceframe_walk_blocks): Adjust to get the register cache size
9681 from the current trace frame's description.
9682 (traceframe_get_pc): Adjust to get current trace frame's
9683 description and pass it down.
9684 (gdb_collect): Adjust to get the register cache size from the
9686 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9687 (gdbserver_xmltarget): Delete.
9688 (initialize_low_tracepoint): Set the ipa's target description.
9689 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9690 (initialize_low_tracepoint): Set the ipa's target description.
9691 * linux-x86-low.c: Include tdesc.h.
9692 [__x86_64__] (is_64bit_tdesc): New.
9693 (ps_get_thread_area, x86_get_thread_area): Use it.
9694 (i386_cannot_store_register): Rename to ...
9695 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9696 (i386_cannot_fetch_register): Rename to ...
9697 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9698 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9700 (target_regsets): Rename to ...
9701 (x86_regsets): ... this.
9702 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9704 (x86_siginfo_fixup): Use is_64bit_tdesc.
9705 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9706 (tdesc_x32_avx_linux, tdesc_x32_linux)
9707 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9709 (x86_linux_update_xmltarget): Delete.
9710 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9711 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9712 (AMD64_LINUX_USER64_CS): New.
9713 (x86_linux_read_description): New, based on
9714 x86_linux_update_xmltarget.
9715 (same_process_callback): New.
9716 (x86_arch_setup_process_callback): New.
9717 (x86_linux_update_xmltarget): New.
9718 (x86_regsets_info): New.
9719 (amd64_linux_regs_info): New.
9720 (i386_linux_usrregs_info): New.
9721 (i386_linux_regs_info): New.
9722 (x86_linux_regs_info): New.
9723 (x86_arch_setup): Reimplement.
9724 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9725 (x86_emit_ops): Ditto.
9726 (the_low_target): Adjust. Install x86_linux_regs_info,
9727 x86_cannot_fetch_register, and x86_cannot_store_register.
9728 (initialize_low_arch): New.
9729 * linux-ia64-low.c (tdesc_ia64): Declare.
9730 (ia64_fetch_register): Adjust.
9731 (ia64_usrregs_info, regs_info): New globals.
9732 (ia64_regs_info): New function.
9733 (the_low_target): Adjust.
9734 (initialize_low_arch): New function.
9735 * linux-sparc-low.c (tdesc_sparc64): Declare.
9736 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9738 (sparc_arch_setup): New function.
9739 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9740 (the_low_target): Adjust.
9741 (initialize_low_arch): New function.
9742 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9743 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9744 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9745 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9746 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9747 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9748 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9749 (tdesc_powerpc_isa205_vsx64l): Declare.
9750 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9751 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9752 (ppc_set_pc, ppc_get_hwcap): Adjust.
9753 (ppc_usrregs_info): Forward declare.
9754 (!__powerpc64__) ppc_regmap_adjusted: New global.
9755 (ppc_arch_setup): Adjust to the current process'es target
9757 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9758 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9759 (ppc_store_evrregset): Adjust.
9760 (target_regsets): Rename to ...
9761 (ppc_regsets): ... this, and make static.
9762 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9763 (ppc_regs_info): New function.
9764 (the_low_target): Adjust.
9765 (initialize_low_arch): New function.
9766 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9767 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9768 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9769 (tdesc_s390x_linux64v2): Declare.
9770 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9771 (s390_fill_gregset, s390_store_last_break): Adjust.
9772 (target_regsets): Rename to ...
9773 (s390_regsets): ... this, and make static.
9774 (s390_get_pc, s390_set_pc): Adjust.
9775 (s390_get_hwcap): New target_desc parameter, and use it.
9776 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9777 (s390_arch_setup): Adjust to set the current process'es target
9778 description. Don't adjust the regmap.
9779 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9780 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9781 (regs_info_3264): New globals.
9782 (s390_regs_info): New function.
9783 (the_low_target): Adjust.
9784 (initialize_low_arch): New function.
9785 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9786 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9787 [__mips64] (init_registers_mips_linux)
9788 (init_registers_mips_dsp_linux): Delete defines.
9789 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9790 (have_dsp): New global.
9791 (mips_read_description): New, based on mips_arch_setup.
9792 (mips_arch_setup): Reimplement.
9793 (get_usrregs_info): New function.
9794 (mips_cannot_fetch_register, mips_cannot_store_register)
9795 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9796 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9797 (target_regsets): Rename to ...
9798 (mips_regsets): ... this, and make static.
9799 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9800 (dsp_regs_info, regs_info): New globals.
9801 (mips_regs_info): New function.
9802 (the_low_target): Adjust.
9803 (initialize_low_arch): New function.
9804 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9805 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9807 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9808 (arm_read_description): New, with bits factored from
9810 (arm_arch_setup): Reimplement.
9811 (target_regsets): Rename to ...
9812 (arm_regsets): ... this, and make static.
9813 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9814 (arm_regs_info): New function.
9815 (the_low_target): Adjust.
9816 (initialize_low_arch): New function.
9817 * linux-m68k-low.c (tdesc_m68k): Declare.
9818 (target_regsets): Rename to ...
9819 (m68k_regsets): ... this, and make static.
9820 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9821 (m68k_regs_info): New function.
9822 (m68k_arch_setup): New function.
9823 (the_low_target): Adjust.
9824 (initialize_low_arch): New function.
9825 * linux-sh-low.c (tdesc_sharch): Declare.
9826 (target_regsets): Rename to ...
9827 (sh_regsets): ... this, and make static.
9828 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9829 (sh_regs_info, sh_arch_setup): New functions.
9830 (the_low_target): Adjust.
9831 (initialize_low_arch): New function.
9832 * linux-bfin-low.c (tdesc_bfin): Declare.
9833 (bfin_arch_setup): New function.
9834 (bfin_usrregs_info, regs_info): New globals.
9835 (bfin_regs_info): New function.
9836 (the_low_target): Adjust.
9837 (initialize_low_arch): New function.
9838 * linux-cris-low.c (tdesc_cris): Declare.
9839 (cris_arch_setup): New function.
9840 (cris_usrregs_info, regs_info): New globals.
9841 (cris_regs_info): New function.
9842 (the_low_target): Adjust.
9843 (initialize_low_arch): New function.
9844 * linux-cris-low.c (tdesc_crisv32): Declare.
9845 (cris_arch_setup): New function.
9846 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9847 (cris_regs_info): New function.
9848 (the_low_target): Adjust.
9849 (initialize_low_arch): New function.
9850 * linux-m32r-low.c (tdesc_m32r): Declare.
9851 (m32r_arch_setup): New function.
9852 (m32r_usrregs_info, regs_info): New globals.
9853 (m32r_regs_info): Adjust.
9854 (initialize_low_arch): New function.
9855 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9856 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9857 (tic6x_usrregs_info): Forward declare.
9858 (tic6x_read_description): New function, based on ...
9859 (tic6x_arch_setup): ... this. Reimplement.
9860 (target_regsets): Rename to ...
9861 (tic6x_regsets): ... this, and make static.
9862 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9863 (tic6x_regs_info): New function.
9864 (the_low_target): Adjust.
9865 (initialize_low_arch): New function.
9866 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9867 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9868 (target_regsets): Rename to ...
9869 (xtensa_regsets): ... this, and make static.
9870 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9872 (xtensa_arch_setup, xtensa_regs_info): New functions.
9873 (the_low_target): Adjust.
9874 (initialize_low_arch): New function.
9875 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9876 (nios2_arch_setup): Set the current process'es tdesc.
9877 (target_regsets): Rename to ...
9878 (nios2_regsets): ... this.
9879 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9880 (nios2_regs_info): New function.
9881 (the_low_target): Adjust.
9882 (initialize_low_arch): New function.
9883 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9884 (aarch64_arch_setup): Set the current process'es tdesc.
9885 (target_regsets): Rename to ...
9886 (aarch64_regsets): ... this.
9887 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9888 (aarch64_regs_info): New function.
9889 (the_low_target): Adjust.
9890 (initialize_low_arch): New function.
9891 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9893 (target_regsets): Rename to ...
9894 (tile_regsets): ... this.
9895 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9896 (tile_regs_info): New function.
9897 (tile_arch_setup): Set the current process'es tdesc.
9898 (the_low_target): Adjust.
9899 (initialize_low_arch): New function.
9900 * spu-low.c (tdesc_spu): Declare.
9901 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9902 * win32-arm-low.c (tdesc_arm): Declare.
9903 (arm_arch_setup): New function.
9904 (the_low_target): Install arm_arch_setup instead of
9906 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9907 (init_windows_x86): Rename to ...
9908 (i386_arch_setup): ... this. Set `win32_tdesc'.
9909 (the_low_target): Adjust.
9910 * win32-low.c (win32_tdesc): New global.
9911 (child_add_thread): Don't create the thread cache here.
9912 (do_initial_child_stuff): Set the new process'es tdesc.
9913 * win32-low.h (struct target_desc): Forward declare.
9914 (win32_tdesc): Declare.
9915 * lynx-i386-low.c (tdesc_i386): Declare global.
9916 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9917 * lynx-low.c (lynx_tdesc): New global.
9918 (lynx_add_process): Set the new process'es tdesc.
9919 * lynx-low.h (struct target_desc): Forward declare.
9920 (lynx_tdesc): Declare global.
9921 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9922 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9923 * nto-low.c (nto_tdesc): New global.
9924 (do_attach): Set the new process'es tdesc.
9925 * nto-low.h (struct target_desc): Forward declare.
9926 (nto_tdesc): Declare.
9927 * nto-x86-low.c (tdesc_i386): Declare.
9928 (nto_x86_arch_setup): Set `nto_tdesc'.
9930 2013-06-04 Gary Benson <gbenson@redhat.com>
9932 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9933 to qSupported response when appropriate.
9934 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9935 with nonzero-length annex.
9936 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9937 arguments supplied in annex.
9939 2013-05-31 Doug Evans <dje@google.com>
9942 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9943 64 bits in 64-cross-32 environment.
9945 2013-05-28 Pedro Alves <palves@redhat.com>
9947 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9948 (aarch64-without-fpu.c): Delete rule.
9949 * configure.srv (aarch64*-*-linux*): Remove references to
9950 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9951 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9954 2013-05-24 Pedro Alves <palves@redhat.com>
9956 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9957 instead of strchr/decode_address. Error if the range isn't split
9958 with a ','. Don't assume there's be a ':' in the action.
9960 2013-05-23 Yao Qi <yao@codesourcery.com>
9961 Pedro Alves <palves@redhat.com>
9963 * linux-low.c (lwp_in_step_range): New function.
9964 (linux_wait_1): If the thread was range stepping and stopped
9965 outside the stepping range, report the stop to GDB. Otherwise,
9966 continue stepping. Add range stepping debug output.
9967 (linux_set_resume_request): Copy the step range from the resume
9969 (linux_supports_range_stepping): New.
9970 (linux_target_ops) <supports_range_stepping>: Set to
9971 linux_supports_range_stepping.
9972 * linux-low.h (struct linux_target_ops)
9973 <supports_range_stepping>: New field.
9974 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9975 * linux-x86-low.c (x86_supports_range_stepping): New.
9976 (the_low_target) <supports_range_stepping>: Set to
9977 x86_supports_range_stepping.
9978 * server.c (handle_v_cont): Handle 'r' action.
9979 (handle_v_requests): Append ";r" if the target supports range
9981 * target.h (struct thread_resume) <step_range_start,
9982 step_range_end>: New fields.
9983 (struct target_ops) <supports_range_stepping>:
9985 (target_supports_range_stepping): New macro.
9987 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9989 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9990 confusion in comment.
9992 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9994 * lynx-low.c (struct process_info_private): New type.
9995 (lynx_add_process): New function.
9996 (lynx_create_inferior, lynx_attach): Replace calls to
9997 add_process by calls to lynx_add_process.
9998 (lynx_resume): If PTID is null, then try using
9999 current_process()->private->last_wait_event_ptid.
10001 (lynx_clear_inferiors): Delete. The contents of that function
10002 has been inlined in lynx_mourn;
10003 (lynx_wait_1): Save the ptid in the process's private data.
10004 (lynx_mourn): Free the process' private data. Replace call
10005 to lynx_clear_inferiors by call to clear_inferiors.
10007 2013-05-17 Yao Qi <yao@codesourcery.com>
10009 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10012 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10014 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10015 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10016 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10017 PT_TEXT_END_ADDR guards. Update comments.
10018 (linux_target_op) <read_offsets>: Conditionally define to
10019 linux_read_offsets if the target is UCLIBC and if it defines
10020 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10022 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10023 Andrew Jenner <andrew@codesourcery.com>
10025 * Makefile.in (SFILES): Add linux-nios2-low.c.
10026 (clean): Add action to delete nios2-linux.c.
10027 (nios2-linux.c): New rule.
10028 * configure.srv: Add nios2*-*-linux*.
10029 * linux-nios2-low.c: New.
10031 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10033 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10035 2013-04-25 Hui Zhu <hui@codesourcery.com>
10038 * ax.c (ax_printf): Add fflush.
10040 2013-04-22 Tom Tromey <tromey@redhat.com>
10042 * Makefile.in (SFILES): Add filestuff.c.
10043 (OBS): Add filestuff.o.
10044 (filestuff.o): New target.
10045 * config.in, configure: Rebuild.
10046 * configure.ac: Check for fdwalk, pipe2.
10048 2013-04-17 Pedro Alves <palves@redhat.com>
10050 * configure.ac (USE_THREAD_DB): Delete variable.
10051 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10052 Don't AC_SUBST USE_THREAD_DB.
10053 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10054 * config.in, configure: Regenerate.
10056 2013-04-16 Pedro Alves <palves@redhat.com>
10058 * linux-low.h (struct lwp_info) <thread_known>: Move under
10059 the USE_THREAD_DB #ifdef.
10061 2013-04-16 Pedro Alves <palves@redhat.com>
10063 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10064 (linux-low.o): Delete rule.
10065 * linux-low.h: Always include "gdb_thread_db.h" instead of
10066 conditionally including thread_db.h.
10067 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10070 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10072 * Makefile.in (install-only): Fix make install regression.
10074 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10076 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10077 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10079 * gdbserver.1: Remove.
10081 2013-03-22 Pedro Alves <palves@redhat.com>
10083 * linux-low.c (handle_extended_wait): Don't call
10084 linux_enable_event_reporting.
10086 2013-03-15 Tony Theodore <tonyt@logyst.com>
10089 * Makefile.in (SHELL): Use @SHELL@.
10091 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10093 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10096 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10098 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10099 Remove extraneous NULL element.
10101 2013-03-13 Yao Qi <yao@codesourcery.com>
10103 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10104 'V' block in trace frame.
10106 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10108 * target.h (struct target_ops): Add btrace ops.
10109 (target_supports_btrace): New macro.
10110 (target_enable_btrace): New macro.
10111 (target_disable_btrace): New macro.
10112 (target_read_btrace): New macro.
10113 * gdbthread.h (struct thread_info): Add btrace field.
10114 * server.c: Include btrace-common.h.
10115 (handle_btrace_general_set): New function.
10116 (handle_btrace_enable): New function.
10117 (handle_btrace_disable): New function.
10118 (handle_general_set): Call handle_btrace_general_set.
10119 (handle_qxfer_btrace): New function.
10120 (struct qxfer qxfer_packets[]): Add btrace entry.
10121 * inferiors.c (remove_thread): Disable btrace.
10122 * linux-low: Include linux-btrace.h.
10123 (linux_low_enable_btrace): New function.
10124 (linux_low_read_btrace): New function.
10125 (linux_target_ops): Add btrace ops.
10126 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10127 Add srv_linux_btrace=yes.
10128 (x86_64-*-linux*): Add linux-btrace.o.
10129 Add srv_linux_btrace=yes.
10130 * configure.ac: Define HAVE_LINUX_BTRACE.
10131 * config.in: Regenerated.
10132 * configure: Regenerated.
10134 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10136 * server.c (handle_qxfer): Preserve error message if -3 is
10138 (qxfer): Document the -3 return value.
10140 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10142 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10143 (linux_btrace_h): New variable.
10144 (linux-btrace.o): New rule.
10146 2013-03-08 Stan Shebs <stan@codesourcery.com>
10147 Hafiz Abid Qadeer <abidh@codesourcery.com>
10149 * tracepoint.c (trace_buffer_size): New global.
10150 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10151 (init_trace_buffer): Change to one-argument function. Allocate
10152 trace buffer memory.
10153 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10154 handle QTBuffer:size packet.
10155 (cmd_bigqtbuffer_size): New function.
10156 (initialize_tracepoint): Call init_trace_buffer with
10157 DEFAULT_TRACE_BUFFER_SIZE.
10158 * server.c (handle_query): Add QTBuffer:size in the
10161 2013-03-07 Yao Qi <yao@codesourcery.com>
10163 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10164 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10166 (cmd_qtsp): Adjust condition. Do post increment.
10167 Set cur_action and cur_step_action back to 0.
10169 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10172 * linux-low.c (linux_write_memory): Return early success if LEN is
10175 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10177 * configure.srv: Add x86_64-*-cygwin* as target.
10179 2013-02-28 Tom Tromey <tromey@redhat.com>
10181 * configure.ac: Invoke AC_SYS_LARGEFILE.
10182 * configure, config.in: Rebuild.
10184 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10186 * win32-low.c: Throughout, fix format strings and casts of
10187 printf-like functions to avoid type related warnings on all
10189 (get_child_debug_event): Print dwDebugEventCode as hex since
10190 that's how it's usually documented.
10192 2013-02-28 Yao Qi <yao@codesourcery.com>
10194 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10197 2013-02-27 Jiong Wang <jiwang@tilera.com>
10199 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10200 (reg-tilegx32.c): New rule.
10201 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10202 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10203 different register info initializer according to elf class.
10204 (init_registers_tilgx32): New function. The tilegx32 register info
10206 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10207 (tile_store_gregset): Likewise.
10209 2013-02-27 Yao Qi <yao@codesourcery.com>
10211 * server.c (process_point_options): Print debug message when
10212 debug_threads is true.
10214 2013-02-26 Yao Qi <yao@codesourcery.com>
10216 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10218 2013-02-19 Pedro Alves <palves@redhat.com>
10219 Kai Tietz <ktietz@redhat.com>
10223 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10224 instead of strtoul to extract address from packet.
10225 (process_serial_event) <'z'>: Likewise.
10227 2013-02-18 Yao Qi <yao@codesourcery.com>
10229 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10231 2013-02-14 Pedro Alves <palves@redhat.com>
10235 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10236 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10238 2013-02-14 Pedro Alves <palves@redhat.com>
10240 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10242 2013-02-14 Pedro Alves <palves@redhat.com>
10244 * tracepoint.c (save_string): Delete.
10245 (add_tracepoint_action): Use savestring instead of save_string.
10247 2013-02-12 Pedro Alves <palves@redhat.com>
10249 * linux-xtensa-low.c: Ditto.
10250 * xtensa-xtregs.c: Ditto.
10252 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10254 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10257 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10259 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10260 aarch64_num_wp_regs and aarch64_num_bp_regs to
10261 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10263 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10265 * linux-aarch64-low.c (ps_get_thread_area): Replace
10266 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10268 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10269 Marcus Shawcroft <marcus.shawcroft@arm.com>
10270 Nigel Stephens <nigel.stephens@arm.com>
10271 Yufeng Zhang <yufeng.zhang@arm.com>
10273 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10274 (aarch64.c, aarch64-without-fpu.c): New targets.
10275 * configure.srv (aarch64*-*-linux*): New.
10276 * linux-aarch64-low.c: New file.
10278 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10280 * linux-low.c (handle_extended_wait, linux_create_inferior)
10281 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10282 (dequeue_one_deferred_signal, linux_resume_one_thread)
10283 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10284 (linux_tracefork_grandchild, linux_test_for_tracefork)
10285 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10286 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10287 where the argument is 0.
10289 2013-01-25 Yao Qi <yao@codesourcery.com>
10291 * event-loop.c: Include "queue.h".
10292 (gdb_event_p): New typedef.
10293 (struct gdb_event) <next_event>: Remove.
10294 (event_queue): Change to QUEUE(gdb_event_p).
10295 (async_queue_event): Remove.
10296 (gdb_event_xfree): New.
10297 (initialize_event_loop): New.
10298 (process_event): Use API from QUEUE.
10299 (wait_for_event): Likewise.
10300 * server.c (main): Call initialize_event_loop.
10301 * server.h (initialize_event_loop): Declare.
10303 2013-01-18 Yao Qi <yao@codesourcery.com>
10305 * ax.h (struct eval_agent_expr_context): New.
10306 (gdb_eval_agent_expr): Update declaration.
10307 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10308 TFRAME. Add new argument CTX.
10309 * server.h (struct eval_agent_expr_context): Declare.
10310 (agent_mem_read, agent_tsv_read): Update declaration.
10311 (agent_mem_read_string): Likewise.
10312 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10313 (add_traceframe_block): Add new argument TPOINT.
10314 Increase TPOINT->traceframe_usage.
10315 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10316 eval_tracepoint_agent_expr.
10317 (condition_true_at_tracepoint): Likewise.
10318 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10319 (agent_mem_read_string, agent_tsv_read): Likewise.
10321 2013-01-16 Yao Qi <yao@codesourcery.com>
10323 * linux-low.c (linux_resume_one_lwp): Don't check
10324 'lwp->bp_reinsert != 0'.
10326 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10327 Pedro Alves <palves@redhat.com>
10329 * lynx-low.c (ptrace_request_to_str): Define a temporary
10330 macro and use it to simplify this function's implementation.
10332 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10334 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10337 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10339 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10343 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10345 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10347 * lynx-low.c (lynx_resume): Use the resume_info parameter
10348 to determine the ptid for the lynx_ptrace call, unless
10349 it is equal to minus_one_ptid, in which case we use the
10350 ptid of the current_inferior.
10351 (lynx_wait_1): After having received a thread create/exit
10352 event, resume the inferior's execution using the signaling
10353 thread's ptid, rather than the old ptid.
10355 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10357 * lynx-low.c (lynx_resume): Delete variable ret.
10359 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10361 * gdbreplay.c (gdbreplay_version): Update copyright year.
10362 * server.c (gdbserver_version): Likewise.
10364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10366 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10371 * lynx-low.c (ptrace_request_to_str): Add handling for
10372 PTRACE_GETTRACESIG.
10374 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10376 * lynx-low.c (lynx_attach): Delete variable new_process.
10378 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10380 * lynx-low.c (lynx_create_inferior): Delete variable
10383 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10385 * lynx-low.c (ptrace_request_to_str): Do not handle
10386 PTRACE_GETTHREADLIST if this macro does not exist.
10388 2012-12-15 Yao Qi <yao@codesourcery.com>
10390 * Makefile.in (OBS): Add notif.o.
10391 * notif.c, notif.h: New.
10392 * server.c: Include "notif.h".
10393 (struct vstop_notif) <next>: Remove.
10395 (queue_stop_reply): Update.
10396 (push_event, send_next_stop_reply): Remove.
10397 (discard_queued_stop_replies): Update.
10398 (notif_stop): New variable.
10399 (handle_v_stopped): Remove.
10400 (handle_v_requests): Don't call handle_v_stopped. Call
10401 handle_ack_notif instead.
10402 (queue_stop_reply_callback): Call notif_event_enque instead
10403 of queue_stop_reply.
10404 (handle_status): Don't call send_next_stop_reply, call
10405 notif_write_event instead.
10406 (kill_inferior_callback): Likewise.
10407 (detach_or_kill_inferior_callback): Likewise.
10408 (main): Call initialize_notif.
10409 (process_serial_event): Call QUEUE_is_empty.
10410 (handle_target_event): Call notif_push instead of push event.
10411 * server.h (push_event): Remove declaration.
10413 2012-12-10 Tom Tromey <tromey@redhat.com>
10415 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10416 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10419 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10420 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10421 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10422 (amd64-linux-ipa.o, ax.o): Rewrite.
10423 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10424 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10425 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10426 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10427 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10428 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10429 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10430 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10431 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10432 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10433 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10434 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10435 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10436 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10437 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10438 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10439 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10440 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10441 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10442 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10443 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10444 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10445 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10446 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10447 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10448 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10449 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10450 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10451 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10452 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10453 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10454 (reg-tilegx.o): Remove.
10455 (all_object_files): New macro.
10456 Include .deps files.
10457 * aclocal.m4, configure: Rebuild.
10458 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10459 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10460 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10462 2012-12-05 Tom Tromey <tromey@redhat.com>
10465 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10467 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10469 * configure.ac: Check for linux/perf_event.h.
10470 * config.in: Regenerated.
10471 * configure: Regenerated.
10473 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10475 * hostio.c (handle_readlink): Decrease buffer size
10476 parameter passed to readlink by one byte.
10478 2012-11-26 Yao Qi <yao@codesourcery.com>
10480 * configure.ac (build_warnings): Append '-Wempty-body'.
10481 * configure: Regenerated.
10482 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10485 2012-11-15 Pierre Muller <muller@sourceware.org>
10487 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10488 * config.in: Regenerate.
10489 * configure: Regenerate.
10490 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10491 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10492 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10493 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10495 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10496 instead of <sys/wait.h> header.
10497 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10499 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10501 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10502 (various make rules): Remove -DGDBSERVER
10504 2012-11-09 Yao Qi <yao@codesourcery.com>
10506 * spu-low.c (current_ptid): Move it to ..
10507 * gdbthread.h: ... here. New.
10508 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10509 * server.c (myresume, process_serial_event): Likewise.
10510 * thread-db.c (thread_db_find_new_threads): Likewise.
10511 * tracepoint.c (run_inferior_command): Likewise.
10513 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10515 * server.c (handle_search_memory_1): Include access length in
10518 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10520 * linux-crisv32-low.c: Fix compile errors.
10522 2012-09-04 Yao Qi <yao@codesourcery.com>
10524 * tracepoint.c (cmd_qtsv): Adjust debug message.
10525 Don't check CUR_TPOINT.
10527 2012-08-28 Yao Qi <yao@codesourcery.com>
10529 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10530 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10531 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10532 Remove declarations of xmalloc, xreallloc, xstrdup and
10534 * Makefile.in (libiberty_h): New.
10535 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10536 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10538 2012-08-23 Yao Qi <yao@codesourcery.com>
10540 * server.h: Remove declaration of 'xsnprintf'.
10542 2012-08-22 Keith Seitz <keiths@redhat.com>
10544 * server.h: Include build-gnulib-gbserver/config.h.
10545 * gdbreplay.c: Likewise.
10547 2012-08-08 Doug Evans <dje@google.com>
10549 * Makefile.in (SFILES): Add gdb_vecs.c.
10550 (OBS): Add gdb_vecs.o.
10551 (gdb_vecs_h, host_defs_h): New variables.
10552 (thread-db.o): Add $(gdb_vecs_h) dependency.
10553 (gdb_vecs.o): New rule.
10554 * thread-db.c: #include "gdb_vecs.h".
10555 (thread_db_load_search): Use a vector to iterate over path elements.
10556 Handle text appearing after "$pdir".
10558 * configure.ac: Add check for strstr.
10559 * config.in: Regenerate.
10560 * configure: Regenerate.
10562 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10564 * hostio.c (handle_pread): If pread fails, fall back to attempting
10566 (handle_pwrite): Likewise for pwrite.
10568 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10570 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10571 between unsupported TYPE and unimplementable ADDR/LEN combination.
10572 (arm_insert_point): Act on new return value.
10574 2012-07-31 Pedro Alves <palves@redhat.com>
10576 * server.c (process_point_options): Only skip tokens if we find
10577 one that is unrecognized. Don't treat 'X' specially while
10578 skipping unrecognized tokens.
10580 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10582 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10583 to 4-byte-align HW breakpoint addresses for Thumb.
10585 2012-07-27 Yao Qi <yao@codesourcery.com>
10589 * server.h: Declare gdb_agent_about_to_close.
10590 * target.c (kill_inferior): Include "agent.h".
10591 New. Send command 'kill'.
10592 * target.h (kill_inferior): Removed macro.
10593 * tracepoint.c (gdb_agent_about_to_close): New.
10594 (gdb_agent_helper_thread): Handle command 'close'.
10595 Wait endlessly until the inferior stops.
10596 Install gdb_agent_remove_socket to atexit hook.
10597 (agent_socket_name): New static variable.
10598 (gdb_agent_socket_init): Replace local variable 'name' with
10599 'agent_socket_name'.
10600 (gdb_agent_remove_socket): New.
10602 2012-07-27 Yao Qi <yao@codesourcery.com>
10604 * server.c (process_point_options): Stop at 'X' when parsing.
10606 2012-07-19 Michael Eager <eager@eagercon.com>
10608 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10610 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10611 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10612 hardware breakpoint.
10614 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10616 * gdbserver/linux-low.c (initialize_low): Call
10617 linux_ptrace_init_warnings.
10619 2012-07-02 Doug Evans <dje@google.com>
10621 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10624 2012-07-02 Stan Shebs <stan@codesourcery.com>
10626 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10627 (ax.o): Add it to build rule.
10629 (OBS): Add format.o.
10630 (IPA_OBS): Add format.o.
10631 * server.c (handle_query): Claim support for breakpoint commands.
10632 (process_point_options): Add command case.
10633 (process_serial_event): Leave running if there are printfs in
10635 * mem-break.h (any_persistent_commands): Declare.
10636 (add_breakpoint_commands): Declare.
10637 (gdb_no_commands_at_breakpoint): Declare.
10638 (run_breakpoint_commands): Declare.
10639 * mem-break.c (struct point_command_list): New struct.
10640 (struct breakpoint): New field command_list.
10641 (any_persistent_commands): New function.
10642 (add_commands_to_breakpoint): New function.
10643 (add_breakpoint_commands): New function.
10644 (gdb_no_commands_at_breakpoint): New function.
10645 (run_breakpoint_commands): New function.
10646 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10648 * ax.c: Include format.h.
10649 (ax_printf): New function.
10650 (gdb_eval_agent_expr): Add printf opcode.
10652 2012-06-13 Yao Qi <yao@codesourcery.com>
10654 * server.c (start_inferior): Remove duplicated writes to fields
10655 'last_resume_kind' and 'last_status' of 'current_inferior'.
10657 2012-06-12 Yao Qi <yao@codesourcery.com>
10658 Pedro Alves <palves@redhat.com>
10660 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10662 * server.c (handle_v_cont): Extend comment.
10664 2012-06-11 Yao Qi <yao@codesourcery.com>
10666 * linux-low.c (linux_attach): Add 'static'.
10668 2012-06-06 Yao Qi <yao@codesourcery.com>
10670 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10672 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10674 Fix gcc -flto compilation warning.
10675 * server.c (main): Make variable multi_mode and attach volatile.
10677 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10679 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10680 if the platform doesn't know about it.
10682 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10684 * Makefile.in (SFILES): Add linux-tile-low.c.
10685 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10686 * configure.srv: Handle tilegx-*-linux*.
10687 * linux-tile-low.c: New file.
10689 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10691 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10693 2012-05-24 Pedro Alves <palves@redhat.com>
10697 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10699 2012-05-24 Pedro Alves <palves@redhat.com>
10703 Replace target_signal with gdb_signal throughout.
10705 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10707 * linux-low.c (linux_store_registers): Avoid the copying sequence
10708 when no data has been retrieved by ptrace.
10710 2012-05-22 Will Deacon <will.deacon@arm.com>
10712 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10713 Include asm/ptrace.h.
10714 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10717 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10719 * linux-low.c (linux_store_registers): Don't re-retrieve data
10720 with ptrace that has already been obtained from /proc. Always
10721 copy any data retrieved with ptrace to the buffer supplied.
10723 2012-05-11 Yao Qi <yao@codesourcery.com>
10724 Pedro Alves <palves@redhat.com>
10726 * linux-low.c (enum stopping_threads_kind): New.
10727 (stopping_threads): Change type to `enum stopping_threads_kind'.
10728 (handle_extended_wait): If stopping and suspending threads, leave
10729 the new_lwp suspended too.
10730 (linux_wait_for_event): Adjust.
10731 (stop_all_lwps): Set `stopping_threads' to
10732 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10733 whether we're suspending threads or just stopping them. Assert no
10736 2012-04-29 Yao Qi <yao@codesourcery.com>
10738 * server.h: Move some code to ...
10739 * gdbthread.h: ... here. New.
10740 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10741 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10742 (nto-low.o, win32-low.o): Likewise.
10743 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10744 * regcache.c, remote-utils.c, server.c: Likewise.
10745 * target.c, tracepoint.c, win32-low.c: Likewise.
10747 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10749 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10750 (PTRACE_ARG4_TYPE): Likewise.
10751 (PTRACE_XFER_TYPE): Likewise.
10752 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10753 ptrace to PTRACE_ARG3_TYPE.
10754 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10755 (PTRACE_ARG4_TYPE): Likewise.
10756 (PTRACE_XFER_TYPE): Likewise.
10757 (linux_detach_one_lwp): Cast fourth argument of
10758 ptrace to long then PTRACE_ARG4_TYPE.
10759 (regsets_fetch_inferior_registers): Cast third argument of
10760 ptrace to long then PTRACE_ARG3_TYPE.
10761 (regsets_store_inferior_registers): Likewise.
10763 2012-04-20 Pedro Alves <palves@redhat.com>
10765 * configure: Regenerate.
10767 2012-04-19 Pedro Alves <palves@redhat.com>
10769 * Makefile.in (GNULIB_BUILDDIR): New.
10770 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10771 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10772 (all, install-only, uninstall, clean-info, all-lib, clean): No
10773 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10774 (maintainer-clean realclean distclean): Use subdir_do.
10776 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10777 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10778 * acinclude.m4: Include acx_configure_dir.m4.
10779 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10780 calls. Call AC_PROG_RANLIB. Configure gnulib using
10783 (GNULIB_STDINT_H): Adjust.
10784 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10785 * gdbreplay.c: Include build-gnulib/config.h.
10786 * server.h: Likewise.
10787 * aclocal.m4: Regenerate.
10788 * config.in: Regenerate.
10789 * configure: Regenerate.
10791 2012-04-19 Pedro Alves <palves@redhat.com>
10793 * Makefile.in (LIBGNU, INCGNU): Adjust.
10794 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10795 (all, install-only, uninstall, clean-info, all-lib, clean)
10796 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10797 * configure.ac: Adjust AC_OUTPUT output.
10798 * aclocal.m4: Regenerate.
10799 * configure: Regenerate.
10801 2012-04-19 Pedro Alves <palves@redhat.com>
10803 * Makefile.in (generated_files): New.
10804 (server_h): Remove the explicit dependency on config.h, and depend
10805 on $generated_files.
10807 2012-04-19 Pedro Alves <palves@redhat.com>
10809 * Makefile.in (INCGNU): Add -Ignulib.
10811 2012-04-19 Pedro Alves <palves@redhat.com>
10813 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10814 (INCGNU): ... this, and spell out -I here.
10815 (GNULIB_LIB): Rename to ...
10816 (LIBGNU): ... this.
10817 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10819 2012-04-19 Pedro Alves <palves@redhat.com>
10821 * config.in: Regenerate.
10823 2012-04-19 Pedro Alves <palves@redhat.com>
10825 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10826 * server.h (memmem): Remove declaration.
10827 * config.in: Regenerate.
10828 * configure: Regenerate.
10830 2012-04-19 Yao Qi <yao@codesourcery.com>
10832 * Makefile.in (SFILES): Add common/vec.c.
10836 2012-04-19 Yao Qi <yao@codesourcery.com>
10838 * remote-utils.c (prepare_resume_reply): Replace with macro
10839 target_core_of_thread.
10840 * server.c (handle_qxfer_threads_proper): Likewise.
10841 * target.h (traget_core_of_thread): New macro.
10843 2012-04-18 Pedro Alves <palves@redhat.com>
10845 * aclocal.m4: Regenerate.
10846 * configure: Regenerate.
10848 2012-04-16 Yao Qi <yao@codesourcery.com>
10850 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10851 duplicated on address.
10853 2012-04-16 Yao Qi <yao@codesourcery.com>
10855 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10856 (struct tracepoint_action_ops) <send>: New field.
10857 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10858 (agent_expr_send, x_tracepoint_action_send): New.
10859 (l_tracepoint_action_send): New.
10860 (cmd_qtdp): Download and install tracepoint
10861 according to `use_agent'.
10862 (run_inferior_command): Add one more parameter `len'.
10864 (tracepoint_send_agent): New.
10865 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10867 2012-04-16 Yao Qi <yao@codesourcery.com>
10869 * tracepoint.c (download_tracepoints): Moved to ...
10870 (cmd_qtstart): ... here.
10872 2012-04-14 Yao Qi <yao@codesourcery.com>
10874 * tracepoint.c: Include inttypes.h.
10875 (struct collect_memory_action): Use sized types.
10876 (struct tracepoint): Likewise.
10877 (cmd_qtdp, stop_tracing): Update print specifiers.
10878 (cmd_qtp, response_tracepoint): Likewise.
10879 (collect_data_at_tracepoint): Likewise.
10880 (collect_data_at_step): Likewise.
10882 2012-04-14 Yao Qi <yao@codesourcery.com>
10884 Import gnulib module inttypes.
10885 * aclocal.m4, config.in, configure: Regenerated.
10887 2012-04-14 Yao Qi <yao@codesourcery.com>
10889 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10890 Makefile and config.status at last.
10892 2012-04-13 Yao Qi <yao@codesourcery.com>
10894 * tracepoint.c: Include stdint.h unconditionally.
10896 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10898 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10899 on BFD_HAVE_SYS_PROCFS_TYPE.
10900 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10901 * configure: Regenerate.
10902 * config.in: Likewise.
10904 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10906 * Makefile.in (clean): Also remove x32.c x32-linux.c
10907 x32-avx.c x32-avx-linux.c.
10908 (x32.o): New target.
10910 (x32-linux.o): Likewise.
10911 (x32-linux.c): Likewise.
10912 (x32-avx.o): Likewise.
10913 (x32-avx.c): Likewise.
10914 (x32-avx-linux.o): Likewise.
10915 (x32-avx-linux.c): Likewise.
10917 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10918 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10919 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10920 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10921 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10922 i386/x32-avx-linux.xml.
10924 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10925 (init_registers_x32_avx_linux): Likwise.
10926 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10927 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10929 2012-04-13 Pedro Alves <palves@redhat.com>
10931 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10932 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10933 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10934 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10937 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10939 * linux-x86-low.c (compat_x32_clock_t): New.
10940 (compat_x32_siginfo_t): Likewise.
10941 (compat_x32_siginfo_from_siginfo): Likewise.
10942 (siginfo_from_compat_x32_siginfo): Likewise.
10943 (linux_is_elf64): Likewise.
10944 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10945 and siginfo_from_compat_x32_siginfo for x32.
10946 (x86_arch_setup): Set linux_is_elf64.
10948 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10951 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10953 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10954 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10955 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10956 compatible with process.
10958 2012-04-12 Yao Qi <yao@codesourcery.com>
10960 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10961 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10962 (install-only, install-info, clean): Handle sub dir gnulib.
10963 (all-lib, am--refresh): New targets.
10964 (memmem.o): Remove target.
10965 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10966 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10967 (AC_REPLACE_FUNCS): Remove memmem.
10968 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10969 (AC_OUTPUT): Generate Makefile in gnulib/.
10970 * aclocal.m4, config.in, configure: Regenerated.
10972 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10974 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10976 2012-04-05 Pedro Alves <palves@redhat.com>
10978 -Werror=strict-aliasing
10980 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10983 2012-04-04 Pedro Alves <palves@redhat.com>
10985 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10986 (sparc_store_gregset_from_stack, sparc_store_gregset)
10987 (sparc_breakpoint_at): Fix formatting.
10989 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10991 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10993 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10994 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10995 * config.in: Regenerate.
10996 * configure: Likewise.
10998 2012-03-29 Pedro Alves <palves@redhat.com>
11000 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11001 Correct ptrace arguments.
11003 2012-03-28 Pedro Alves <palves@redhat.com>
11005 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11006 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11007 (IA64_FR1_REGNUM): New defines.
11008 (ia64_fetch_register): New.
11009 (the_low_target): Install it.
11010 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11012 * linux-low.c (linux_fetch_registers): Try the
11013 the_low_target.fetch_register hook first.
11015 * linux-arm-low.c (the_low_target): Adjust.
11016 * linux-bfin-low.c (the_low_target): Adjust.
11017 * linux-cris-low.c (the_low_target): Adjust.
11018 * linux-crisv32-low.c (the_low_target): Adjust.
11019 * linux-m32r-low.c (the_low_target): Adjust.
11020 * linux-m68k-low.c (the_low_target): Adjust.
11021 * linux-mips-low.c (the_low_target): Adjust.
11022 * linux-ppc-low.c (the_low_target): Adjust.
11023 * linux-s390-low.c (the_low_target): Adjust.
11024 * linux-sh-low.c (the_low_target): Adjust.
11025 * linux-sparc-low.c (the_low_target): Adjust.
11026 * linux-tic6x-low.c (the_low_target): Adjust.
11027 * linux-x86-low.c (the_low_target): Adjust.
11028 * linux-xtensa-low.c (the_low_target): Adjust.
11030 2012-03-26 Pedro Alves <palves@redhat.com>
11032 * server.c (handle_qxfer_libraries): Don't bail early if
11033 the_target->qxfer_libraries_svr4 is not NULL.
11035 2012-03-26 Pedro Alves <palves@redhat.com>
11037 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11039 2012-03-23 Pedro Alves <palves@redhat.com>
11041 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11042 "library-list-svr4" element's start tag when the the DSO list is
11045 2012-03-23 Pedro Alves <palves@redhat.com>
11047 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11048 a variable whose type size is the same as the inferior's pointer
11051 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11053 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11055 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11056 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11057 * linux-low.h: Include <signal.h>.
11058 (struct siginfo): Remove forward declaration.
11059 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11062 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11064 * .gitignore: Ignore more files.
11066 2012-03-19 Pedro Alves <palves@redhat.com>
11067 Jan Kratochvil <jan.kratochvil@redhat.com>
11069 * server.c (cont_thread, general_thread): Add describing comments.
11070 (start_inferior): Clear `cont_thread'.
11071 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11074 2012-03-15 Yao Qi <yao@codesourcery.com>
11076 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11078 (cmd_qtdp): ... here.
11080 2012-03-15 Yao Qi <yao@codesourcery.com>
11082 * tracepoint.c (struct tracepoint_action_ops): New.
11083 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11084 (m_tracepoint_action_download): New.
11085 (r_tracepoint_action_download): New.
11086 (x_tracepoint_action_download): New.
11087 (l_tracepoint_action_download): New.
11088 (add_tracepoint_action): Install `action->ops' according type.
11089 (download_tracepoint_1): Move code `download' function pointer
11090 of various tracepoint_action_ops.
11092 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11094 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11095 linux_ptrace_attach_warnings.
11097 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11099 * Makefile.in (linux-ptrace.o): New.
11100 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11101 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11102 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11103 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11104 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11106 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11108 2012-03-08 Yao Qi <yao@codesourcery.com>
11109 Pedro Alves <palves@redhat.com>
11111 Fix PR server/13392.
11112 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11113 offset of JMP insn.
11114 * tracepoint.c (remove_tracepoint): New.
11115 (cmd_qtdp): Call remove_tracepoint when failed to install.
11117 2012-03-07 Pedro Alves <palves@redhat.com>
11119 * linux-low.c (get_detach_signal): New.
11120 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11121 Pass on pending signals to PTRACE_DETACH. Check the result of the
11123 * server.c (program_signals, program_signals_p): New.
11124 (handle_general_set): Handle QProgramSignals.
11125 * server.h (program_signals, program_signals_p): Declare.
11127 2012-03-05 Pedro Alves <palves@redhat.com>
11128 Jan Kratochvil <jan.kratochvil@redhat.com>
11130 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11133 2012-03-03 Yao Qi <yao@codesourcery.com>
11135 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11136 agent_look_up_symbols.
11138 2012-03-03 Yao Qi <yao@codesourcery.com>
11140 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11141 (linux-x86-low.o): Likewise.
11142 * server.h: Remove in_process_agent_loaded.
11143 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11147 2012-03-03 Yao Qi <yao@codesourcery.com>
11149 * tracepoint.c (gdb_agent_capability): New global.
11150 (in_process_agent_loaded_ust): Renamed to
11151 `in_process_agent_supports_ust'.
11153 (in_process_agent_supports_ust): Call agent_capability_check.
11154 (clear_installed_tracepoints): Assert that agent supports
11157 2012-03-03 Yao Qi <yao@codesourcery.com>
11159 * linux-low.c (linux_supports_agent): New.
11160 (linux_target_ops): Initialize field `supports_agent' with
11161 linux_supports_agent.
11162 * target.h (struct target_ops) <supports_agent>: New.
11163 (target_supports_agent): New macro.
11164 * server.c (handle_general_set): Handle packet 'QAgent'.
11165 (handle_query): Send `QAgent+'.
11166 * Makefile.in (server.o): Depends on agent.h.
11168 2012-03-03 Yao Qi <yao@codesourcery.com>
11170 * Makefile.in (OBS): Add agent.o.
11171 Add new rule for agent.o.
11172 Track dependence of tracepoint.c on agent.h.
11173 * tracepoint.c (run_inferior_command_1):
11174 (run_inferior_command): Call agent_run_command.
11175 (gdb_ust_connect_sync_socket): Deleted. Move it to
11177 (resume_thread, stop_thread): Likewise.
11178 (gdb_ust_socket_init): Renamed to ...
11179 (gdb_agent_socket_init): ... New.
11180 (gdb_ust_thread): Renamed to ...
11181 (gdb_agent_helper_thread): ... New.
11182 (gdb_ust_init): Move some code to ...
11183 (gdb_agent_init): ... here. New.
11184 [HAVE_UST]: Call gdb_ust_init.
11185 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11186 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11187 * config.in, configure: Regenerated.
11189 2012-03-02 Pedro Alves <palves@redhat.com>
11191 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11192 * linux-low.c (struct simple_pid_list): New.
11193 (stopped_pids): New a struct simple_pid_list pointer.
11194 (add_to_pid_list, pull_pid_from_list): New.
11195 (handle_extended_wait): Don't assume the first signal new children
11196 report is SIGSTOP. Adjust call to pull_pid_from_list.
11197 (linux_wait_for_lwp): Adjust.
11199 2012-03-02 Yao Qi <yao@codesourcery.com>
11201 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11204 2012-03-02 Yao Qi <yao@codesourcery.com>
11206 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11207 `stop_pc' and `tpoint'. Update caller.
11209 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11211 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11212 * linux-low.c (use_linux_regsets): New macro.
11213 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11214 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11215 (linux_register_in_regsets): New function.
11216 (usr_fetch_inferior_registers): Skip registers covered by
11218 (usr_store_inferior_registers): Likewise.
11219 (usr_fetch_inferior_registers): New macro.
11220 (usr_store_inferior_registers): Likewise.
11221 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11222 (linux_store_registers): Likewise.
11223 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11225 (init_registers_mips64_dsp_linux): Likewise.
11226 (init_registers_mips_linux): New macro.
11227 (init_registers_mips_dsp_linux): Likewise.
11228 (mips_dsp_num_regs): Likewise.
11229 (DSP_BASE, DSP_CONTROL): New fallback macros.
11230 (mips_base_regs): New macro.
11231 (mips_regmap): Use it. Fix the size.
11232 (mips_dsp_regmap): New variable.
11233 (mips_dsp_regset_bitmap): Likewise.
11234 (mips_arch_setup): New function.
11235 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11237 (mips_cannot_store_register): Likewise.
11238 (the_low_target): Update .arch_setup, .num_regs and .regmap
11239 initializers. Add .regset_bitmap initializer.
11240 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11242 * linux-bfin-low.c (the_low_target): Likewise.
11243 * linux-cris-low.c (the_low_target): Likewise.
11244 * linux-crisv32-low.c (the_low_target): Likewise.
11245 * linux-ia64-low.c (the_low_target): Likewise.
11246 * linux-m32r-low.c (the_low_target): Likewise.
11247 * linux-m68k-low.c (the_low_target): Likewise.
11248 * linux-ppc-low.c (the_low_target): Likewise.
11249 * linux-s390-low.c (the_low_target): Likewise.
11250 * linux-sh-low.c (the_low_target): Likewise.
11251 * linux-sparc-low.c (the_low_target): Likewise.
11252 * linux-tic6x-low.c (the_low_target): Likewise.
11253 * linux-x86-low.c (the_low_target): Likewise.
11254 * linux-xtensa-low.c (the_low_target): Likewise.
11255 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11256 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11257 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11259 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11260 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11262 2012-02-29 Yao Qi <yao@codesourcery.com>
11263 Pedro Alves <palves@redhat.com>
11265 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11266 `step_over_finished' is true.
11268 2012-02-27 Pedro Alves <palves@redhat.com>
11270 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11271 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11273 2012-02-27 Pedro Alves <palves@redhat.com>
11276 * linux-low.c (pid_is_stopped): New.
11277 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11279 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11281 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11284 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11286 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11288 2012-02-24 Luis Machado <lgustavo@codesourcery>
11290 * server.c (handle_query): Advertise support for target-side
11291 breakpoint condition evaluation.
11292 (process_point_options): New function.
11293 (process_serial_event): When inserting a breakpoint, check for
11294 a target-side condition that should be evaluated.
11296 * mem-break.c: Include regcache.h and ax.h.
11297 (point_cond_list_t): New data structure.
11298 (breakpoint) <cond_list>: New field.
11299 (find_gdb_breakpoint_at): Make non-static.
11300 (delete_gdb_breakpoint_at): Clear any target-side
11302 (clear_gdb_breakpoint_conditions): New function.
11303 (add_condition_to_breakpoint): Likewise.
11304 (add_breakpoint_condition): Likewise.
11305 (gdb_condition_true_at_breakpoint): Likewise.
11306 (gdb_breakpoint_here): Return result directly instead
11307 of going through a local variable.
11309 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11310 (clear_gdb_breakpoint_conditions): Likewise.
11311 (add_breakpoint_condition): Likewise.
11312 (gdb_condition_true_at_breakpoint): Likewise.
11314 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11315 (need_step_over_p): Take target-side breakpoint condition into
11318 2012-02-24 Luis Machado <lgustavo@codesourcery>
11320 * server.h: Include tracepoint.h.
11321 (agent_mem_read, agent_get_trace_state_variable_value,
11322 agent_set_trace_state_variable_value,
11323 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11324 get_set_tsv_func_addr): New prototypes.
11326 * ax.h: New include file.
11327 * ax.c: New source file.
11329 * tracepoint.c: Include ax.h.
11330 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11331 agent_expr, eval_result_type): Move to ax.h.
11332 (parse_agent_expr): Rename to ...
11333 (gdb_parse_agent_expr): ... this, make it non-static and move
11335 (unparse_agent_expr) Rename to ...
11336 (gdb_unparse_agent_expr): ... this, make it non-static and move
11338 (eval_agent_expr): Rename to ...
11339 (eval_tracepoint_agent_expr): ... this.
11340 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11341 forward declarations.
11342 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11343 (agent_get_trace_state_variable_value): New function.
11344 (agent_set_trace_state_variable_value): New function.
11345 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11346 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11347 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11348 (condition_true_at_tracepoint): Likewise.
11349 (parse_agent_expr): Rename to ...
11350 (gdb_parse_agent_expr): ... this and move to ax.c.
11351 (unparse_agent_expr): Rename to ...
11352 (gdb_unparse_agent_expr): ... this and move to ax.c.
11353 (gdb_agent_op_name): Move to ax.c.
11354 (eval_agent_expr): Rename to ...
11355 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11357 (eval_tracepoint_agent_expr): New function.
11358 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11360 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11362 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11363 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11364 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11365 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11366 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11367 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11368 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11369 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11370 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11371 (compile_bytecodes): Remove forward declaration.
11372 (is_goto_target): Move to ax.c.
11373 (compile_bytecodes): Move to ax.c and call
11374 agent_get_trace_state_variable_value (...) and
11375 agent_set_trace_state_variable_value (...).
11377 * Makefile.in: Update ax.c and IPA dependencies.
11379 2012-02-24 Pedro Alves <palves@redhat.com>
11381 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11382 (cmd_bigqtbuffer_circular): ... this. Only handle
11383 'QTBuffer:circular:'.
11384 (handle_tracepoint_general_set): Adjust.
11386 2012-02-16 Yao Qi <yao@codesourcery.com>
11388 * inferiors.c: Move code to ...
11389 * dll.c: .... here. New.
11390 * server.h: Declare clear_dlls.
11391 * Makefile.in (SFILES): Add dll.c.
11395 2012-02-11 Yao Qi <yao@codesourcery.com>
11397 * server.c: (handle_monitor_command): Add a new parameter
11399 (handle_query): Update caller.
11401 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11403 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11404 * configure, config.in: Regenerate.
11405 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11408 2012-02-02 Pedro Alves <palves@redhat.com>
11410 Try SIGKILL first, then PTRACE_KILL.
11411 * linux-low.c (linux_kill_one_lwp): New.
11412 (linux_kill_one_lwp): Rename to ...
11413 (kill_one_lwp_callback): ... this. Use the new
11414 linux_kill_one_lwp.
11416 2012-02-02 Pedro Alves <palves@redhat.com>
11418 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11421 2012-01-27 Pedro Alves <palves@redhat.com>
11423 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11424 (elf_64_file_p): Make static.
11425 (linux_pid_exe_is_elf_64_file): New.
11426 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11427 Delete declarations.
11428 (linux_pid_exe_is_elf_64_file): Declare.
11429 * linux-x86-low.c (x86_arch_setup): Use
11430 linux_pid_exe_is_elf_64_file.
11432 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11434 * linux-low.c (linux_wait_for_event_1): Rename to ...
11435 (linux_wait_for_event): ... here and merge it with former
11436 linux_wait_for_event - new variable wait_ptid, use it.
11437 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11439 2012-01-23 Pedro Alves <palves@redhat.com>
11441 * server.c (main): Avoid yet another case of infinite loop while
11442 detaching/killing after a longjmp.
11444 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11447 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11449 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11451 * hostio.c (handle_readlink): New function.
11452 (handle_vFile): Call it to handle "vFile:readlink" packets.
11454 2012-01-20 Pedro Alves <palves@redhat.com>
11455 Ulrich Weigand <ulrich.weigand@linaro.org>
11457 * server.c (handle_v_requests): Only support vAttach and vRun to
11458 start multiple processes when in extended protocol mode.
11460 2012-01-17 Pedro Alves <palves@redhat.com>
11462 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11463 memalign plus mprotect to allocate the scratch buffer.
11465 2012-01-13 Pedro Alves <palves@redhat.com>
11467 * server.c (attach_inferior): Clear `cont_thread'.
11469 2012-01-13 Pedro Alves <palves@redhat.com>
11471 * server.c (main): Avoid infinite loop while detaching/killing
11474 2012-01-09 Doug Evans <dje@google.com>
11476 * server.c (start_inferior): Set last_ptid in --wrapper case.
11478 2012-01-06 Yao Qi <yao@codesourcery.com>
11480 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11482 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11484 2012-01-04 Yao Qi <yao@codesourcery.com>
11486 * tracepoint.c (cmd_qtdp): Print debug message
11487 for static tracepoint.
11489 2012-01-04 Yao Qi <yao@codesourcery.com>
11491 * tracepoint.c (trace_vdebug): Differentiate debug message
11492 between gdbserver and IPA.
11494 2012-01-03 Yao Qi <yao@codesourcery.com>
11496 * tracepoint.c (tracepoint_was_hit): Don't collect for
11499 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11501 * terminal.h: Reformat copyright header.
11503 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11505 * server.c (gdbserver_version): Update copyright year.
11506 * gdbreplay.c (gdbreplay_version): Likewise.
11508 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11510 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11513 2011-12-18 Hui Zhu <teawater@gmail.com>
11514 * linux-low.c (linux_create_inferior): Save return value to ret.
11516 2011-12-18 Hui Zhu <teawater@gmail.com>
11518 * linux-low.c (linux_create_inferior): Save return value to ret.
11520 2011-12-16 Doug Evans <dje@google.com>
11522 * linux-low.c (linux_create_inferior): If stdio connection,
11523 redirect stdin from /dev/null, stdout to stderr.
11524 * remote-utils.c (remote_is_stdio): New static global.
11525 (remote_connection_is_stdio): New function.
11526 (remote_prepare): Handle stdio connection.
11527 (remote_open): Ditto.
11528 (remote_close): Don't close stdin for stdio connections.
11529 (read_prim,write_prim): New functions. Replace all calls to
11530 read/write to these.
11531 * server.c (main): Watch for "-" argument. Move call to
11532 remote_prepare before start_inferior.
11533 * server.h (STDIO_CONNECTION_NAME): New macro.
11534 (remote_connection_is_stdio): Declare.
11536 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11537 in debugging output.
11539 2011-12-15 Yao Qi <yao@codesourcery.com>
11541 * tracepoint.c: Include sys/syscall.h.
11542 (gdb_ust_thread): Remove preprocessor conditional.
11544 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11546 * linux-low.c (linux_detach_one_lwp): Call
11547 the_low_target.prepare_to_resume before detaching.
11549 2011-12-14 Yao Qi <yao@codesourcery.com>
11551 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11554 2011-12-14 Yao Qi <yao@codesourcery.com>
11556 * i386-low.c (i386_low_stopped_data_address): Initialize local
11557 variable `control'.
11559 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11563 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11564 DR_CONTROL unless necessary. Extend comments.
11565 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11566 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11568 2011-12-13 Yao Qi <yao@codesourcery.com>
11570 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11572 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11574 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11576 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11577 Print new debug message for such case.
11579 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11581 Fix overlapping memcpy.
11582 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11583 the read_inferior_memory transfer.
11584 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11585 write_inferior_memory transfer.
11586 (set_fast_tracepoint_jump): New variable buf. Use it for the
11587 read_inferior_memory and write_inferior_memory transfers.
11588 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11589 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11590 Use it for the write_inferior_memory transfer.
11591 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11594 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11596 * linux-low.c (fetch_register, store_register): Make code
11597 consistent, fix formatting.
11599 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11601 * linux-low.c (usr_store_inferior_registers): Factor out code
11602 to handle individual registers into...
11603 (store_register): ... this new function.
11605 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11607 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11608 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11609 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11610 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11611 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11612 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11613 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11614 (srv_xmlfiles): Add new XML files.
11616 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11618 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11619 (init_registers_s390_linux32v1): Add prototype.
11620 (init_registers_s390_linux32v2): Likewise.
11621 (init_registers_s390_linux64v1): Likewise.
11622 (init_registers_s390_linux64v2): Likewise.
11623 (init_registers_s390x_linux64v1): Likewise.
11624 (init_registers_s390x_linux64v2): Likewise.
11625 (s390_num_regs): Increment to 52.
11626 (s390_regmap): Add orig_r2 register.
11627 (s390_num_regs_3264): Increment to 68.
11628 (s390_regmap_3264): Add orig_r2 register.
11629 (s390_collect_ptrace_register): Handle orig_r2 register.
11630 (s390_supply_ptrace_register): Likewise.
11631 (s390_fill_last_break): New function.
11632 (s390_store_last_break): Likewise.
11633 (s390_fill_system_call): New function.
11634 (s390_store_system_call): Likewise.
11635 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11637 (s390_check_regset): New function.
11638 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11639 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11640 Update target_regsets for available register sets.
11642 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11643 Jan Kratochvil <jan.kratochvil@redhat.com>
11645 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11646 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11648 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11649 * linux-low.h (struct process_info_private): New member r_debug.
11650 * server.c (handle_qxfer_libraries): Call
11651 the_target->qxfer_libraries_svr4.
11652 (handle_qxfer_libraries_svr4): New function.
11653 (qxfer_packets): New entry "libraries-svr4".
11654 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11655 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11656 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11657 PACKET_qXfer_libraries_svr4.
11659 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11661 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11662 PSW address/mask between 8-byte and 16-byte formats.
11663 (s390_supply_ptrace_register): Likewise.
11664 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11665 basic addressing mode bit.
11667 2011-11-24 Stan Shebs <stan@codesourcery.com>
11669 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11671 2011-11-17 Stan Shebs <stan@codesourcery.com>
11673 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11674 (tracing_start_time): New global.
11675 (tracing_stop_time): New global.
11676 (tracing_user_name): New global.
11677 (tracing_notes): New global.
11678 (tracing_stop_note): New global.
11679 (cmd_qtstart): Set traceframe_usage, start_time.
11680 (stop_tracing): Set stop_time.
11681 (cmd_qtstatus): Report additional status.
11682 (cmd_qtp): New function.
11683 (handle_tracepoint_query): Call it.
11684 (cmd_qtnotes): New function.
11685 (handle_tracepoint_general_set): Call it.
11686 (get_timestamp): Rename from tsv_get_timestamp.
11688 2011-11-14 Stan Shebs <stan@codesourcery.com>
11689 Kwok Cheung Yeung <kcy@codesourcery.com>
11691 * linux-x86-low.c (small_jump_insn): New.
11692 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11693 trampoline and error message, build a trampoline and issue a small
11694 jump instruction to it.
11695 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11696 trampoline and error message.
11697 (x86_get_min_fast_tracepoint_insn_len): New.
11698 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11699 * linux-low.h (struct linux_target_ops): Add arguments to
11700 install_fast_tracepoint_jump_pad operation, add new operation.
11701 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11703 (linux_get_min_fast_tracepoint_insn_len): New function.
11704 (linux_target_op): Add new operation.
11705 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11706 (gdb_trampoline_buffer_end): Ditto.
11707 (gdb_trampoline_buffer_error): Ditto.
11708 (struct ipa_sym_addresses): Add fields for new IPA variables.
11709 (symbol_list): Add entries for new IPA variables.
11710 (struct tracepoint): Add fields to hold the address range of the
11711 trampoline used by the tracepoint.
11712 (trampoline_buffer_head): New static variable.
11713 (trampoline_buffer_tail): Ditto.
11714 (claim_trampoline_space): New function.
11715 (have_fast_tracepoint_trampoline_buffer): New function.
11716 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11718 (install_fast_tracepoint): Ditto, also add error buffer argument.
11719 (cmd_qtminftpilen): New function.
11720 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11721 (fast_tracepoint_from_trampoline_address): New function.
11722 (fast_tracepoint_collecting): Handle trampoline as part of jump
11724 (set_trampoline_buffer_space): New function.
11725 (initialize_tracepoint): Initialize new IPA variables.
11726 * target.h (struct target_ops): Add arguments to
11727 install_fast_tracepoint_jump_pad operation, add new
11728 get_min_fast_tracepoint_insn_len operation.
11729 (target_get_min_fast_tracepoint_insn_len): New.
11730 (install_fast_tracepoint_jump_pad): Add arguments.
11731 * server.h (IPA_BUFSIZ): Define.
11732 * linux-i386-ipa.c: Include extra header files.
11733 (initialize_fast_tracepoint_trampoline_buffer): New function.
11734 (initialize_low_tracepoint): Call it.
11735 * server.h (set_trampoline_buffer_space): Declare.
11736 (claim_trampoline_space): Ditto.
11737 (have_fast_tracepoint_trampoline_buffer): Ditto.
11739 2011-11-14 Yao Qi <yao@codesourcery.com>
11741 * server.c (handle_query): Handle InstallInTrace for qSupported.
11742 * tracepoint.c (add_tracepoint): Sort list.
11743 (install_tracepoint, download_tracepoint): New.
11744 (cmd_qtdp): Call them to install and download tracepoints.
11745 (sort_tracepoints): Removed.
11746 (cmd_qtstart): Update.
11748 2011-11-14 Yao Qi <yao@codesourcery.com>
11750 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11751 * mem-break.h: Declare.
11752 * tracepoint.c (cmd_qtstart): Move some code to ...
11753 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11755 (download_tracepoints): Move some code to ...
11756 (download_tracepoint_1): ... here. New.
11758 2011-11-08 Yao Qi <yao@codesourcery.com>
11760 * remote-utils.c (relocate_instruction): A comment fix.
11762 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11764 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11765 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11766 dr_status_mirror and dr_control_mirror from debug_reg_state.
11767 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11768 (i386_initial_stuff): Remove use of deleted globals.
11769 (i386_get_thread_context, i386_set_thread_context,
11770 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11771 from debug_reg_state.
11773 2011-11-05 Yao Qi <yao@codesourcery.com>
11775 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11776 address as TPOINT's.
11778 2011-11-02 Stan Shebs <stan@codesourcery.com>
11780 * tracepoint.c (agent_mem_read_string): New function.
11781 (eval_agent_expr): Call it for tracenz.
11782 * server.c (handle_query): Report support for tracenz.
11784 2011-11-02 Yao Qi <yao@codesourcery.com>
11786 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11788 2011-11-02 Yao Qi <yao@codesourcery.com>
11790 * target.h: Fix a typo in comment.
11792 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11794 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11795 clobber the breakpoints' shadows with fast tracepoint jumps.
11796 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11797 * target.c (write_inferior_memory): Also pass MYADDR down to
11800 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11802 * configure.ac: Check support for personality routine.
11803 * configure: Regenerate.
11804 * config.in: Likewise.
11805 * linux-low.c: Include <sys/personality.h>.
11806 Define ADDR_NO_RANDOMIZE if necessary.
11807 (linux_create_inferior): Disable address space randomization when
11808 forking inferior, if requested.
11809 (linux_supports_disable_randomization): New function.
11810 (linux_target_ops): Install it.
11811 * server.h (disable_randomization): Declare.
11812 * server.c (disable_randomization): New global variable.
11813 (handle_general_set): Handle QDisableRandomization.
11814 (handle_query): Likewise for qSupported.
11815 (main): Support --disable-randomization and --no-disable-randomization
11816 command line arguments.
11817 * target.h (struct target_ops): Add supports_disable_randomization.
11818 (target_supports_disable_randomization): New macro.
11820 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11822 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11824 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11825 [!PT_GETDSBT] (target_loadmap): New definition.
11826 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11827 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11828 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11829 and PT_GETDSBT to LINUX_LOADMAP.
11830 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11831 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11833 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11835 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11836 (arm_linux_hwbp_cap): New static variable.
11837 (arm_linux_get_hwbp_cap): Replace by ...
11838 (arm_linux_init_hwbp_cap): ... this new function.
11839 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11840 (arm_linux_get_hw_watchpoint_count): Likewise.
11841 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11842 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11843 (arm_prepare_to_resume): Use perror_with_name instead of error.
11845 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11847 * linux-arm-low.c: Include <signal.h>.
11848 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11849 (struct arm_linux_hwbp_cap): New data type.
11850 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11851 (struct arm_linux_hw_breakpoint): New data type.
11852 (MAX_BPTS, MAX_WPTS): Define.
11853 (struct arch_process_info, struct arch_lwp_info): New data types.
11854 (arm_linux_get_hwbp_cap): New function.
11855 (arm_linux_get_hw_breakpoint_count): Likewise.
11856 (arm_linux_get_hw_watchpoint_count): Likewise.
11857 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11858 (arm_hwbp_control_initialize): Likewise.
11859 (arm_hwbp_control_is_enabled): Likewise.
11860 (arm_hwbp_control_is_initialized): Likewise.
11861 (arm_hwbp_control_disable): Likewise.
11862 (arm_linux_hw_breakpoint_equal): Likewise.
11863 (arm_linux_hw_point_initialize): Likewise.
11864 (struct update_registers_data): New data structure.
11865 (update_registers_callback: New function.
11866 (arm_insert_point): Likewise.
11867 (arm_remove_point): Likewise.
11868 (arm_stopped_by_watchpoint): Likewise.
11869 (arm_stopped_data_address): Likewise.
11870 (arm_new_process): Likewise.
11871 (arm_new_thread): Likewise.
11872 (arm_prepare_to_resume): Likewise.
11873 (the_low_target): Register arm_insert_point, arm_remove_point,
11874 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11875 arm_new_thread, and arm_prepare_to_resume.
11877 2011-09-15 Stan Shebs <stan@codesourcery.com>
11879 * server.h (struct emit_ops): Add compare-goto fields.
11880 * tracepoint.c (gdb_agent_op_sizes): New table.
11881 (emit_eq_goto): New function.
11882 (emit_ne_goto): New function.
11883 (emit_lt_goto): New function.
11884 (emit_le_goto): New function.
11885 (emit_gt_goto): New function.
11886 (emit_ge_goto): New function.
11887 (is_goto_target): New function.
11888 (compile_bytecodes): Recognize special cases of compare-goto
11889 combinations and call specialized emitters for them.
11890 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11891 (amd64_emit_ne_goto): New function.
11892 (amd64_emit_lt_goto): New function.
11893 (amd64_emit_le_goto): New function.
11894 (amd64_emit_gt_goto): New function.
11895 (amd64_emit_ge_goto): New function.
11896 (amd64_emit_ops): Add the new functions.
11897 (i386_emit_eq_goto): New function.
11898 (i386_emit_ne_goto): New function.
11899 (i386_emit_lt_goto): New function.
11900 (i386_emit_le_goto): New function.
11901 (i386_emit_gt_goto): New function.
11902 (i386_emit_ge_goto): New function.
11903 (i386_emit_ops): Add the new functions.
11905 2011-09-08 Stan Shebs <stan@codesourcery.com>
11907 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11908 (i386_emit_epilogue): Restore %ebx.
11910 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11912 * server.c (step_thread): Remove definition.
11913 (process_serial_event): Don't handle Hs.
11914 * server.h (step_thread): Remove declaration.
11915 * target.c (set_desired_inferior): Remove use of step_thread.
11917 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11919 * linux-low.c: Include linux-procfs.h.
11920 (linux_attach_lwp_1): Update comments.
11921 (linux_attach): Scan for existing threads when attaching to a
11922 process that is the tgid.
11923 * Makefile.in: Update dependencies.
11925 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11927 * configure.srv: Add linux-procfs.o dependencies.
11929 2011-08-14 Yao Qi <yao@codesourcery.com>
11931 * target.h (struct target_ops): Fix indent.
11932 * win32-low.c (win32_target_ops): Fix comment.
11934 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11935 Yao Qi <yao@codesourcery.com>
11937 * Makefile.in (clean): Remove tic6x-*.c files.
11938 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11939 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11940 (tic6x-c64xp-linux.c): Likewise.
11941 * configure.srv: Add support for tic6x-*-uclinux.
11942 * linux-tic6x-low.c: New.
11943 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11945 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11946 Yao Qi <yao@codesourcery.com>
11948 * target.h (struct target_ops): Add read_loadmap.
11949 * linux-low.c (struct target_loadseg): New type.
11950 (struct target_loadmap): New type.
11951 (linux_read_loadmap): New function.
11952 (linux_target_ops): Add linux_read_loadmap.
11953 * server.c (handle_query): Support qXfer:fdpic:read packet.
11954 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11957 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11959 * win32-low.c: Include <stdint.h>.
11961 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11963 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11964 to the inferior here.
11965 (i386_remove_aligned_watchpoint): Ditto.
11966 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11967 fit part of the watchpoint in the debug registers.
11968 (i386_update_inferior_debug_regs): New.
11969 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11970 registers, and only update the inferior on success.
11971 (i386_low_remove_watchpoint): Ditto.
11973 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11975 * linux-low.c (compare_ints, unique, list_threads, show_process,
11976 linux_core_of_thread): Delete.
11977 (linux_target_ops): Change linux_core_of_thread to
11978 linux_common_core_of_thread.
11979 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11980 * utils.c (malloc_failure): Change type of argument.
11981 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11982 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11983 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11984 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11985 (IPA_OBJS): Add common-utils-ipa.o.
11986 (ptid_h, linux_osdata_h): New macros.
11987 (server_h): Add common/common-utils.h, common/xml-utils.h,
11988 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11990 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11991 ptid.o, buffer.o): New rules.
11992 (linux-low.o): Add common/linux-osdata.h as a dependency.
11993 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11994 * configure.ac: Add AC_HEADER_DIRENT check.
11995 * config.in: Regenerate.
11996 * configure: Regenerate.
11997 * remote-utils.c (xml_escape_text): Delete.
11998 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11999 buffer_xml_printf): Move to common/buffer.c.
12000 * server.c (main): Remove call to initialize_inferiors.
12001 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12002 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12003 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12004 internal_error, gdb_assert, gdb_assert_fail): Delete.
12005 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12006 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12008 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12009 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12010 initialize_inferiors): Delete.
12012 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12014 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12017 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12019 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12021 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12023 2011-05-26 Yao Qi <yao@codesourcery.com>
12025 * Makefile.in (thread-db.o): Track dependence to
12026 common/gdb_thread_db.h.
12027 * thread-db.c: include gdb_thread_db.h from right place.
12029 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12031 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12032 __FILE__ and __LINE__ to internal_error.
12034 2011-05-13 Doug Evans <dje@google.com>
12036 * thread-db.c (try_thread_db_load_from_sdir): New function.
12037 (try_thread_db_load_from_dir): New function.
12038 (thread_db_load_search): Handle $sdir, ignore $pdir.
12039 Remove trying of system directories if search of
12040 libthread-db-search-path fails, that is now done via $sdir.
12042 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12044 * server.c (handle_query): Add EnableDisableTracepoints to the list
12045 of supported features.
12046 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12048 (cmd_qtenable_disable): New.
12049 (cmd_qtstart): Install tracepoints even if disabled.
12050 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12051 receiving a QTEnable or QTDisable packet.
12052 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12053 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12055 (gdb_probe): Skip data collection if static tracepoint is disabled.
12057 2011-05-10 Doug Evans <dje@google.com>
12059 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12061 2011-05-04 Doug Evans <dje@google.com>
12063 * linux-low.c (linux_join): Skip process lookup.
12064 * spu-low.c (spu_join): Ditto.
12065 * server.c (join_inferiors_callback): Delete.
12066 (process_serial_event): For 'D' packet (detach) call join_inferior
12069 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12071 * README: Don't mention xscale*-*-linux*.
12072 * configure.srv (xscale*-*-linux*): Don't handle target.
12074 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12076 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12078 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12079 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12080 (i386_emit_void_call_2): Likewise.
12082 2011-04-26 Yao Qi <yao@codesourcery.com>
12084 * linux-low.c: Move common macros to linux-ptrace.h.
12085 Include linux-ptrace.h.
12086 * Makefile.in (linux_ptrace_h): New.
12087 (linux-low.o): Depends on linux-ptrace.h.
12089 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12091 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12092 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12093 (remote_prepare): New function with most of the TCP code from ...
12094 (remote_open): ... here. Detect PORT here unconditionally. Move also
12095 setting transport_is_reliable.
12096 * server.c (run_once): New variable.
12097 (gdbserver_usage): Document it.
12098 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12099 the first run if RUN_ONCE.
12100 * server.h (run_once, remote_prepare): New declarations.
12102 2011-04-19 Tom Tromey <tromey@redhat.com>
12104 * win32-low.c (handle_load_dll): Remove duplicate "the".
12106 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12108 Remove support for old Cygwin 1.5 versions.
12109 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12110 function to avoid warning.
12111 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12114 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12116 * gdbserver/server.h (Macro _): Define it if not available.
12118 2011-03-14 Michael Snyder <msnyder@vmware.com>
12120 * hostio.c (handle_close): Remove unnecessary null test.
12122 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12124 * Makefile.in (maintainer-clean realclean distclean): Remove
12125 "make ... subdir_do" command.
12127 2011-03-10 Michael Snyder <msnyder@vmware.com>
12129 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12131 * server.c (handle_v_run): Free alloced buffer on early return.
12133 2011-03-09 Yao Qi <yao@codesourcery.com>
12136 2011-03-04 Yao Qi <yao@codesourcery.com>
12138 * Makefile.in: Remove GNU make feature --directory.
12140 2011-03-05 Yao Qi <yao@codesourcery.com>
12142 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12143 (subdir_do): New make target. Copied from gdb/Makefile.
12144 (maintainer-clean, realclean, distclean, clean): Call corresponding
12145 make targets in common/Makefile.
12147 2011-02-11 Yao Qi <yao@codesourcery.com>
12149 * configure.ac: Call AC_PROG_RANLIB.
12150 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12151 * configure: Regenerate.
12153 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12155 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12157 2011-03-06 Yao Qi <yao@codesourcery.com>
12159 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12161 2011-03-05 Yao Qi <yao@codesourcery.com>
12163 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12164 (subdir_do): New make target. Copied from gdb/Makefile.
12165 (maintainer-clean, realclean, distclean, clean): Call corresponding
12166 make targets in common/Makefile.
12168 2011-03-04 Yao Qi <yao@codesourcery.com>
12170 * Makefile.in: Remove GNU make feature --directory.
12172 2011-03-04 Michael Snyder <msnyder@vmware.com>
12174 * server.c (queue_stop_reply): Call xmalloc not malloc.
12176 2011-03-02 Michael Snyder <msnyder@vmware.com>
12178 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12180 2011-02-28 Michael Snyder <msnyder@vmware.com>
12182 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12183 (cmd_qtframe): Ditto.
12184 (cmd_qtbuffer): Ditto.
12185 (cmd_bigqtbuffer): Ditto.
12187 * utils.c (decimal2str): Initialize 'width' to nine, then
12188 don't mess with it.
12190 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12192 * hostio.c (require_data): Free *data, not data.
12194 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12196 * hostio.c (require_data): Use free, not xfree.
12198 2011-02-27 Michael Snyder <msnyder@vmware.com>
12200 * server.c (handle_query): Discard unused value.
12202 * hostio.c (require_data): Free malloc memory before returning
12205 2011-02-26 Michael Snyder <msnyder@vmware.com>
12207 * linux-low.c (list_threads): Call closedir for dirent.
12209 2011-02-27 Michael Snyder <msnyder@vmware.com>
12211 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12212 a case statement falls through.
12214 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12216 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12219 2011-02-26 Michael Snyder <msnyder@vmware.com>
12221 * utils.c (decimal2str): Eliminate dead code and dead param.
12222 (pulongest): Drop dead param from call to decimal2str.
12225 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12227 Revert the following patch (not approved yet):
12228 2011-02-21 Hui Zhu <teawater@gmail.com>
12229 * tracepoint.c (tp_printf): New function.
12230 (eval_agent_expr): Handle gdb_agent_op_printf.
12232 2011-02-21 Hui Zhu <teawater@gmail.com>
12234 * tracepoint.c (tp_printf): New function.
12235 (eval_agent_expr): Handle gdb_agent_op_printf.
12237 2011-02-18 Tom Tromey <tromey@redhat.com>
12239 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12240 (tracepoint.o): Likewise.
12241 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12242 (gdb_agent_op_names): Likewise.
12244 2011-02-18 Tom Tromey <tromey@redhat.com>
12246 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12247 gdb_agent_op_rot>: New constants.
12248 (gdb_agent_op_names): Add pick and roll.
12249 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12252 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12254 * aclocal.m4: Regenerated with aclocal-1.11.1.
12256 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12258 * server.c (handle_qxfer_traceframe_info): New.
12259 (qxfer_packets): Register "traceframe-info".
12260 (handle_query): Report support for qXfer:traceframe-info:read+.
12261 * tracepoint.c (match_blocktype): New.
12262 (traceframe_find_block_type): Rename to ...
12263 (traceframe_walk_blocks): ... this. Add callback filter argument,
12265 (traceframe_find_block_type): New, reimplemented on top of
12266 traceframe_walk_blocks.
12267 (build_traceframe_info_xml): New.
12268 (traceframe_read_info): New.
12269 * server.h (traceframe_read_info): Declare.
12271 2011-02-11 Yao Qi <yao@codesourcery.com>
12273 * configure.ac: Call AC_PROG_RANLIB.
12274 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12275 * configure: Regenerate.
12277 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12279 * server.c (gdb_read_memory): Change return semantics to allow
12281 (handle_search_memory_1): Adjust.
12282 (process_serial_event) <'m' packet>: Handle partial transfers.
12283 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12285 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12287 * regcache.c (init_register_cache): Initialize
12288 regcache->register_status.
12289 (free_register_cache): Release regcache->register_status.
12290 (regcache_cpy): Copy register_status.
12291 (registers_to_string): Print 'x's for unavailable registers.
12292 (supply_register): Mark the register's status valid or
12293 unavailable, depending on whether a buffer was passed in or not.
12294 (supply_register_zeroed): New.
12295 (supply_regblock): Mark the registers' status valid or
12296 unavailable, depending on whether a buffer was passed in or not.
12297 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12298 (struct regcache): New `register_status' field.
12299 (supply_register_zeroed): Declare.
12300 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12301 supply_register_zeroed, rather than passing a NULL buffer to
12303 * tracepoint.c (fetch_traceframe_registers): Update comment.
12305 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12307 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12310 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12312 * server.h (decode_xfer_write): Change prototype.
12313 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12314 and don't extract the annex here.
12315 * server.c (decode_xfer_read): Remove `annex' parameter,
12316 and don't extract the annex here.
12317 (decode_xfer): New.
12318 (struct qxfer): New.
12319 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12320 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12321 (handle_qxfer_statictrace): New functions, abstracted out from
12322 handle_query, and made to use the struct qxfer interface.
12323 (handle_threads_qxfer_proper): Rename to ...
12324 (handle_qxfer_threads_proper): ... this.
12325 (handle_threads_qxfer): Rename to ...
12326 (handle_qxfer_threads): ... this. Adjust.
12327 (qxfer_packets): New array.
12328 (handle_qxfer): New function.
12329 (handle_query): Use handle_qxfer.
12331 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12333 * gdbreplay.c: Shorten lines of >= 80 columns.
12334 * linux-low.c: Ditto.
12335 * linux-ppc-low.c: Ditto.
12336 * linux-s390-low.c: Ditto.
12337 * linux-sparc-low.c: Ditto.
12338 * linux-x86-low.c: Ditto.
12339 * linux-xtensa-low.c: Ditto.
12340 * mem-break.c: Ditto.
12341 * nto-low.c: Ditto.
12342 * regcache.h: Ditto.
12343 * remote-utils.c: Ditto.
12346 * thread-db.c: Ditto.
12347 * tracepoint.c: Ditto.
12349 * win32-low.h: Ditto.
12351 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12353 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12356 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12358 * server.c (gdbserver_version): Update copyright year in version
12360 * gdbreplay.c (gdbreplay_version): Ditto.
12362 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12364 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12365 * linux-bfin-low.c: New file.
12366 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12367 PT_DATA_ADDR for BFIN targets.
12368 * Makefile.in (SFILES): Add linux-bfin-low.c.
12369 (clean): Remove reg-bfin.c.
12370 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12371 * README: Mention supported Blackfin targets.
12373 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12375 * .gitignore: New file.
12377 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12379 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12381 2010-10-22 Jie Zhang <jie@codesourcery.com>
12383 * Makefile.in: Add FLAGS_TO_PASS variable.
12384 (install): Remove dependency of install-only and recursively
12385 invoke make for install-only.
12387 2010-10-04 Doug Evans <dje@google.com>
12389 * Makefile.in (uninstall): Use $(DESTDIR).
12391 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12395 * linux-x86-low.c (compat_siginfo_from_siginfo)
12396 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12397 si_code is < 0. Check for si_code == SI_TIMER before checking for
12400 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12402 * lynx-i386-low.c: New file.
12403 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12405 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12407 * lynx-low.c (ptrace_request_to_str): Remove handling for
12408 request values that have been removed in LynxOS 5.x.
12410 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12412 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12415 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12417 * configure.ac: Add --enable-inprocess-agent option.
12418 * configure: Rebuilt.
12420 2010-09-06 Yao Qi <yao@codesourcery.com>
12422 * linux-low.c (linux_kill): Remove unused variable.
12423 (linux_stabilize_threads): Likewise.
12424 * server.c (start_inferior): Likewise.
12425 (queue_stop_reply_callback): Likewise.
12426 * tracepoint.c (do_action_at_tracepoint): Likewise.
12428 2010-09-06 Yao Qi <yao@codesourcery.com>
12430 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12433 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12435 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12437 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12439 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12442 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12444 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12445 gdbserver/lynx-ppc-low.c: New files.
12446 * Makefile.in (lynx_low_h): New variable.
12447 (lynx-low.o, lynx-ppc-low.o): New rules.
12448 * configure.ac: On LynxOS, link with -lnetinet.
12449 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12450 * configure: regenerate.
12452 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12454 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12455 * configure.ac: Add check for vasprintf and vsnprintf.
12456 * configure, config.in: Regenerate.
12457 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12459 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12461 * gdbreplay.c: Move include of alloca.h up, next to include of
12463 * server.h: Add include of malloc.h.
12464 * mem-break.c: Remove include of malloc.h.
12465 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12467 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12469 * Makefile.in (memmem.o): Build with -Wno-error.
12471 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12473 * utils.c (xsnprintf): Make non-static.
12474 * server.h: Add xsnprintf declaration.
12475 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12476 replace calls to snprintf by calls to xsnprintf throughout.
12478 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12480 * configure.ac: Add configure check for alloca.
12481 * configure, config.in: Regenerate.
12482 * server.h: Include alloca.h if it exists.
12483 * gdbreplay.c: Include alloca.h if it exists.
12485 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12487 * linux-low.c (__SIGRTMIN): Define if not already defined.
12488 (linux_create_inferior): Check for __ANDROID__ rather than
12490 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12491 are already deferred.
12492 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12493 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12494 stopped and already has a pending signal to report.
12495 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12496 a pending signal to report or is moving out of a jump pad.
12497 (linux_init_signals): Check for __ANDROID__ rather than
12500 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12502 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12503 debug_threads check. Avoid a linear search when not doing debug
12506 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12508 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12509 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12510 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12511 (process_event): Change local fd's type to gdb_fildes_t.
12512 (create_file_handler): Adjust prototype.
12513 (delete_file_handler): Adjust prototype.
12514 (handle_file_event): Adjust prototype. Use pfildes.
12515 (create_file_event): Adjsut prototype.
12516 * remote-utils.c (remote_desc, listen_desc): Change type to
12518 * server.h: New gdb_fildes_t typedef.
12519 [USE_WIN32API]: Include winsock2.h.
12520 (delete_file_handler, add_file_handler): Adjust prototypes.
12521 (pfildes): Declare.
12522 * utils.c (pfildes): New.
12524 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12526 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12527 * configure: Regenerate.
12529 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12531 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12532 (linux_done_accessing_memory): ... this.
12533 (linux_target_ops): Adjust.
12534 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12535 * nto-low.c (nto_target_ops): Adjust comment.
12536 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12537 * spu-low.c (spu_target_ops): Adjust comment.
12538 * target.h (target_ops): Rename unprepare_to_access_memory field
12539 to done_accessing_memory.
12540 (unprepare_to_access_memory): Rename to ...
12541 (done_accessing_memory): ... this.
12543 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12545 * linux-low.c (linux_prepare_to_access_memory): New.
12546 (linux_unprepare_to_access_memory): New.
12547 (linux_target_ops): Install them.
12548 * server.c (read_memory): Rename to ...
12549 (gdb_read_memory): ... this. Use
12550 prepare_to_access_memory/prepare_to_access_memory.
12551 (write_memory): Rename to ...
12552 (gdb_write_memory): ... this. Use
12553 prepare_to_access_memory/prepare_to_access_memory.
12554 (handle_search_memory_1): Adjust.
12555 (process_serial_event): Adjust.
12556 * target.h (struct target_ops): New fields
12557 prepare_to_access_memory and unprepare_to_access_memory.
12558 (prepare_to_access_memory, unprepare_to_access_memory): New.
12559 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12560 prepare_to_access_memory/prepare_to_access_memory.
12561 * nto-low.c (nto_target_ops): Adjust.
12562 * spu-low.c (spu_target_ops): Adjust.
12563 * win32-low.c (win32_target_ops): Adjust.
12565 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12567 * Makefile.in (WARN_CFLAGS): Get it from configure.
12568 (WERROR_CFLAGS): New.
12569 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12570 * configure.ac: Introduce --enable-werror, which adds -Werror to
12571 the compiler command line. Enabled by default. Disable with
12572 --disable-werror. Add -Wdeclaration-after-statement
12573 Wpointer-arith and -Wformat-nonliteral to warning flags.
12574 * configure: Regenerate.
12576 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12578 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12580 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12582 * gdbreplay.c (remote_error): New.
12584 (expect): Use gdbchar. Check for error reading from GDB.
12585 Clarify sync error output.
12586 (play): Check for errors writing to GDB.
12587 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12588 * remote-utils.c (getpkt): Check for errors writing to the remote
12591 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12593 * linux-low.c (linux_wait_1): Move non-debugging code out of
12594 `debug_threads' control.
12596 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12598 * linux-low.c (linux_wait_1): Don't set last_status here.
12599 * server.c (push_event, queue_stop_reply_callback): Assert we're
12600 not pushing a TARGET_WAITKIND_IGNORE event.
12601 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12602 (myresume, handle_target_event): Set the thread's last_resume_kind
12603 and last_status from the target returned status.
12605 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12609 * linux-x86-low.c (update_debug_registers_callback): New.
12610 (i386_dr_low_set_addr): Use it.
12611 (i386_dr_low_get_addr): New.
12612 (i386_dr_low_set_control): Use update_debug_registers_callback.
12613 (i386_dr_low_get_control): New.
12614 (i386_dr_low_get_status): Adjust.
12615 * linux-low.c (linux_stop_lwp): New.
12616 * linux-low.h (linux_stop_lwp): Declare.
12618 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12619 argument instead of a i386_debug_reg_state.
12620 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12621 a i386_debug_reg_state.
12622 (i386_insert_aligned_watchpoint): Adjust.
12623 (i386_remove_aligned_watchpoint): Adjust.
12624 (i386_low_stopped_data_address): Read the debug registers from the
12625 inferior instead of from the mirrors.
12626 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12627 (i386_dr_low_get_addr): Declare.
12628 (i386_dr_low_get_control): Declare.
12629 (i386_dr_low_get_status): Change prototype.
12631 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12632 (i386_dr_low_get_addr): New.
12633 (i386_dr_low_get_control): New.
12634 (i386_dr_low_get_status): Adjust prototype. Return
12636 (i386_initial_stuff): Clear dr_status_mirror and
12638 (i386_get_thread_context): Adjust.
12639 (i386_set_thread_context): Adjust.
12640 (i386_thread_added): Adjust.
12642 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12644 * linux-low.h (linux_thread_area): Delete declaration.
12646 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12648 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12649 after its termination.
12651 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12653 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12654 (gdb_wants_all_stopped): Delete.
12655 (linux_wait_1): Don't call them.
12656 * server.c (handle_v_cont): Tag all threads as want-stopped.
12657 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12658 stopped as "client-wants-stopped".
12660 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12662 * Makefile.in (signals_h): New.
12663 (server_h): Depend on it.
12664 (server.o): Don't depend on $(signals_def).
12665 (signals.o): Depend on $(signals_def).
12667 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12669 * Makefile.in (signals_def): New.
12670 (server_h): Append include/gdb/signals.h and signals_def.
12671 (server.o): Append signals_def.
12673 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12675 * server.c (handle_target_event): Use target_signal_to_host for
12676 resume_info.sig initialization.
12677 * target.h (struct thread_resume) <sig>: New comment.
12679 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12681 * server.c (handle_query): strcpy() the returned string from paddress()
12682 instead of sprintf().
12683 * utils.c (paddress): Return phex_nz().
12685 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12687 * server.c (handle_v_cont): Call mourn_inferior if process
12689 (myresume): Likewise.
12691 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12693 Static tracepoints, and integration with UST.
12695 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12696 * mem-break.c (uninsert_all_breakpoints)
12697 (reinsert_all_breakpoints): New.
12698 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12699 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12700 (gdb_agent_ust_loaded, helper_thread_id)
12701 (gdb_agent_helper_thread_id): New macros.
12702 (struct ipa_sym_addresses): Add addr_ust_loaded,
12703 addr_helper_thread_id, addr_cmd_buf.
12704 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12705 (in_process_agent_loaded_ust): New.
12706 (write_e_ust_not_loaded): New.
12707 (maybe_write_ipa_ust_not_loaded): New.
12708 (struct collect_static_trace_data_action): New.
12709 (enum tracepoint_type) <static_tracepoint>: New.
12710 (struct tracepoint) <handle>: Mention static tracepoints.
12711 (struct static_tracepoint_ctx): New.
12712 (CMD_BUF_SIZE): New.
12713 (add_tracepoint_action): Handle static tracepoint actions.
12714 (unprobe_marker_at): New.
12715 (clear_installed_tracepoints): Handle static tracepoints.
12716 (cmd_qtdp): Handle static tracepoints.
12717 (probe_marker_at): New.
12718 (cmd_qtstart): Handle static tracepoints.
12719 (response_tracepoint): Handle static tracepoints.
12720 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12721 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12722 (get_context_regcache): Handle static tracepoints.
12723 (do_action_at_tracepoint): Handle static tracepoint actions.
12724 (traceframe_find_block_type): Handle static trace data blocks.
12725 (traceframe_read_sdata): New.
12726 (download_tracepoints): Download static tracepoint actions.
12727 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12728 (GDB_PROBE_NAME): New.
12730 (GET_UST_SYM): New.
12733 (ust_marker_to_static_tracepoint): New.
12735 (collect_ust_data_at_tracepoint): New.
12736 (gdb_ust_probe): New.
12737 (UNIX_PATH_MAX, SOCK_DIR): New.
12738 (gdb_ust_connect_sync_socket): New.
12739 (resume_thread, stop_thread): New.
12740 (run_inferior_command): New.
12741 (init_named_socket): New.
12742 (gdb_ust_socket_init): New.
12743 (cstr_to_hexstr): New.
12745 (first_marker, next_marker): New.
12746 (response_ust_marker): New.
12747 (cmd_qtfstm, cmd_qtsstm): New.
12748 (unprobe_marker_at, probe_marker_at): New.
12749 (cmd_qtstmat, gdb_ust_thread): New.
12750 (gdb_ust_init): New.
12751 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12752 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12753 (ST_REGENTRY): New.
12754 (x86_64_st_collect_regmap): New.
12755 (X86_64_NUM_ST_COLLECT_GREGS): New.
12756 (AMD64_RIP_REGNUM): New.
12757 (supply_static_tracepoint_registers): New.
12758 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12759 (ST_REGENTRY): New.
12760 (i386_st_collect_regmap): New.
12761 (i386_NUM_ST_COLLECT_GREGS): New.
12762 (supply_static_tracepoint_registers): New.
12763 * server.c (handle_query): Handle qXfer:statictrace:read.
12764 <qSupported>: Report support for StaticTracepoints, and
12765 qXfer:statictrace:read features.
12766 * server.h (traceframe_read_sdata)
12767 (supply_static_tracepoint_registers): Declare.
12768 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12769 (unpack_varlen_hex): Include in IPA build.
12770 * Makefile.in (ustlibs, ustinc): New.
12771 (IPA_OBJS): Add remote-utils-ipa.o.
12772 ($(IPA_LIB)): Link -ldl and -lpthread.
12774 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12775 * config.in, configure: Regenerate.
12777 2010-06-20 Ian Lance Taylor <iant@google.com>
12778 Pedro Alves <pedro@codesourcery.com>
12780 * linux-x86-low.c (always_true): Delete.
12781 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12782 trying to fool the compiler with always_true.
12784 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12786 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12787 conditions in gdbserver.
12789 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12791 * spu-low.c (spu_read_memory): Wrap around local store limit.
12792 (spu_write_memory): Likewise.
12794 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12796 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12797 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12799 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12801 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12802 uses with LONGEST uses.
12804 2010-06-14 Stan Shebs <stan@codesourcery.com>
12805 Pedro Alves <pedro@codesourcery.com>
12809 * linux-x86-low.c: Include limits.h.
12811 (always_true): New.
12814 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12815 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12816 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12817 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12818 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12819 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12820 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12821 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12822 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12823 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12824 (amd64_emit_void_call_2): New.
12825 (amd64_emit_ops): New.
12826 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12827 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12828 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12829 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12830 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12831 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12832 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12833 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12834 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12835 (i386_emit_stack_adjust, i386_emit_int_call_1)
12836 (i386_emit_void_call_2): New.
12837 (i386_emit_ops): New.
12838 (x86_emit_ops): New.
12839 (the_low_target): Install x86_emit_ops.
12840 * server.h (struct emit_ops): New.
12841 (get_raw_reg_func_addr): Declare.
12842 (current_insn_ptr, emit_error): Declare.
12843 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12844 (set_trace_state_variable_value): New defines.
12845 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12846 addr_get_trace_state_variable_value and
12847 addr_set_trace_state_variable_value.
12848 (symbol_list): New fields for get_raw_reg,
12849 get_trace_state_variable_value and set_trace_state_variable_value.
12850 (condfn): New typedef.
12851 (struct tracepoint): New field `compiled_cond'.
12852 (do_action_at_tracepoint): Clear compiled_cond.
12853 (get_trace_state_variable_value, set_trace_state_variable_value):
12855 (condition_true_at_tracepoint): If there's a compiled condition,
12857 (current_insn_ptr, emit_error): New globals.
12858 (struct bytecode_address): New.
12859 (get_raw_reg_func_addr): New.
12860 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12861 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12862 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12863 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12864 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12865 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12866 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12867 (compile_tracepoint_condition, compile_bytecodes): New.
12868 * target.h (emit_ops): Forward declare.
12869 (struct target_ops): New field emit_ops.
12870 (target_emit_ops): New.
12871 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12872 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12873 * linux-low.c (linux_emit_ops): New.
12874 (linux_target_ops): Install it.
12875 * linux-low.h (struct linux_target_ops): New field emit_ops.
12877 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12879 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12880 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12882 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12883 Stan Shebs <stan@codesourcery.com>
12885 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12886 (all): Depend on $(extra_libraries).
12887 (install-only): Install the IPA.
12888 (IPA_OBJS, IPA_LIB): New.
12889 (clean): Remove the IPA lib.
12890 (IPAGENT_CFLAGS): New.
12891 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12892 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12893 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12894 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12895 * configure.ac: Check for atomic builtins support in the compiler.
12896 (IPA_DEPFILES, extra_libraries): Define.
12897 * configure.srv (ipa_obj): Add description.
12898 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12899 (i[34567]86-*-linux*): Set ipa_obj.
12900 (x86_64-*-linux*): Set ipa_obj.
12901 * linux-low.c (stabilizing_threads): New.
12902 (supports_fast_tracepoints): New.
12903 (linux_detach): Stabilize threads before detaching.
12904 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12905 the lwp is either not stabilizing, or is moving out of a jump pad.
12906 (linux_fast_tracepoint_collecting): New.
12907 (maybe_move_out_of_jump_pad): New.
12908 (enqueue_one_deferred_signal): New.
12909 (dequeue_one_deferred_signal): New.
12910 (linux_wait_for_event_1): If moving out of a jump pad, defer
12911 pending signals to later.
12912 (linux_stabilize_threads): New.
12913 (linux_wait_1): Check if threads need moving out of jump pads, and
12915 (stuck_in_jump_pad_callback): New.
12916 (move_out_of_jump_pad_callback): New.
12917 (lwp_running): New.
12918 (linux_resume_one_lwp): Handle moving out of jump pads.
12919 (linux_set_resume_request): Dequeue deferred signals.
12920 (need_step_over_p): Also step over fast tracepoint jumps.
12921 (start_step_over): Also uninsert fast tracepoint jumps.
12922 (finish_step_over): Also reinsert fast tracepoint jumps.
12923 (linux_install_fast_tracepoint_jump): New.
12924 (linux_target_ops): Install linux_stabilize_threads and
12925 linux_install_fast_tracepoint_jump_pad.
12926 * linux-low.h (linux_target_ops) <get_thread_area,
12927 install_fast_tracepoint_jump_pad>: New fields.
12928 (struct lwp_info) <collecting_fast_tracepoint,
12929 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12930 (linux_get_thread_area): Declare.
12931 * linux-x86-low.c (jump_insn): New.
12932 (x86_get_thread_area): New.
12933 (append_insns): New.
12934 (push_opcode): New.
12935 (amd64_install_fast_tracepoint_jump_pad): New.
12936 (i386_install_fast_tracepoint_jump_pad): New.
12937 (x86_install_fast_tracepoint_jump_pad): New.
12938 (the_low_target): Install x86_get_thread_area and
12939 x86_install_fast_tracepoint_jump_pad.
12940 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12941 (struct fast_tracepoint_jump): New.
12942 (fast_tracepoint_jump_insn): New.
12943 (fast_tracepoint_jump_shadow): New.
12944 (find_fast_tracepoint_jump_at): New.
12945 (fast_tracepoint_jump_here): New.
12946 (delete_fast_tracepoint_jump): New.
12947 (set_fast_tracepoint_jump): New.
12948 (uninsert_fast_tracepoint_jumps_at): New.
12949 (reinsert_fast_tracepoint_jumps_at): New.
12950 (set_breakpoint_at): Use write_inferior_memory.
12951 (uninsert_raw_breakpoint): Use write_inferior_memory.
12952 (check_mem_read): Mask out fast tracepoint jumps.
12953 (check_mem_write): Mask out fast tracepoint jumps.
12954 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12955 (set_fast_tracepoint_jump): Declare.
12956 (delete_fast_tracepoint_jump)
12957 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12958 (reinsert_fast_tracepoint_jumps_at): Declare.
12959 * regcache.c: Don't compile many functions when building the
12960 in-process agent library.
12961 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12962 the register buffer in the heap.
12963 (free_register_cache): If the register buffer isn't owned by the
12964 regcache, don't free it.
12965 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12966 pre-existing register caches.
12967 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12969 (convert_ascii_to_int): : Constify `from' parameter type.
12970 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12971 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12972 the needed buffer in-place.
12973 (relocate_instruction): New.
12974 * server.c (handle_query) <qSymbols>: If the target supports
12975 tracepoints, give it a chance of looking up symbols. Report
12976 support for fast tracepoints.
12977 (handle_status): Stabilize threads.
12978 (process_serial_event): Adjust.
12979 * server.h (struct fast_tracepoint_jump): Forward declare.
12980 (struct process_info) <fast_tracepoint_jumps>: New field.
12981 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12982 (decode_X_packet, decode_M_packet): Adjust.
12983 (relocate_instruction): Declare.
12984 (in_process_agent_loaded): Declare.
12985 (tracepoint_look_up_symbols): Declare.
12986 (struct fast_tpoint_collect_status): Declare.
12987 (fast_tracepoint_collecting): Declare.
12988 (force_unlock_trace_buffer): Declare.
12989 (handle_tracepoint_bkpts): Declare.
12990 (initialize_low_tracepoint)
12991 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12992 * target.h (struct target_ops) <stabilize_threads,
12993 install_fast_tracepoint_jump_pad>: New fields.
12994 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12995 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12996 [HAVE_STDINT_H]: Include stdint.h.
12997 (trace_debug_1): Rename to ...
12998 (trace_vdebug): ... this.
12999 (trace_debug): Rename to ...
13000 (trace_debug_1): ... this. Add `level' parameter.
13001 (trace_debug): New.
13002 (ATTR_USED, ATTR_NOINLINE): New.
13003 (IP_AGENT_EXPORT): New.
13004 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13005 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13006 (about_to_request_buffer_space, trace_buffer_is_full)
13007 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13008 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13009 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13010 (traceframe_write_count, traceframes_created)
13011 (trace_state_variables)
13012 New renaming defines.
13013 (struct ipa_sym_addresses): New.
13014 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13015 (symbol_list): New.
13016 (ipa_sym_addrs): New.
13017 (all_tracepoint_symbols_looked_up): New.
13018 (in_process_agent_loaded): New.
13019 (write_e_ipa_not_loaded): New.
13020 (maybe_write_ipa_not_loaded): New.
13021 (tracepoint_look_up_symbols): New.
13022 (debug_threads) [IN_PROCESS_AGENT]: New.
13023 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13024 (UNKNOWN_SIDE_EFFECTS): New.
13025 (stop_tracing): New.
13026 (flush_trace_buffer): New.
13027 (stop_tracing_bkpt): New.
13028 (flush_trace_buffer_bkpt): New.
13029 (read_inferior_integer): New.
13030 (read_inferior_uinteger): New.
13031 (read_inferior_data_pointer): New.
13032 (write_inferior_data_pointer): New.
13033 (write_inferior_integer): New.
13034 (write_inferior_uinteger): New.
13035 (struct collect_static_trace_data_action): Delete.
13036 (enum tracepoint_type): New.
13037 (struct tracepoint) <type>: New field `type'.
13038 <actions_str, step_actions, step_actions_str>: Only include in
13040 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13041 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13042 (tracepoints): Use IP_AGENT_EXPORT.
13043 (last_tracepoint): Don't include in the IPA.
13044 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13045 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13046 (alloced_trace_state_variables): New.
13047 (trace_state_variables): Use IP_AGENT_EXPORT.
13048 (traceframe_t): Delete unused variable.
13049 (circular_trace_buffer): Don't include in the IPA.
13050 (trace_buffer_start): Delete.
13051 (struct trace_buffer_control): New.
13052 (trace_buffer_free): Delete.
13053 (struct ipa_trace_buffer_control): New.
13054 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13055 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13057 (trace_buffer_ctrl): New.
13058 (TRACE_BUFFER_CTRL_CURR): New.
13059 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13060 Reimplement as macros.
13061 (trace_buffer_wrap): Delete.
13062 (traceframe_write_count, traceframe_read_count)
13063 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13064 (struct tracepoint_hit_ctx) <type>: New field.
13065 (struct fast_tracepoint_ctx): New.
13066 (memory_barrier): New.
13068 (record_tracepoint_error): Update atomically in the IPA.
13069 (clear_inferior_trace_buffer): New.
13070 (about_to_request_buffer_space): New.
13071 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13072 updating the same buffer.
13073 (add_tracepoint): Default the tracepoint's type to trap
13074 tracepoint, and orig_size to -1.
13075 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13076 internal variables.
13077 (create_trace_state_variable): New parameter `gdb'. Handle it.
13078 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13079 (cmd_qtdp): Handle fast tracepoints.
13080 (cmd_qtdv): Adjust.
13081 (max_jump_pad_size): New.
13082 (gdb_jump_pad_head): New.
13083 (get_jump_space_head): New.
13084 (claim_jump_space): New.
13085 (sort_tracepoints): New.
13086 (MAX_JUMP_SIZE): New.
13087 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13089 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13090 support. Upload fast traceframes, and delete internal IPA
13092 (stop_tracing_handler): New.
13093 (flush_trace_buffer_handler): New.
13094 (cmd_qtstop): Upload fast tracepoints.
13095 (response_tracepoint): Handle fast tracepoints.
13096 (tracepoint_finished_step): Upload fast traceframes. Set the
13097 tracepoint hit context's tracepoint type.
13098 (handle_tracepoint_bkpts): New.
13099 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13100 type. Add comment about fast tracepoints.
13101 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13102 non-existing action_str field.
13103 (get_context_regcache): Handle fast tracepoints.
13104 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13106 (fast_tracepoint_from_jump_pad_address): New.
13107 (fast_tracepoint_from_ipa_tpoint_address): New.
13108 (collecting_t): New.
13109 (force_unlock_trace_buffer): New.
13110 (fast_tracepoint_collecting): New.
13112 (gdb_collect): New.
13113 (write_inferior_data_ptr): New.
13114 (target_tp_heap): New.
13115 (target_malloc): New.
13116 (download_agent_expr): New.
13118 (download_tracepoints): New.
13119 (download_trace_state_variables): New.
13120 (upload_fast_traceframes): New.
13121 (IPA_FIRST_TRACEFRAME): New.
13122 (IPA_NEXT_TRACEFRAME_1): New.
13123 (IPA_NEXT_TRACEFRAME): New.
13124 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13125 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13126 (gdb_jump_pad_buffer_end): New.
13127 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13128 (initialize_tracepoint): Adjust.
13129 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13130 buffer. Initialize the low module.
13131 * utils.c (PREFIX, TOOLNAME): New.
13132 (malloc_failure): Use PREFIX.
13133 (error): In the IPA, an error causes an exit.
13134 (fatal, warning): Use PREFIX.
13135 (internal_error): Use TOOLNAME.
13136 (NUMCELLS): Increase to 10.
13137 * configure, config.in: Regenerate.
13139 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13141 * server.c (handle_query) <qSupported>: Do two passes over the
13142 qSupported string to avoid nesting strtok.
13144 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13146 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13148 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13149 -Wl,--dynamic-list.
13150 * configure: Regenerate.
13151 * proc-service.list: New.
13153 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13155 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13158 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13160 * gdbreplay.c (remote_open): Check error return from socket() call by
13161 its equality to -1 not by it being negative.
13162 * remote-utils.c (remote_open): Likewise.
13164 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13166 * config.h: Regenerate.
13168 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13170 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13171 doesn't provide PTRACE_GET_THREAD_AREA.
13173 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13175 * linux-m68k-low.c: Include <asm/ptrace.h>
13176 (ps_get_thread_area): Implement.
13178 2010-05-03 Doug Evans <dje@google.com>
13180 * event-loop.c (struct callback_event): New struct.
13181 (callback_list): New global.
13182 (append_callback_event, delete_callback_event): New functions.
13183 (process_callback): New function.
13184 (start_event_loop): Call it.
13185 * remote-utils.c (NOT_SCHEDULED): Define.
13186 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13187 moved out of readchar.
13188 (readchar): Rewrite. Call reschedule before returning.
13189 (reset_readchar): New function.
13190 (remote_close): Call it.
13191 (process_remaining, reschedule): New functions.
13192 * server.h (callback_handler_func): New typedef.
13193 (append_callback_event, delete_callback_event): Declare.
13195 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13197 * proc-service.c (ps_pglobal_lookup): Use
13198 thread_db_look_up_one_symbol.
13199 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13200 parameter. Use it instead of all_symbols_looked_up.
13201 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13203 (all_symbols_looked_up): Don't declare.
13204 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13205 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13207 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13208 Set all_symbols_looked_up here.
13209 (thread_db_look_up_one_symbol): New.
13210 (thread_db_get_tls_address): Adjust.
13211 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13212 thread_db object on the heap, and tentatively set it in the
13214 (thread_db_init): Don't set all_symbols_looked_up here.
13215 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13217 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13219 * linux-low.c (linux_kill, linux_detach): Adjust.
13220 (status_pending_p_callback): Remove redundant statement. Check
13221 for !TARGET_WAITIKIND_IGNORE, instead of
13222 TARGET_WAITKIND_STOPPED.
13223 (handle_tracepoints): Make sure LWP is locked. Adjust.
13224 (linux_wait_for_event_1): Adjust.
13225 (linux_cancel_breakpoints): New.
13226 (unsuspend_one_lwp): New.
13227 (unsuspend_all_lwps): New.
13228 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13229 (send_sigstop_callback): Change return type to int, add new
13230 `except' parameter and handle it.
13231 (suspend_and_send_sigstop_callback): New.
13232 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13233 pass them down. If SUSPEND, also increment the lwp's suspend
13235 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13236 (need_step_over_p): Don't consider suspended LWPs.
13237 (start_step_over): Adjust.
13238 (proceed_one_lwp): Change return type to int, add new `except'
13239 parameter and handle it.
13240 (unsuspend_and_proceed_one_lwp): New.
13241 (proceed_all_lwps): Use find_inferior instead of
13243 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13244 also decrement the suspend count of LWPs. Pass `except' down,
13245 instead of hacking its suspend count.
13246 (linux_pause_all): Add `freeze' parameter. Adjust.
13247 (linux_unpause_all): New.
13248 (linux_target_ops): Install linux_unpause_all.
13249 * server.c (handle_status): Adjust.
13250 * target.h (struct target_ops): New fields `unpause_all' and
13251 `cancel_breakpoints'. Add new parameter to `pause_all'.
13252 (pause_all): Add new `freeze' parameter.
13253 (unpause_all): New.
13254 (cancel_breakpoints): New.
13255 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13256 cancel breakpoints.
13257 (cmd_qtstart): Pause threads.
13258 (stop_tracing): Pause threads, and cancel breakpoints.
13259 * win32-low.c (win32_target_ops): Adjust.
13261 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13263 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13264 the inferior right away from here...
13265 (linux_wait_1): ... to here, and adjust to check the thread's
13266 last_resume_kind instead of the lwp's step or stop_expected flags.
13268 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13270 * README: Use consistent `GDB' and `GDBserver' spellings.
13272 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13274 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13275 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13276 (linux_detach_one_lwp): Assume the lwp is stopped.
13277 (any_thread_of): Delete.
13278 (linux_detach): Stop all lwps here. Don't blindly delete all
13280 (delete_lwp_callback): New.
13281 (linux_mourn): Delete all lwps of the process that is gone.
13282 (linux_wait_1): Don't delete the last lwp of the process here.
13283 * mem-break.h (mark_breakpoints_out): Declare.
13284 * mem-break.c (mark_breakpoints_out): New.
13285 (free_all_breakpoints): Use it.
13286 * server.c (handle_target_event): If the process is gone, mark
13288 * thread-db.c (struct thread_db) <create_bp>: New field.
13289 (thread_db_enable_reporting): Fix prototype. Store a thread event
13290 breakpoint reference in the thread_db struct.
13291 (thread_db_load_search): Clear the thread_db object.
13292 (try_thread_db_load_1): Ditto.
13293 (switch_to_process): New.
13294 (disable_thread_event_reporting): Use it.
13295 (remove_thread_event_breakpoints): New.
13296 (thread_db_detach, thread_db_mourn): Use it.
13298 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13300 * linux-low.c (linux_enable_event_reporting): New.
13301 (linux_wait_for_event_1, handle_extended_wait): Use it.
13303 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13305 * linux-low.c (linux_kill_one_lwp, linux_kill)
13306 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13307 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13308 SIGSTOP even if the LWP is stopped.
13309 (send_sigstop_callback): New.
13310 (stop_all_lwps): Use send_sigstop_callback instead.
13311 (linux_resume_one_thread): Adjust.
13312 (proceed_one_lwp): Still proceed an LWP that the client has
13313 requested to stop, if we haven't reported it as stopped yet. Make
13314 sure that LWPs the client want stopped, have a pending SIGSTOP.
13316 2010-04-26 Doug Evans <dje@google.com>
13318 * server.c (handle_general_set): Make static.
13320 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13321 Print received char after testing for error/eof instead of before.
13322 (input_interrupt): Tweak comment.
13324 2010-04-23 Doug Evans <dje@google.com>
13326 * server.c (start_inferior): Print inferior argv if --debug.
13328 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13330 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13331 * nto-x86-low.c: Include server.h
13333 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13335 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13336 be consistent with other sources of this directory.
13337 (init_registers_amd64): Correct name of source file of this function
13340 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13342 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13343 64-bit executables.
13345 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13347 * win32-i386-low.c: Add 64-bit support.
13348 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13349 (init_registers_amd64): Declare.
13350 (mappings): Add 64-bit version of array.
13351 (init_windows_x86): New function.
13352 (the_low_target): Change init_arch field to init_windows_x86.
13354 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13356 * win32-low.c: Adapt to support also 64-bit architecture.
13357 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13358 (get_image_name): Use SIZE_T type for local variable `done'.
13359 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13360 (toolhelp_get_dll_name): Idem.
13361 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13362 Use uintptr_t typecast to avoid warning.
13363 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13364 (handle_exception): Use phex_nz to avoid warning.
13365 (win32_wait): Remove unused local variable `process'.
13367 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13369 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13372 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13374 * configure.ac: Use `ws2_32' library for srv_mingw.
13375 * configure: Regenerate.
13376 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13377 * remote-utils.c: Likewise.
13379 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13381 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13382 if __x86_64__ is defined.
13384 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13386 * configure: Regenerate.
13388 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13390 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13391 * target.h (target_ops): New get_tib_address field.
13392 * win32-low.h (win32_thread_info): Add thread_local_base field.
13393 * win32-low.c (child_add_thread): Add tlb argument.
13394 Set thread_local_base field to TLB.
13395 (get_child_debug_event): Adapt to child_add_thread change.
13396 (win32_get_tib_address): New function.
13397 (win32_target_ops): Set get_tib_address field to
13398 win32_get_tib_address.
13399 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13401 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13403 * linux-low.c (linux_mourn): Also remove the process.
13404 * server.c (handle_target_event): Don't remove the process here.
13405 * nto-low.c (nto_mourn): New.
13406 (nto_target_ops): Install it.
13407 * spu-low.c (spu_mourn): New.
13408 (spu_target_ops): Install it.
13409 * win32-low.c (win32_mourn): New.
13410 (win32_target_ops): Install it.
13412 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13414 * server.h (buffer_xml_printf): Remove redundant `;'.
13416 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13418 * regcache.c (set_register_cache): Invalidate regcaches before
13419 changing the register cache layout.
13420 (regcache_invalidate_one): Allow a NULL regcache.
13421 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13422 regcaches before changing the register cache layout or the target
13425 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13427 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13428 variable warning on Linux/x86-64.
13430 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13432 GDBserver disconnected tracing support.
13434 * linux-low.c (linux_remove_process): Delete.
13435 (add_lwp): Don't set last_resume_kind here.
13436 (linux_kill): Use `mourn'.
13437 (linux_detach): Use `thread_db_detach', and `mourn'.
13438 (linux_mourn): New.
13439 (linux_attach_lwp_1): Adjust comment.
13440 (linux_attach): last_resume_kind moved the thread_info; adjust.
13441 (status_pending_p_callback): Adjust.
13442 (linux_wait_for_event_1): Adjust.
13443 (count_events_callback, select_singlestep_lwp_callback)
13444 (select_event_lwp_callback, cancel_breakpoints_callback)
13445 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13446 (proceed_one_lwp): Adjust.
13447 (linux_async): Add debug output.
13448 (linux_thread_stopped): New.
13449 (linux_pause_all): New.
13450 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13452 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13453 (thread_db_free): Delete declaration.
13454 (thread_db_detach, thread_db_mourn): Declare.
13455 * thread-db.c (thread_db_init): Use thread_db_mourn.
13456 (thread_db_free): Delete, split in two.
13457 (disable_thread_event_reporting): New.
13458 (thread_db_detach): New.
13459 (thread_db_mourn): New.
13461 * server.h (struct thread_info) <last_resume_kind>: New field.
13462 <attached>: Add comment.
13463 <gdb_detached>: New field.
13464 (handler_func): Change return type to int.
13465 (handle_serial_event, handle_target_event): Ditto.
13466 (gdb_connected): Declare.
13468 (disconnected_tracing): Declare.
13469 (stop_tracing): Declare.
13471 * server.c (handle_query) <qSupported>: Report support for
13472 disconnected tracing.
13473 (queue_stop_reply_callback): Account for running threads.
13474 (gdb_wants_thread_stopped): New.
13475 (gdb_wants_all_threads_stopped): New.
13476 (gdb_reattached_process): New.
13477 (handle_status): Clear the `gdb_detached' flag of all processes.
13478 In all-stop, stop all threads.
13479 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13480 (process_serial_event): If the remote connection breaks, or if an
13481 exit was forced with "monitor exit", force an event loop exit.
13482 Handle disconnected tracing on detach.
13483 (handle_serial_event): Adjust.
13484 (handle_target_event): If GDB isn't connected, forward events back
13485 to the inferior, unless the last process exited, in which case,
13486 exit gdbserver. Adjust interface.
13488 * remote-utils.c (remote_open): Don't block in accept. Instead
13489 register an event loop source on the listen socket file
13490 descriptor. Refactor bits into ...
13491 (listen_desc): ... this new global.
13492 (gdb_connected): ... this new function.
13493 (enable_async_notification): ... this new function.
13494 (handle_accept_event): ... this new function.
13495 (remote_close): Clear remote_desc.
13497 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13499 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13501 (mourn_inferior): Define.
13502 (target_process_qsupported): Avoid the dangling else problem.
13503 (thread_stopped): Define.
13504 (pause_all): Define.
13505 (target_waitstatus_to_string): Declare.
13506 * target.c (target_waitstatus_to_string): New.
13508 * tracepoint.c (tracing): Make extern.
13509 (disconnected_tracing): New.
13510 (stop_tracing): Make extern. Handle tracing stops due to GDB
13512 (cmd_qtdisconnected): New.
13513 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13514 (handle_tracepoint_general_set): Handle QTDisconnected.
13516 * event-loop.c (event_handler_func): Change return type to int.
13517 (process_event): Bail out if the event handler wants the event
13519 (handle_file_event): Ditto.
13520 (start_event_loop): Bail out if the event handler wants the event
13523 * nto-low.c (nto_target_ops): Adjust.
13524 * spu-low.c (spu_wait): Don't remove the process here.
13525 (spu_target_ops): Adjust.
13526 * win32-low.c (win32_wait): Don't remove the process here.
13527 (win32_target_ops): Adjust.
13529 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13531 * regcache.c (realloc_register_cache): Invalidate inferior's
13532 regcache before recreating it.
13534 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13536 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13538 2010-04-09 Stan Shebs <stan@codesourcery.com>
13539 Pedro Alves <pedro@codesourcery.com>
13541 * server.h (LONGEST): New.
13542 (struct thread_info) <while_stepping>: New field.
13543 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13545 (initialize_tracepoint, handle_tracepoint_general_set)
13546 (handle_tracepoint_query, tracepoint_finished_step)
13547 (tracepoint_was_hit, release_while_stepping_state_list):
13548 (current_traceframe): Declare.
13549 * server.c (handle_general_set): Handle tracepoint packets.
13550 (read_memory): New.
13551 (write_memory): New.
13552 (handle_search_memory_1): Use read_memory.
13553 (handle_query): Report support for conditional tracepoints, trace
13554 state variables, and tracepoint sources. Handle tracepoint
13556 (main): Initialize the tracepoints module.
13557 (process_serial_event): Handle traceframe reads/writes.
13559 * linux-low.c (handle_tracepoints): New.
13560 (linux_wait_1): Call it.
13561 (linux_resume_one_lwp): Handle while-stepping.
13562 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13563 (linux_target_ops): Install them.
13564 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13566 * linux-x86-low.c (x86_supports_tracepoints): New.
13567 (the_low_target). Install it.
13569 * mem-break.h (delete_breakpoint): Declare.
13570 * mem-break.c (delete_breakpoint): Make external.
13572 * target.h (struct target_ops): Add `supports_tracepoints',
13573 `read_pc', and `write_pc' fields.
13574 (target_supports_tracepoints): Define.
13575 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13578 * regcache.h (struct regcache) <registers_owned>: New field.
13579 (init_register_cache, regcache_cpy): Declare.
13580 (regcache_read_pc, regcache_write_pc): Declare.
13581 (register_cache_size): Declare.
13582 (supply_regblock): Declare.
13583 * regcache.c (init_register_cache): New.
13584 (new_register_cache): Use it.
13585 (regcache_cpy): New.
13586 (register_cache_size): New.
13587 (supply_regblock): New.
13588 (regcache_read_pc, regcache_write_pc): New.
13590 * tracepoint.c: New.
13592 * Makefile.in (OBS): Add tracepoint.o.
13593 (tracepoint.o): New rule.
13595 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13597 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13599 (i386-mmx.c): Likewise.
13600 (i386-mmx-linux.o): Likewise.
13601 (i386-mmx-linux.c): Likewise.
13603 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13604 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13605 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13606 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13608 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13609 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13610 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13612 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13614 * Makefile.in (clean): Updated.
13616 (i386-avx.c): Likewise.
13617 (i386-avx-linux.o): Likewise.
13618 (i386-avx-linux.c): Likewise.
13619 (amd64-avx.o): Likewise.
13620 (amd64-avx.c): Likewise.
13621 (amd64-avx-linux.o): Likewise.
13622 (amd64-avx-linux.c): Likewise.
13624 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13625 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13626 (srv_amd64_regobj): Add amd64-avx.o.
13627 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13628 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13629 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13630 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13631 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13632 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13633 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13635 * i387-fp.c: Include "i386-xstate.h".
13637 (i387_cache_to_xsave): Likewise.
13638 (i387_xsave_to_cache): Likewise.
13639 (x86_xcr0): Likewise.
13641 * i387-fp.h (i387_cache_to_xsave): Likewise.
13642 (i387_xsave_to_cache): Likewise.
13643 (x86_xcr0): Likewise.
13645 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13646 * linux-crisv32-low.c (target_regsets): Likewise.
13647 * linux-m68k-low.c (target_regsets): Likewise.
13648 * linux-mips-low.c (target_regsets): Likewise.
13649 * linux-ppc-low.c (target_regsets): Likewise.
13650 * linux-s390-low.c (target_regsets): Likewise.
13651 * linux-sh-low.c (target_regsets): Likewise.
13652 * linux-sparc-low.c (target_regsets): Likewise.
13653 * linux-xtensa-low.c (target_regsets): Likewise.
13655 * linux-low.c: Include <sys/uio.h>.
13656 (regsets_fetch_inferior_registers): Support nt_type.
13657 (regsets_store_inferior_registers): Likewise.
13658 (linux_process_qsupported): New.
13659 (linux_target_ops): Add linux_process_qsupported.
13661 * linux-low.h (regset_info): Add nt_type.
13662 (linux_target_ops): Add process_qsupported.
13664 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13666 (init_registers_i386_avx_linux): New.
13667 (init_registers_amd64_avx_linux): Likewise.
13668 (xmltarget_i386_linux_no_xml): Likewise.
13669 (xmltarget_amd64_linux_no_xml): Likewise.
13670 (PTRACE_GETREGSET): Likewise.
13671 (PTRACE_SETREGSET): Likewise.
13672 (x86_fill_xstateregset): Likewise.
13673 (x86_store_xstateregset): Likewise.
13674 (use_xml): Likewise.
13675 (x86_linux_update_xmltarget): Likewise.
13676 (x86_linux_process_qsupported): Likewise.
13677 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13678 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13679 init_registers_i386_linux here. Call
13680 x86_linux_update_xmltarget.
13681 (the_low_target): Add x86_linux_process_qsupported.
13683 * server.c (handle_query): Call target_process_qsupported.
13685 * target.h (target_ops): Add process_qsupported.
13686 (target_process_qsupported): New.
13688 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13690 * inferiors.c (add_thread): Set last_status kind to
13691 TARGET_WAITKIND_IGNORE.
13692 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13693 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13694 (linux_wait_1): Move `thread' local definition to block that uses
13695 it. Don't NULL initialize `event_child'.
13696 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13697 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13698 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13700 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13702 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13703 an extended waitstatus, or by a watchpoint.
13704 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13705 thread was stepping or has been stopped by a watchpoint.
13707 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13709 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13710 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13711 of another, then delete the previous, and validate all
13713 (validate_inserted_breakpoint): New.
13714 (delete_disabled_breakpoints): New.
13715 (validate_breakpoints): New.
13716 (check_mem_read): Validate breakpoints before trusting their
13717 shadow. Delete disabled breakpoints.
13718 (check_mem_write): Validate breakpoints before trusting they
13719 should be inserted. Delete disabled breakpoints.
13720 * mem-break.h (validate_breakpoints):
13721 * server.c (handle_query): Validate breakpoints when we see a
13724 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13726 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13727 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13728 if we could tell there's a GDB breakpoint at stop_pc.
13729 (need_step_over_p): Don't do a step over if we find a GDB
13730 breakpoint at the resume PC.
13732 * mem-break.c (struct raw_breakpoint): New.
13733 (enum bkpt_type): New type `gdb_breakpoint'.
13734 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13735 fields. New field `raw'.
13736 (find_raw_breakpoint_at): New.
13737 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13738 breakpoint instead.
13739 (set_breakpoint_at): Adjust.
13740 (delete_raw_breakpoint): New.
13741 (release_breakpoint): New.
13742 (delete_breakpoint): Rename to...
13743 (delete_breakpoint_1): ... this. Add proc parameter. Use
13744 release_breakpoint. Return ENOENT.
13745 (delete_breakpoint): Reimplement.
13746 (find_breakpoint_at): Delete.
13747 (find_gdb_breakpoint_at): New.
13748 (delete_breakpoint_at): Delete.
13749 (set_gdb_breakpoint_at): New.
13750 (delete_gdb_breakpoint_at): New.
13751 (gdb_breakpoint_here): New.
13752 (set_reinsert_breakpoint): Use release_breakpoint.
13753 (uninsert_breakpoint): Rename to ...
13754 (uninsert_raw_breakpoint): ... this.
13755 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13756 (reinsert_raw_breakpoint): Change parameter type to
13758 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13760 (check_breakpoints): Adjust. Use release_breakpoint.
13761 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13762 (breakpoint_inserted_here): Ditto.
13763 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13764 Don't trust the breakpoint's shadow if it is not inserted.
13765 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13766 (delete_all_breakpoints): Adjust.
13767 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13768 use delete_breakpoint_1.
13770 * mem-break.h (breakpoints_supported): Delete declaration.
13771 (set_gdb_breakpoint_at): Declare.
13772 (gdb_breakpoint_here): Declare.
13773 (delete_breakpoint_at): Delete.
13774 (delete_gdb_breakpoint_at): Declare.
13776 * server.h (struct raw_breakpoint): Forward declare.
13777 (struct process_info): New field `raw_breakpoints'.
13779 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13782 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13784 * linux-low.c (status_pending_p_callback): Fix comment.
13785 (linux_wait_for_event_1): Move most of the internal breakpoint
13786 handling from here...
13787 (linux_wait_1): ... to here.
13788 (count_events_callback): New.
13789 (select_singlestep_lwp_callback): New.
13790 (select_event_lwp_callback): New.
13791 (cancel_breakpoints_callback): New.
13792 (select_event_lwp): New.
13793 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13794 priority to all LWPs that have had events that should be reported
13795 to the client. Cancel breakpoints when about to reporting the
13796 event to the client, not while stopping lwps. No longer cancel
13797 finished single-steps here.
13798 (cancel_finished_single_step): Delete.
13799 (cancel_finished_single_steps): Delete.
13801 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13803 * mem-break.c (enum bkpt_type): New.
13804 (struct breakpoint): New field `type'.
13805 (set_breakpoint_at): Change return type to struct breakpoint
13806 pointer. Set type to `other_breakpoint' by default.
13807 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13808 in the breakpoint list.
13809 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13810 (reinsert_breakpoint): Rename to ...
13811 (reinsert_raw_breakpoint): ... this.
13812 (reinsert_breakpoints_at): Adjust.
13813 * mem-break.h (struct breakpoint): Declare.
13814 (set_breakpoint_at): Change return type to struct breakpoint
13817 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13819 * server.c (handle_query): Assign, not compare.
13821 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13823 Teach linux gdbserver to step-over-breakpoints.
13825 * linux-low.c (can_hardware_single_step): New.
13826 (supports_breakpoints): New.
13827 (handle_extended_wait): If stopping threads, read the stop pc of
13828 the new cloned LWP.
13830 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13831 low target doesn't support retrieving the PC.
13832 (add_lwp): Set last_resume_kind to resume_continue.
13833 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13834 (linux_attach): Don't clear stop_expected. Set the lwp's
13835 last_resume_kind to resume_stop.
13836 (linux_detach_one_lwp): Don't check for removed breakpoints.
13837 (check_removed_breakpoint): Delete.
13838 (status_pending_p): Rename to ...
13839 (status_pending_p_callback): ... this. Don't check for removed
13840 breakpoints. Don't consider threads that are stopped from GDB's
13842 (linux_wait_for_lwp): Always read the stop_pc here.
13843 (cancel_breakpoint): New.
13844 (step_over_bkpt): New global.
13845 (linux_wait_for_event_1): Implement stepping over breakpoints.
13846 (gdb_wants_lwp_stopped): New.
13847 (gdb_wants_all_stopped): New.
13848 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13849 single-step traps here. Store the thread's last reported target
13851 (send_sigstop): Don't clear stop_expected. Always set it,
13853 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13854 (cancel_finished_single_step): New.
13855 (cancel_finished_single_steps): New.
13856 (wait_for_sigstop): Don't cancel finished single-step traps here.
13857 (linux_resume_one_lwp): Don't check for removed breakpoints.
13858 Don't set `step' on non-hardware step archs.
13859 (linux_set_resume_request): Ignore resume_stop requests if already
13860 stopping or stopped. Set the lwp's last_resume_kind.
13861 (resume_status_pending_p): Don't check for removed breakpoints.
13862 (need_step_over_p): New.
13863 (start_step_over): New.
13864 (finish_step_over): New.
13865 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13866 requests. Clear the thread's last reported target waitstatus.
13867 Don't use the `suspended' flag. Don't consider pending breakpoints.
13868 (linux_resume): Start a step-over if necessary.
13869 (proceed_one_lwp): New.
13870 (proceed_all_lwps): New.
13871 (unstop_all_lwps): New.
13872 * linux-low.h (struct lwp_info): Rewrite comment for the
13873 `suspended' flag. Add the `stop_pc' field. Delete the
13874 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13875 Add `'last_resume_kind' and `need_step_over' fields.
13876 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13877 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13878 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13879 (set_raw_breakpoint_at): New.
13880 (set_breakpoint_at): Rewrite to use it.
13881 (reinsert_breakpoint_handler): Delete.
13882 (set_reinsert_breakpoint): New.
13883 (reinsert_breakpoint_by_bp): Delete.
13884 (delete_reinsert_breakpoints): New.
13885 (uninsert_breakpoint): Rewrite.
13886 (uninsert_breakpoints_at): New.
13887 (reinsert_breakpoint): Rewrite.
13888 (reinsert_breakpoints_at): New.
13889 (check_breakpoints): Rewrite.
13890 (breakpoint_here): New.
13891 (breakpoint_inserted_here): New.
13892 (check_mem_read): Adjust.
13893 * mem-break.h (breakpoints_supported, breakpoint_here)
13894 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13895 (reinsert_breakpoint_by_bp): Delete declaration.
13896 (delete_reinsert_breakpoints): Declare.
13897 (reinsert_breakpoint): Delete declaration.
13898 (reinsert_breakpoints_at): Declare.
13899 (uninsert_breakpoint): Delete declaration.
13900 (uninsert_breakpoints_at): Declare.
13901 (check_breakpoints): Adjust prototype.
13902 * server.h: Adjust include order.
13903 (struct thread_info): Declare here. Add a `last_status' field.
13905 2010-03-23 Michael Snyder <msnyder@vmware.com>
13907 * server.c (crc32): New function.
13908 (handle_query): Add handling for 'qCRC:' request.
13910 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13912 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13913 lwp had been stopped by a watchpoint.
13915 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13917 * server.h (internal_error): Declare.
13918 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13919 * utils.c (internal_error): New function.
13921 2010-03-15 Andreas Schwab <schwab@redhat.com>
13923 * configure.srv: Fix typo setting srv_regobj.
13925 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13927 * linux-low.c (fetch_register): Avoid passing a non string literal
13929 (usr_store_inferior_registers): Ditto.
13931 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13933 * linux-low.c (linux_write_memory): Bail out early if peeking
13936 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13938 * linux-low.h (struct lwp_info): New fields
13939 `stopped_by_watchpoint' and `stopped_data_address'.
13940 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13941 here, and cache them in the lwp object.
13942 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13944 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13946 (linux_stopped_by_watchpoint): Rewrite.
13947 (linux_stopped_data_address): Rewrite.
13949 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13951 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13952 switching the current inferior, not before.
13954 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13956 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13957 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13958 i386-linux.c and amd64-linux.c.
13959 (reg-i386.o): Removed.
13960 (reg-i386.c): Likewise.
13961 (reg-i386-linux.o): Likewise.
13962 (reg-i386-linux.c): Likewise.
13963 (reg-x86-64.o): Likewise.
13964 (reg-x86-64.c): Likewise.
13965 (reg-x86-64-linux.o): Likewise.
13966 (reg-x86-64-linux.c): Likewise.
13968 (i386.c): Likewise.
13969 (i386-linux.o): Likewise.
13970 (i386-linux.c): Likewise.
13971 (amd64.o): Likewise.
13972 (amd64.c): Likewise.
13973 (amd64-linux.o): Likewise.
13974 (amd64-linux.c): Likewise.
13976 * configure.srv (srv_i386_regobj): New.
13977 (srv_i386_linux_regobj): Likewise.
13978 (srv_amd64_regobj): Likewise.
13979 (srv_amd64_linux_regobj): Likewise.
13980 (srv_i386_32bit_xmlfiles): Likewise.
13981 (srv_i386_64bit_xmlfiles): Likewise.
13982 (srv_i386_xmlfiles): Likewise.
13983 (srv_amd64_xmlfiles): Likewise.
13984 (srv_i386_linux_xmlfiles): Likewise.
13985 (srv_amd64_linux_xmlfiles): Likewise.
13986 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13987 srv_xmlfiles to $srv_i386_xmlfiles.
13988 (i[34567]86-*-mingw32ce*): Likewise.
13989 (i[34567]86-*-mingw*): Likewise.
13990 (i[34567]86-*-nto*): Likewise.
13991 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13992 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13993 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13994 (x86_64-*-linux*): Likewise.
13996 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13997 (init_registers_amd64_linux): New.
13998 (x86_arch_setup): Replace init_registers_x86_64_linux with
13999 init_registers_amd64_linux.
14001 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14003 * configure.ac: Check for libdl. If it is not available link against
14004 static libthread_db.
14005 * configure: Regenerate.
14007 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14011 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14012 handing a read watchpoint.
14013 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14015 2010-02-12 Doug Evans <dje@google.com>
14017 * linux-low.c (linux_supports_tracefork_flag): Document.
14018 (linux_look_up_symbols): Add comment.
14020 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14022 * regcache.c (supply_register): Clear regcache if buf is NULL.
14024 2010-02-02 Nicolas Roche <roche@sourceware.org>
14025 Joel Brobecker <brobecker@adacore.com>
14027 * inferiors.c (find_inferior): Add function documentation.
14028 (unloaded_dll): Handle the case where the unloaded dll has not
14029 been previously registered in the dll list.
14031 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14033 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14034 (thumb2_breakpoint): New.
14035 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14037 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14039 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14040 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14043 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14045 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14047 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14049 * linux-s390-low.c (s390_collect_ptrace_register)
14050 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14052 2010-01-21 Doug Evans <dje@google.com>
14054 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14055 (PTRACE_ARG4_TYPE): New macro.
14056 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14057 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14058 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14059 (usr_store_inferior_registers): Ditto.
14060 (linux_read_memory, linux_write_memory): Ditto.
14061 (linux_test_for_tracefork): Ditto.
14063 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14064 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14066 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14068 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14071 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14073 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14074 prototype to take a regcache. Adjust.
14076 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14078 * regcache.h (struct thread_info): Forward declare.
14079 (struct regcache): New.
14080 (new_register_cache): Adjust prototype.
14081 (get_thread_regcache): Declare.
14082 (free_register_cache): Adjust prototype.
14083 (registers_to_string, registers_from_string): Ditto.
14084 (supply_register, supply_register_by_name, collect_register)
14085 (collect_register_as_string, collect_register_by_name): Ditto.
14086 * regcache.c (struct inferior_regcache_data): Delete.
14087 (get_regcache): Rename to ...
14088 (get_thread_regcache): ... this. Adjust. Switch inferior before
14089 fetching registers.
14090 (regcache_invalidate_one): Adjust.
14091 (regcache_invalidate): Fix prototype.
14092 (new_register_cache): Return the new register cache.
14093 (free_register_cache): Change prototype.
14094 (realloc_register_cache): Adjust.
14095 (registers_to_string): Change prototype to take a regcache. Adjust.
14096 (registers_from_string): Ditto.
14097 (register_data): Ditto.
14098 (supply_register): Ditto.
14099 (supply_register_by_name): Ditto.
14100 (collect_register): Ditto.
14101 (collect_register_as_string): Ditto.
14102 (collect_register_by_name): Ditto.
14103 * server.c (process_serial_event): Adjust.
14104 * linux-low.h (regset_fill_func, regset_store_func): Change
14106 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14108 * linux-low.c (get_stop_pc): Adjust.
14109 (check_removed_breakpoint): Adjust.
14110 (linux_wait_for_event): Adjust.
14111 (linux_resume_one_lwp): Adjust.
14112 (fetch_register): Add regcache parameter. Adjust.
14113 (usr_store_inferior_registers): Ditto.
14114 (regsets_fetch_inferior_registers): Ditto.
14115 (regsets_store_inferior_registers): Ditto.
14116 (linux_fetch_registers, linux_store_registers): Ditto.
14117 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14119 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14121 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14122 prototype to take a regcache.
14123 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14124 * remote-utils.c (convert_ascii_to_int, outreg)
14125 (prepare_resume_reply): Change prototype to take a regcache.
14127 * target.h (struct target_ops) <fetch_registers, store_registers>:
14128 Change prototype to take a regcache.
14129 (fetch_inferior_registers, store_inferior_registers): Change
14130 prototype to take a regcache. Adjust.
14131 * proc-service.c (ps_lgetregs): Adjust.
14132 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14133 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14134 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14135 take a regcache. Adjust.
14136 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14137 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14138 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14139 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14140 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14141 (cris_cannot_fetch_register):
14142 (cris_breakpoint_at): Change prototype to take a regcache.
14144 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14145 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14146 to take a regcache. Adjust.
14147 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14149 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14150 take a regcache. Adjust.
14151 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14152 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14153 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14154 * linux-mips-low.c (mips_get_pc):
14155 (mips_set_pc): Change prototype to take a regcache. Adjust.
14156 (mips_reinsert_addr): Adjust.
14157 (mips_collect_register): Change prototype to take a regcache.
14159 (mips_supply_register):
14160 (mips_collect_register_32bit, mips_supply_register_32bit)
14161 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14162 (mips_store_fpregset): Ditto.
14163 * linux-ppc-low.c (ppc_supply_ptrace_register)
14164 (ppc_supply_ptrace_register): Ditto.
14165 (parse_spufs_run): Adjust.
14166 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14167 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14168 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14169 take a regcache. Adjust.
14170 * linux-s390-low.c (s390_collect_ptrace_register)
14171 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14172 (s390_set_pc): Change prototype to take a regcache. Adjust.
14173 (s390_arch_setup): Adjust.
14174 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14175 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14176 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14177 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14178 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14180 (sparc_breakpoint_at): Adjust.
14181 * linux-xtensa-low.c (xtensa_fill_gregset):
14182 (xtensa_store_gregset):
14183 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14184 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14185 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14186 prototype to take a regcache. Adjust.
14187 * win32-arm-low.c (arm_fetch_inferior_register)
14188 (arm_store_inferior_register): Change prototype to take a
14190 * win32-i386-low.c (i386_fetch_inferior_register)
14191 (i386_store_inferior_register): Change prototype to take a
14193 * win32-low.c (child_fetch_inferior_registers)
14194 (child_store_inferior_registers): Change prototype to take a
14196 (win32_wait): Adjust.
14197 (win32_fetch_inferior_registers): Change prototype to take a
14199 (win32_store_inferior_registers): Adjust.
14200 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14201 store_inferior_register>: Change prototype to take a regcache.
14203 2010-01-20 Doug Evans <dje@google.com>
14205 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14207 (linux_wait_for_event1, linux_init_signals): Ditto.
14208 (W_STOPCODE): Provide definition if missing.
14210 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14212 * linux-low.c (linux_core_of_thread): New.
14213 (compare_ints, show_process, list_threads): New.
14214 (linux_qxfer_osdata): Report threads and cores.
14215 (linux_target_op): Register linux_core_of_thread.
14216 * remote-utils.c (prepare_resume_reply): Report the core.
14217 (buffer_xml_printf): Support %d specifier.
14218 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14220 (handle_query): Handle qXfer:threads. Announce availability
14222 * target.h (struct target_ops): New field core_of_thread.
14224 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14226 * Makefile.in (clean): Remove new generated files.
14227 (reg-s390.o, reg-s390.c): Remove rules.
14228 (reg-s390x.o, reg-s390x.c): Likewise.
14229 (s390-linux32.o, s390-linux32.c): Add rules.
14230 (s390-linux64.o, s390-linux64.c): Likewise.
14231 (s390x-linux64.o, s390x-linux64.c): Likewise.
14232 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14233 * linux-s390-low.c: Include <elf.h>.
14234 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14235 (init_registers_s390): Remove prototype.
14236 (init_registers_s390x): Likewise.
14237 (init_registers_s390_linux32): Add prototype.
14238 (init_registers_s390_linux64): Likewise.
14239 (init_registers_s390x_linux64): Likewise.
14240 (s390_num_regs_3264): New define.
14241 (s390_regmap_3264): New global variable.
14242 (s390_cannot_fetch_register): Remove obsolete check.
14243 (s390_cannot_store_register): Likewise.
14244 (s390_collect_ptrace_register): Handle upper/lower register halves.
14245 (s390_supply_ptrace_register): Likewise.
14246 (s390_fill_gregset): Update to register number changes.
14247 (s390_get_hwcap): New routine.
14248 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14249 Install appropriate regmap and register set.
14251 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14253 * server.c (gdbserver_version): Update copyright year to 2010.
14254 * gdbreplay.c (gdbreplay_version): Likewise.
14256 2009-12-28 Doug Evans <dje@google.com>
14258 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14259 elf/external.h. Include <elf.h> instead but only if necessary.
14261 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14263 * linux-low.c (linux_remove_process): Remove `detaching'
14264 parameter. Don't release/detach from thread_db here.
14265 (linux_kill): Release/detach from thread_db here, ...
14266 (linux_detach): ... and here, before actually detaching.
14267 (linux_wait_1): ... and here, when a process exits.
14268 * thread-db.c (any_thread_of): New.
14269 (thread_db_free): Switch the current inferior to a thread of the
14272 2009-12-21 Doug Evans <dje@google.com>
14274 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14276 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14277 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14278 warning ifndef __NR_tkill. Move setting of errno there too.
14279 Delete unnecessary resetting of errno after syscall.
14280 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14282 * configure.ac: Check for dladdr.
14283 * config.in: Regenerate.
14284 * configure: Regenerate.
14285 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14286 (try_thread_db_load): Update.
14288 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14290 2009-12-18 Doug Evans <dje@google.com>
14292 * event-loop.c: Include unistd.h if it exists.
14294 * linux-low.c (my_waitpid): Move definition away from being in
14295 between linux_tracefork_child/linux_test_for_tracefork.
14297 * gdb_proc_service.h (psaddr_t): Fix type.
14298 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14299 signature to match glibc.
14301 2009-12-16 Doug Evans <dje@google.com>
14303 * linux-low.c (linux_read_memory): Fix argument to read.
14305 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14307 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14308 events, don't leave current_inferior pointing at null.
14310 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14312 * win32-low.c (LOG): Delete.
14313 (OUTMSG): Output to stderr.
14314 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14315 on compile time LOG macro.
14316 (win32_wait): Fix debug output.
14318 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14320 * win32-low.c (win32_add_one_solib): If the dll name is
14321 "ntdll.dll", prepend the system directory to the dll path.
14323 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14325 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14327 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14328 Vladimir Prus <vladimir@codesourcery.com>
14330 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14331 * configure.ac: Check for __mcoldfire__ and set
14332 gdb_cv_m68k_is_coldfire.
14333 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14334 reg-cf.o and reg-m68k.o.
14335 * configure: Regenerated.
14337 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14339 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14340 Pass it to thread_db_free.
14341 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14342 proper `detaching' argument to linux_remove_process.
14343 * linux-low.h (thread_db_free): Add `detaching' parameter.
14344 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14346 (thread_db_free): Add `detaching' parameter. Only
14347 call td_ta_clear_event if detaching from process.
14349 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14351 * thread-db.c (thread_db_free): Fix typo.
14353 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14356 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14358 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14360 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14361 with an i686 compiler.
14362 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14364 * configure: Rebuilt.
14366 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14370 * server.c (handle_search_memory_1): Correct read_addr initialization
14371 in loop for searching subsequent chunks.
14373 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14375 * configure.ac: New --with-libthread-db option.
14376 * thread-db.c: Allow direct dependence on libthread_db.
14377 (thread_db_free): Adjust.
14378 * config.in: Regenerate.
14379 * configure: Likewise.
14381 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14384 * thread-db.c (attach_thread): New function.
14385 (maybe_attach_thread): Return success/failure.
14386 (find_new_threads_callback): Adjust.
14387 (thread_db_find_new_threads): Loop until no new threads.
14389 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14391 * proc-service.c (ps_lgetregs): Formatting.
14393 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14395 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14396 * configure.ac: Adjust.
14397 * linux-low.h (struct process_info_private): Move members to struct
14399 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14400 * linux-low.c (linux_remove_process): Adjust.
14401 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14402 * server.c (handle_query): Move code ...
14403 (handle_monitor_command): ... here. New function.
14404 * target.h (struct target_ops): New member.
14405 * thread-db.c (struct thread_db): New.
14406 (libthread_db_search_path): New variable.
14407 (thread_db_create_event, thread_db_enable_reporting)
14408 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14409 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14410 (try_thread_db_load_1, dladdr_to_soname): New functions.
14411 (try_thread_db_load, thread_db_load_search): New functions.
14412 (thread_db_init): Search for libthread_db.
14413 (thread_db_free): New function.
14414 (thread_db_handle_monitor_command): Likewise.
14415 * config.in: Regenerate.
14416 * configure: Regenerate.
14418 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14420 * spu-low.c (spu_kill): Wait for inferior to terminate.
14421 Call clear_inferiors.
14422 (spu_detach): Call clear_inferiors.
14424 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14426 * aclocal.m4: Regenerate.
14427 * config.in: Likewise.
14428 * configure: Likewise.
14430 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14432 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14433 (parse_spufs_run): New function.
14434 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14435 (ppc_breakpoint_at): Handle SPU breakpoints.
14437 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14439 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14440 (SPUFS_MAGIC): Define.
14441 (spu_enumerate_spu_ids): New function.
14442 (linux_qxfer_spu): New function.
14443 (linux_target_ops): Install linux_qxfer_spu.
14445 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14447 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14448 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14449 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14450 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14451 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14452 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14453 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14454 (init_registers_powerpc_cell32l): Add prototype.
14455 (init_registers_powerpc_cell64l): Likewise.
14456 (ppc_arch_setup): Detect Cell/B.E. architecture.
14458 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14460 * Makefile.in (datarootdir): New variable.
14462 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14464 * linux-low.c (linux_write_memory): Update debugging output.
14465 * Makefile.in (clean): Add new descriptions.
14466 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14467 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14468 * configure.srv: Add new files for arm*-*-linux*.
14469 * linux-arm-low.c: Add new declarations.
14470 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14471 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14472 (HWCAP_VFPv3D16): New.
14473 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14474 instead of __IWMMXT__.
14475 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14476 (arm_arch_setup): New.
14477 (target_regsets): Remove #ifdef. Add VFP regset.
14478 (the_low_target): Use arm_arch_setup.
14480 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14482 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14483 the main thread again.
14485 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14487 Adding Neutrino gdbserver.
14488 * configure: Regenerated.
14489 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14490 * configure.srv (i[34567]86-*-nto*): New target.
14491 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14492 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14493 (nto_comctrl) [__QNX__]: New function.
14494 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14496 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14498 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14501 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14502 Pedro Alves <pedro@codesourcery.com>
14504 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14505 don't support CONTEXT_EXTENDED_REGISTERS.
14506 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14507 (the_low_target): Install them.
14508 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14509 failing with ERROR_PIPE_NOT_CONNECTED.
14511 2009-06-30 Doug Evans <dje@google.com>
14512 Pierre Muller <muller@ics.u-strasbg.fr>
14514 Add h/w watchpoint support to x86-linux, win32-i386.
14515 * Makefile.in (SFILES): Add i386-low.c
14516 (i386_low_h): Define.
14517 (i386-low.o): Add dependencies.
14518 (linux-x86-low.o): Add i386-low.h dependency.
14519 (win32-i386-low.o): Ditto.
14520 * i386-low.c: New file.
14521 * i386-low.h: New file.
14522 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14523 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14524 * linux-low.c (linux_add_process): Initialize arch_private.
14525 (linux_remove_process): Free arch_private.
14526 (add_lwp): Initialize arch_private.
14527 (delete_lwp): Free arch_private.
14528 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14530 * linux-low.h (process_info_private): New member arch_private.
14531 (lwp_info): New member arch_private.
14532 (linux_target_ops): New members new_process, new_thread,
14534 (ptid_of): New macro.
14535 * linux-x86-low.c: Include stddef.h, i386-low.h.
14536 (arch_process_info): New struct.
14537 (arch_lwp_info): New struct.
14538 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14539 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14540 (i386_dr_low_get_status): New function.
14541 (x86_insert_point, x86_remove_point): New functions.
14542 (x86_stopped_by_watchpoint): New function.
14543 (x86_stopped_data_address): New function.
14544 (x86_linux_new_process, x86_linux_new_thread): New functions.
14545 (x86_linux_prepare_to_resume): New function.
14546 (the_low_target): Add entries for insert_point, remove_point,
14547 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14549 * server.c (debug_hw_points): New global.
14550 (monitor_show_help): Document set debug-hw-points.
14551 (handle_query): Process "set debug-hw-points".
14552 * server.h (debug_hw_points): Declare.
14553 (paddress): Declare.
14554 * utils.c (NUMCELLS, CELLSIZE): New macros.
14555 (get_sell, xsnprintf, paddress): New functions.
14556 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14557 remove_point, stopped_by_watchpoint, stopped_data_address.
14558 * win32-i386-low.c: Include i386-low.h.
14559 (debug_reg_state): Replaces dr.
14560 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14561 (i386_dr_low_get_status): New function.
14562 (i386_insert_point, i386_remove_point): New functions.
14563 (i386_stopped_by_watchpoint): New function.
14564 (i386_stopped_data_address): New function.
14565 (i386_initial_stuff): Update.
14566 (get_thread_context,set_thread_context,i386_thread_added): Update.
14567 (the_low_target): Add entries for insert_point,
14568 remove_point, stopped_by_watchpoint, stopped_data_address.
14569 * win32-low.c (win32_insert_watchpoint): New function.
14570 (win32_remove_watchpoint): New function.
14571 (win32_stopped_by_watchpoint): New function.
14572 (win32_stopped_data_address): New function.
14573 (win32_target_ops): Add entries for insert_watchpoint,
14574 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14575 * win32-low.h (win32_target_ops): New members insert_point,
14576 remove_point, stopped_by_watchpoint, stopped_data_address.
14578 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14580 * server.c (process_serial_event): Re-return unsupported, not
14581 error, if the type isn't recognized. Re-allow supporting only
14582 insert or remove packets. Also call require_running for
14583 breakpoints. Add missing break statement to default case. Tidy.
14584 * target.h (struct target_ops): Rename insert_watchpoint to
14585 insert_point, and remove_watchpoint to remove_point.
14587 * linux-low.h (struct linux_target_ops): Likewise.
14588 * linux-low.c (linux_insert_watchpoint): Rename to ...
14589 (linux_insert_point): ... this. Adjust.
14590 (linux_remove_watchpoint): Rename to ...
14591 (linux_remove_point): ... this. Adjust.
14592 (linux_target_ops): Adjust.
14593 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14594 (cris_insert_point): ... this.
14595 (cris_remove_watchpoint): Rename to ...
14596 (cris_remove_point): ... this.
14597 (the_low_target): Adjust.
14599 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14601 * server.c (handle_v_kill): Pass signal_pid to
14602 kill_inferior if multi_process is zero.
14604 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14606 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14607 * target.h (target_ops): Comment for *_watchpoint to make it clear
14608 the functions can get types '0' and '1'.
14610 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14612 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14613 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14614 * regcache.c (get_regcache): Likewise.
14615 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14616 * win32-low.c (child_fetch_inferior_registers): Remove check for
14619 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14620 Pedro Alves <pedro@codesourcery.com>
14622 * target.h (struct target_ops) <supports_multi_process>: New
14624 (target_supports_multi_process): New.
14625 * server.c (handle_query): Even if GDB reports support, only
14626 enable multi-process if the target also supports it. Report
14627 multi-process support only if the target backend supports it.
14628 * linux-low.c (linux_supports_multi_process): New function.
14629 (linux_target_ops): Install it as target_supports_multi_process
14632 2009-05-24 Doug Evans <dje@google.com>
14634 Global renaming of find_thread_pid to find_thread_ptid.
14635 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14636 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14637 All callers updated.
14639 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14640 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14643 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14644 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14645 (linux_resume_one_lwp): Ditto.
14647 2009-05-23 Doug Evans <dje@google.com>
14649 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14650 from struct inferior_list_entry * to struct lwp_info *.
14651 All callers updated.
14653 2009-05-13 Doug Evans <dje@google.com>
14655 * linux-x86-low.c: Don't include assert.h.
14656 (x86_siginfo_fixup): Use fatal, not assert.
14657 (x86_arch_setup): Fix comment.
14659 2009-05-12 Doug Evans <dje@google.com>
14661 Biarch support for i386/amd64 gdbserver.
14662 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14663 Add linux-x86-low.c.
14664 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14665 (linux-x86-low.o): Add.
14666 * linux-x86-64-low.c: Delete.
14667 * linux-i386-low.c: Delete.
14668 * linux-x86-low.c: New file.
14669 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14671 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14673 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14674 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14675 (linux_child_pid_to_exec_file): New function.
14676 (elf_64_header_p, elf_64_file_p): New functions.
14677 (siginfo_fixup): New function.
14678 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14679 give target a chance to convert layout.
14680 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14681 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14683 2009-05-07 Doug Evans <dje@google.com>
14685 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14686 (regsets_store_inferior_registers): Ditto.
14688 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14692 * linux-low.c (must_set_ptrace_flags): Delete.
14693 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14695 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14696 `lwp->must_set_ptrace_flags' instead.
14697 (linux_wait_for_event_1): Set ptrace options here.
14698 (linux_wait_1): ... not here.
14700 2009-04-30 Doug Evans <dje@google.com>
14702 * inferiors.c (started_inferior_callback): New function.
14703 (attached_inferior_callback): New function.
14704 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14705 * server.c (print_started_pid, print_attached_pid): New functions.
14706 (detach_or_kill_for_exit): New function.
14707 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14708 * server.h (have_started_inferiors_p): Declare.
14709 (have_attached_inferiors_p): Declare.
14711 * inferiors.c (remove_process): Fix memory leak, free process.
14712 * linux-low.c (linux_remove_process): New function.
14713 (linux_kill): Call it instead of remove_process.
14714 (linux_detach, linux_wait_1): Ditto.
14716 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14718 * configure.srv: Add x86 Windows CE target.
14720 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14722 * inferiors.c (get_thread_process): Make global.
14723 * server.h (get_thread_process): Add prototype.
14724 * thread-db.c (find_one_thread): Use get_thread_process
14725 instead of current_process.
14726 (thread_db_get_tls_address): Do not crash if called when
14727 thread layer is not yet initialized.
14729 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14731 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14732 * spu-low.c (current_tid): Rename to ...
14733 (current_ptid): ... this.
14734 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14735 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14736 ptid_get_lwp (current_ptid) instead of current_tid.
14737 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14738 instead of current_tid. Use find_process_pid to verify pid
14739 argument is valid. Pass proper argument to remove_process.
14740 (spu_thread_alive): Compare current_ptid instead of current_tid.
14741 (spu_resume): Likewise.
14743 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14745 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14748 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14750 Implement the multiprocess extensions, and add linux multiprocess
14753 * server.h (ULONGEST): Declare.
14754 (struct ptid, ptid_t): New.
14755 (minus_one_ptid, null_ptid): Declare.
14756 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14757 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14758 (struct inferior_list_entry): Change `id' type from unsigned from
14760 (struct sym_cache, struct breakpoint, struct
14761 process_info_private): Forward declare.
14762 (struct process_info): Declare.
14763 (current_process): Declare.
14764 (all_processes): Declare.
14765 (initialize_inferiors): Declare.
14766 (add_thread): Adjust to use ptid_t.
14767 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14768 (add_process, remove_process, find_thread_pid): Declare.
14769 (find_inferior_id): Adjust to use ptid_t.
14770 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14771 (multi_process): Declare.
14772 (push_event): Adjust to use ptid_t.
14773 (read_ptid, write_ptid): Declare.
14774 (prepare_resume_reply): Adjust to use ptid_t.
14775 (clear_symbol_cache): Declare.
14776 * inferiors.c (all_processes): New.
14777 (null_ptid, minus_one_ptid): New.
14778 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14779 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14780 (add_thread): Change unsigned long to ptid. Remove gdb_id
14782 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14783 (gdb_id_to_thread): Rename to ...
14784 (find_thread_pid): ... this. Change unsigned long to ptid.
14785 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14786 (loaded_dll, pull_pid_from_list): Adjust.
14787 (add_process, remove_process, find_process_pid)
14788 (get_thread_process, current_process, initialize_inferiors): New.
14789 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14790 (struct target_waitstatus) <related_pid>: Ditto.
14791 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14792 return type to int.
14793 (struct target_ops) <join>: Add `pid' argument.
14794 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14795 (struct target_ops) <wait>: Add `ptid' field. Change return type
14797 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14798 (mywait): Add `ptid' argument. Change return type to ptid_t.
14799 (target_pid_to_str): Declare.
14800 * target.c (set_desired_inferior): Adjust to use ptids.
14801 (mywait): Add new `ptid' argument. Adjust.
14802 (target_pid_to_str): New.
14803 * mem-break.h (free_all_breakpoints): Declare.
14804 * mem-break.c (breakpoints): Delelete.
14805 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14806 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14807 to use per-process breakpoint list.
14808 (free_all_breakpoints): New.
14809 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14810 (symbol_cache, all_symbols_looked_up): Delete.
14812 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14814 (prepare_resume_reply): Change ptid argument's type from unsigned
14815 long to ptid_t. Adjust. Implement W;process and X;process.
14816 (free_sym_cache, clear_symbol_cache): New.
14817 (look_up_one_symbol): Adjust to per-process symbol cache. *
14818 * server.c (cont_thread, general_thread, step_thread): Change type
14820 (attached): Delete.
14821 (multi_process): New.
14822 (last_ptid): Change type to ptid_t.
14823 (struct vstop_notif) <ptid>: Change type to ptid_t.
14824 (queue_stop_reply, push_event): Change `ptid' argument's type to
14826 (discard_queued_stop_replies): Add `pid' argument.
14827 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14828 changes. Don't reference the `attached' global.
14829 (attach_inferior): Adjust to mywait interface changes.
14830 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14831 features. Handle and report "multiprocess+". Handle
14833 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14835 (handle_v_kill): New.
14836 (handle_v_stopped): Adjust to use target_pid_to_str.
14837 (handle_v_requests): Allow multiple attaches and runs when
14838 multiprocess extensions are in effect. Handle "vKill".
14839 (myresume): Adjust to use ptids.
14840 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14841 (handle_status): Adjust to discard_queued_stop_replies interface
14843 (first_thread_of, kill_inferior_callback)
14844 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14845 (main): Call initialize_inferiors. Adjust to use ptids, killing
14846 and detaching from all inferiors. Handle multiprocess packet
14848 * linux-low.h: Include gdb_proc_service.h.
14849 (struct process_info_private): New.
14850 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14851 <lwpid_of>: Use ptid_get_lwp.
14852 (get_lwp_thread): Adjust.
14853 (struct lwp_info): Add `dead' member.
14854 (find_lwp_pid): Declare.
14855 * linux-low.c (thread_db_active): Delete.
14856 (new_inferior): Adjust comment.
14857 (inferior_pid): Delete.
14858 (linux_add_process): New.
14859 (handle_extended_wait): Adjust.
14860 (add_lwp): Change unsigned long to ptid.
14861 (linux_create_inferior): Add process to processes table. Adjust
14862 to use ptids. Don't set new_inferior here.
14863 (linux_attach_lwp): Rename to ...
14864 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14865 it. Adjust to use ptids.
14866 (linux_attach_lwp): New.
14867 (linux_attach): Add process to processes table. Don't set
14869 (struct counter): New.
14870 (second_thread_of_pid_p, last_thread_of_process_p): New.
14871 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14872 multiple processes.
14873 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14874 processes. Remove process from process table.
14875 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14876 to multiple processes.
14877 (any_thread_of): New.
14878 (linux_detach): Add `pid' argument, and handle it. Remove process
14879 from processes table.
14880 (linux_join): Add `pid' argument. Handle it.
14881 (linux_thread_alive): Change unsighed long argument to ptid_t.
14882 Consider dead lwps as not being alive.
14883 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14884 threads we're not interested in.
14885 (same_lwp, find_lwp_pid): New.
14886 (linux_wait_for_lwp): Change `pid' argument's type from int to
14888 (linux_wait_for_event): Rename to ...
14889 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14890 from int to ptid_t. Adjust.
14891 (linux_wait_for_event): New.
14892 (linux_wait_1): Add `ptid' argument. Change return type to
14893 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14894 that exit from the process table.
14895 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14897 (mark_lwp_dead): New.
14898 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14899 stopping all threads, mark its main lwp as dead.
14900 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14902 (fetch_register, usr_store_inferior_registers)
14903 (regsets_fetch_inferior_registers)
14904 (regsets_store_inferior_registers, linux_read_memory)
14905 (linux_write_memory): Inline `inferior_pid'.
14906 (linux_look_up_symbols): Adjust to use per-process
14907 `thread_db_active'.
14908 (linux_request_interrupt): Adjust to use ptids.
14909 (linux_read_auxv): Inline `inferior_pid'.
14910 (initialize_low): Don't reference thread_db_active.
14911 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14912 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14913 (ps_getpid): Return the pid of the current inferior.
14914 * thread-db.c (proc_handle, thread_agent): Delete.
14915 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14917 (find_one_thread): Change argument type to ptid_t. Adjust to
14919 (maybe_attach_thread): Adjust to per-process data and ptids.
14920 (thread_db_find_new_threads): Ditto.
14921 (thread_db_init): Ditto.
14922 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14923 processes table. Adjust to use ptids.
14924 (spu_kill, spu_detach): Adjust interface. Remove process from
14926 (spu_join, spu_thread_alive): Adjust interface.
14927 (spu_wait): Adjust interface. Remove process from processes
14928 table. Adjust to use ptids.
14929 * win32-low.c (current_inferior_tid): Delete.
14930 (current_inferior_ptid): New.
14931 (debug_event_ptid): New.
14932 (thread_rec): Take a ptid. Adjust.
14933 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14934 (child_delete_thread): Ditto.
14935 (do_initial_child_stuff): Add `attached' argument. Add process to
14937 (child_fetch_inferior_registers, child_store_inferior_registers):
14939 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14940 (win32_attach): Pass 1 to do_initial_child_stuff.
14941 (win32_kill): Adjust interface. Remove process from processes
14943 (win32_detach): Ditto.
14944 (win32_join): Adjust interface.
14945 (win32_thread_alive): Take a ptid.
14946 (win32_resume): Adjust to use ptids.
14947 (get_child_debug_event): Ditto.
14948 (win32_wait): Adjust interface. Remove exiting process from
14951 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14953 Non-stop mode support.
14955 * server.h (non_stop): Declare.
14956 (gdb_client_data, handler_func): Declare.
14957 (delete_file_handler, add_file_handler, start_event_loop):
14959 (handle_serial_event, handle_target_event, push_event)
14960 (putpkt_notif): Declare.
14961 * target.h (enum resume_kind): New.
14962 (struct thread_resume): Replace `step' field by `kind' field.
14963 (TARGET_WNOHANG): Define.
14964 (struct target_ops) <wait>: Add `options' argument.
14965 <supports_non_stop, async, start_non_stop>: New fields.
14966 (target_supports_non_stop, target_async): New.
14967 (start_non_stop): Declare.
14968 (mywait): Add `options' argument.
14969 * target.c (mywait): Add `options' argument. Print child exit
14970 notifications here.
14971 (start_non_stop): New.
14972 * server.c (non_stop, own_buf, mem_buf): New globals.
14973 (struct vstop_notif): New.
14974 (notif_queue): New global.
14975 (queue_stop_reply, push_event, discard_queued_stop_replies)
14976 (send_next_stop_reply): New.
14977 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14979 (attach_inferior): In non-stop mode, don't wait for the target
14981 (handle_general_set): Handle QNonStop.
14982 (handle_query): When handling qC, return the current general
14983 thread, instead of the first thread of the list.
14984 (handle_query): If the backend supports non-stop mode, include
14985 QNonStop+ in the qSupported query response.
14986 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14988 (handle_v_attach, handle_v_run): Handle non-stop mode.
14989 (handle_v_stopped): New.
14990 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14991 (myresume): Adjust to use resume_kind. Handle non-stop.
14992 (queue_stop_reply_callback): New.
14993 (handle_status): Handle non-stop mode.
14994 (main): Clear non_stop flag on reconnection. Use the event-loop.
14995 Refactor serial protocol handling from here ...
14996 (process_serial_event): ... to this new function. When GDB
14997 selects any thread, select one here. In non-stop mode, wait until
14998 GDB acks all pending events before exiting.
14999 (handle_serial_event, handle_target_event): New.
15000 * remote-utils.c (remote_open): Install remote_desc in the event
15002 (remote_close): Remove remote_desc from the event loop.
15003 (putpkt_binary): Rename to...
15004 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15005 (putpkt_binary): New as wrapper around putpkt_binary_1.
15006 (putpkt_notif): New.
15007 (prepare_resume_reply): In non-stop mode, don't change the
15009 * event-loop.c: New.
15010 * Makefile.in (OBJ): Add event-loop.o.
15011 (event-loop.o): New rule.
15013 * linux-low.h (pid_of): Moved here.
15015 (get_lwp_thread): Use lwpid_of.
15016 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15017 * linux-low.c (pid_of): Delete.
15018 (inferior_pid): Use lwpid_of.
15019 (linux_event_pipe): New.
15020 (target_is_async_p): New.
15022 (handle_extended_wait): Use lwpid_of.
15023 (add_lwp): Don't set lwpid field.
15024 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15025 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15026 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15027 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15028 first. Adjust to linux_wait_for_event interface changes. Use
15030 (linux_detach): Don't delete the main lwp here.
15031 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15032 (status_pending_p): Don't consider explicitly suspended lwps.
15033 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15034 pointer. Add OPTIONS argument. Change return type to int. Use
15035 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15036 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15037 pointer. Add status pointer argument. Return a pid instead of a
15038 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15039 changes. In non-stop mode, don't switch to a random thread.
15040 (linux_wait): Rename to...
15041 (linux_wait_1): ... this. Add target_options argument, and handle
15042 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15043 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15044 clean exit and signal exit code. Don't stop all threads in
15045 non-stop mode. In all-stop mode, only stop all threads when
15046 reporting a stop to GDB. Handle explicit thread stop requests.
15047 (async_file_flush, async_file_mark): New.
15049 (send_sigstop): Use lwpid_of.
15050 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15051 interface changes. In non-stop mode, don't switch to a random
15053 (linux_resume_one_lwp): Use lwpid_of.
15054 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15055 (linux_resume_one_thread): ... this. Handle resume_stop. In
15056 non-stop mode, don't look for pending flag in all threads.
15057 (resume_status_pending_p): Don't consider explicitly suspended
15059 (my_waitpid): Reimplement. Emulate __WALL.
15060 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15062 (sigchld_handler, linux_supports_non_stop, linux_async)
15063 (linux_start_non_stop): New.
15064 (linux_target_ops): Register linux_supports_non_stop, linux_async
15065 and linux_start_non_stop.
15066 (initialize_low): Install SIGCHLD handler.
15067 * thread-db.c (thread_db_create_event, find_one_thread)
15068 (thread_db_get_tls_address): Use lwpid_of.
15069 * win32-low.c (win32_detach): Adjust to use resume_kind.
15070 (win32_wait): Add `options' argument.
15071 * spu-low.c (spu_resume): Adjust to use resume_kind.
15072 (spu_wait): Add `options' argument.
15074 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15076 Decouple target code from remote protocol.
15078 * target.h (enum target_waitkind): New.
15079 (struct target_waitstatus): New.
15080 (struct target_ops) <wait>: Return an unsigned long. Take a
15081 target_waitstatus pointer instead of a char pointer.
15082 (mywait): Likewise.
15083 * target.c (mywait): Change prototype to return an unsigned long.
15084 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15085 * server.h (thread_from_wait, old_thread_from_wait): Delete
15087 (prepare_resume_reply): Change prototype to take a
15089 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15090 (last_status, last_ptid): New.
15091 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15092 pid instead of a signal.
15093 (attach_inferior): Remove "status" and "signal" parameters.
15095 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15097 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15098 (handle_v_requests, myresume): Remove "status" and "signal"
15099 parameters. Adjust.
15100 (handle_status): New.
15101 (main): Delete local `status'. Adjust.
15102 * remote-utils.c: Include target.h.
15103 (prepare_resume_reply): Change prototype to take a
15104 target_waitstatus. Adjust.
15106 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15108 * spu-low.c (spu_wait): Adjust.
15109 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15111 (win32_wait): Adjust.
15113 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15115 * target.h (struct thread_resume): Delete leave_stopped member.
15116 (struct target_ops): Add a `n' argument to the `resume' callback.
15117 * server.c (start_inferior): Adjust.
15118 (handle_v_cont, myresume): Adjust.
15119 * linux-low.c (check_removed_breakpoint): Adjust to resume
15120 interface change, and to removed leave_stopped field.
15121 (resume_ptr): Delete.
15122 (struct thread_resume_array): New.
15123 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15124 resume interface change.
15125 (linux_continue_one_thread, linux_queue_one_thread)
15126 (resume_status_pending_p): Check if the resume field is NULL
15127 instead of checking the leave_stopped member.
15128 (linux_resume): Adjust to the target resume interface change.
15129 * spu-low.c (spu_resume): Adjust to the target resume interface
15131 * win32-low.c (win32_detach, win32_resume): Ditto.
15133 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15135 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15137 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15139 (linux_continue_one_thread): Only preserve the stepping flag if
15140 there's a pending breakpoint.
15142 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15144 * server.c (main): After the inferior having exited, call
15145 remote_close before exiting gdbserver.
15147 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15149 Fix size of FPSCR in Power 7 processors.
15150 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15151 (PPC_FEATURE_HAS_DFP): New #define.
15152 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15155 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15157 * server.c (handle_query) Whitespace and formatting.
15159 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15161 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15162 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15163 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15164 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15165 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15166 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15167 Makefile.in, configure.ac: Fix whitespace throughout.
15168 * configure: Regenerate.
15170 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15172 * inferiors.c (find_inferior): Make it safe for the callback
15173 function to delete the currently iterated inferior.
15175 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15177 * Makefile.in (linuw_low_h): Move higher.
15178 (thread-db.o): Depend on $(linux_low_h).
15180 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15182 Rename "process" to "lwp" throughout.
15184 * linux-low.c (all_processes): Rename to...
15185 (all_lwps): ... this.
15186 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15187 (add_process): Rename to ...
15188 (add_lwp): ... this. Adjust.
15189 (linux_create_inferior): Adjust.
15190 (linux_attach_lwp): Adjust.
15191 (linux_attach): Adjust.
15192 (linux_kill_one_process): Rename to ...
15193 (linux_kill_one_lwp): ... this. Adjust.
15194 (linux_kill): Adjust.
15195 (linux_detach_one_process): Rename to ...
15196 (linux_detach_one_lwp): ... this. Adjust.
15197 (linux_detach): Adjust.
15198 (check_removed_breakpoint): Adjust.
15199 (status_pending_p): Adjust.
15200 (linux_wait_for_process): Rename to ...
15201 (linux_wait_for_lwp): ... this. Adjust.
15202 (linux_wait_for_event): Adjust.
15203 (send_sigstop): Adjust.
15204 (wait_for_sigstop): Adjust.
15205 (stop_all_processes): Rename to ...
15206 (stop_all_lwps): ... this.
15207 (linux_resume_one_process): Rename to ...
15208 (linux_resume_one_lwp): ... this. Adjust.
15209 (linux_set_resume_request, linux_continue_one_thread)
15210 (linux_queue_one_thread, resume_status_pending_p)
15211 (usr_store_inferior_registers, regsets_store_inferior_registers)
15212 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15214 * linux-low.h (get_process): Rename to ...
15215 (get_lwp): ... this. Adjust.
15216 (get_thread_process): Rename to ...
15217 (get_thread_lwp): ... this. Adjust.
15218 (get_process_thread): Rename to ...
15219 (get_lwp_thread): ... this. Adjust.
15220 (struct process_info): Rename to ...
15221 (struct lwp_info): ... this.
15222 (all_processes): Rename to ...
15223 (all_lwps): ... this.
15224 * proc-service.c (ps_lgetregs): Adjust.
15225 * thread-db.c (thread_db_create_event, find_one_thread)
15226 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15228 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15230 * server.c (handle_query): Handle "qAttached".
15232 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15234 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15235 GPLv3, update license URL.
15237 2009-03-01 Doug Evans <dje@google.com>
15239 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15240 (server_h): Add gdb_signals.h.
15241 (signals.o): Update.
15242 * server.h (target_signal_from_host,target_signal_to_host_p)
15243 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15245 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15247 * remote-utils.c (getpkt): Also generate remote-debug
15248 information if noack_mode is set.
15250 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15252 * server.c (handle_query): Report qXfer:siginfo:read and
15253 qXfer:siginfo:write as supported and handle them.
15254 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15255 * linux-low.c (linux_xfer_siginfo): New.
15256 (linux_target_ops): Set it.
15258 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15260 * server.c (gdbserver_usage): Mention --remote-debug.
15261 (main): Accept '--remote-debug' switch.
15263 2009-01-18 Doug Evans <dje@google.com>
15265 * regcache.c (new_register_cache): No need to check result of xcalloc.
15266 * server.c (handle_search_memory): Back out calls to xmalloc,
15267 result is checked and error is returned to user upon failure.
15268 (handle_query): Ditto. Add more checks for result of malloc.
15269 (handle_v_cont): Check result of malloc, report error back to
15271 (handle_v_run): Ditto. Call freeargv.
15272 * server.h (freeargv): Declare.
15273 * utils.c (freeargv): New fn.
15275 2009-01-15 Doug Evans <dje@google.com>
15277 * gdbreplay.c (perror_with_name): Make arg const char *.
15278 * server.h (target_signal_to_name): Make return type const char *.
15279 * thread-db.c (thread_db_err_str): Make return type const char *.
15280 * utils.c (perror_with_name): Make arg const char *.
15282 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15284 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15285 when handling a EXIT_PROCESS_DEBUG_EVENT.
15287 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15289 * gdbreplay.c (gdbreplay_version): Update copyright year.
15290 * server.c (gdbserver_version): Likewise.
15292 2009-01-05 Doug Evans <dje@google.com>
15294 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15295 (handle_extended_wait): Improve comment.
15297 2008-12-13 Doug Evans <dje@google.com>
15299 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15300 * server.h (ATTR_MALLOC): New macro.
15301 (xmalloc,xcalloc,xstrdup): Declare.
15302 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15303 * inferiors.c: Ditto.
15304 * linux-low.c: Ditto.
15305 * mem-break.c: Ditto.
15306 * regcache.c: Ditto.
15307 * remote-utils.c: Ditto.
15310 * win32-low.c: Ditto.
15312 2008-12-12 Doug Evans <dje@google.com>
15314 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15315 in debugging printf.
15317 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15319 2008-12-09 Doug Evans <dje@google.com>
15321 * linux-low.h (struct process_info): Delete member tid, unused.
15322 * thread-db.c (find_one_thread): Update.
15323 (maybe_attach_thread): Update.
15325 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15327 * target.h (struct target_ops): Add qxfer_osdata member.
15328 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15330 (linux_qxfer_osdata): New functions.
15331 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15333 * server.c (handle_query): Handle "qXfer:osdata:read:".
15334 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15335 (buffer_xml_printf): New functions.
15336 * server.h (struct buffer): New.
15337 (buffer_grow_str, buffer_grow_str0): New macros.
15338 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15339 (buffer_xml_printf): Declare.
15341 2008-11-24 Doug Evans <dje@google.com>
15343 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15345 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15347 * server.c (handle_v_run): Always use the supplied argument list.
15349 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15351 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15352 (xtensa_regmap_table): Add entry for scompare1.
15354 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15356 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15357 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15358 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15359 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15360 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15361 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15362 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15363 XML target descriptions.
15364 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15365 when inferior is running on an ISA 2.05 or later processor. Add
15366 special case to return offset for full 64-bit slot of FPSCR when
15369 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15371 * Makefile.in (SFILES, clean): Added sparc64 files.
15372 (reg-sparc64.o, reg-sparc64.c): New.
15373 * configure.srv (sparc*-*-linux*): New configuration.
15374 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15375 syscall arguments for SPARC.
15376 (regsets_store_inferior_registers): Likewise.
15377 * linux-sparc-low.c: New file.
15379 2008-10-21 Doug Evans <dje@google.com>
15381 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15382 (READLINE_DIR,READLINE_DEP): Delete.
15383 (INTERNAL_CFLAGS): Update.
15384 (LINTFLAGS): Update.
15386 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15388 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15389 whole argv from the last run, not just argv[0].
15391 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15393 * regcache.c (new_register_cache): Return NULL if the register
15394 cache size isn't known yet.
15395 (free_register_cache): Avoid dereferencing a NULL regcache.
15397 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15399 * configure.srv: Merge MIPS and MIPS64.
15401 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15403 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15405 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15407 * Makefile.in: Add required vsx dependencies.
15409 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15410 Declare init_registers_powerpc_vsx32l.
15411 Declare init_registers_powerpc_vsx64l.
15412 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15413 (ppc_arch_setup): Check for VSX in hwcap.
15414 (ppc_fill_vsxregset): New function.
15415 (ppc_store_vsxregset): New function.
15416 Add new VSX entry in regset_info target_regsets.
15418 * configure.srv: Add new VSX dependencies.
15420 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15422 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15423 (remote_open): Set or clear transport_is_reliable.
15424 (putpkt_binary): Don't expect acks in noack mode.
15425 (getpkt): Don't send ack/nac in noack mode.
15426 * server.c (handle_general_set): Handle QStartNoAckMode.
15427 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15429 (main): Reset noack_mode on every connection.
15430 * server.h (noack_mode): Declare.
15432 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15434 * Makefile.in (GDBREPLAY_OBS): New variable.
15435 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15437 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15438 Daniel Jacobowitz <dan@codesourcery.com>
15440 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15441 (usr_store_inferior_registers): Likewise.
15442 (regsets_store_inferior_registers): Likewise.
15444 2008-07-31 Rolf Jansen <rj@surtec.com>
15445 Pedro Alves <pedro@codesourcery.com>
15447 * configure.ac: Check for memmem declaration.
15448 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15449 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15450 (disable_packet_qfThreadInfo): Unconditionally compile.
15451 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15452 * configure, config.in: Regenerate.
15454 2008-07-28 Doug Kwan <dougkwan@google.com>
15456 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15457 (linux_write_memory): Remove declaration of errno.
15459 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15461 * linux-low.c (handle_extended_wait): Do not use "status"
15462 variable uninitialized.
15464 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15466 * server.c (handle_v_attach): Inhibit reporting dll changes.
15468 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15470 * remote-utils.c (prepare_resume_reply): If requested, don't
15471 output "thread:TID" in the T stop reply.
15473 * server.c (disable_packet_vCont, disable_packet_Tthread)
15474 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15475 (handle_query): If requested, disable support for qC, qfThreadInfo
15477 (handle_v_requests): If requested, disable support for vCont.
15478 (gdbserver_show_disableable): New.
15479 (main): Handle --disable-packet and --disable-packet=LIST.
15481 * server.h (disable_packet_vCont, disable_packet_Tthread)
15482 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15484 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15486 * server.c (gdbserver_usage): Mention --version.
15488 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15490 * Makefile.in (gdbreplay.o): New rule.
15492 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15494 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15495 message, not gdbserver.
15497 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15498 Nathan Sidwell <nathan@codesourcery.com>
15499 Joseph Myers <joseph@codesourcery.com>
15501 * acinclude.m4: Include ../../config/acx.m4.
15502 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15503 * configure, config.in: Regenerate.
15504 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15505 * server.c (gdbserver_version): Print PKGVERSION.
15506 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15507 (main): Adjust gdbserver_usage calls.
15508 * gdbreplay.c (version, host_name): Add declarations.
15509 (gdbreplay_version, gdbreplay_usage): New.
15510 (main): Accept --version and --help options.
15512 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15514 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15515 (arm_breakpoint_at): Handle Thumb.
15516 (the_low_target): Add comment.
15518 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15520 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15522 2008-05-09 Doug Evans <dje@google.com>
15524 * server.h (decode_search_memory_packet): Declare.
15525 * remote-utils.c (decode_search_memory_packet): New fn.
15526 * server.c (handle_search_memory_1): New fn.
15527 (handle_search_memory): New fn.
15528 (handle_query): Process qSearch:memory packets.
15530 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15532 * regcache.c (registers_length): Remove.
15533 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15534 full register packet.
15535 * regcache.h (registers_length): Remove prototype.
15536 * server.h (PBUFSIZ): Define to 16384.
15538 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15540 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15541 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15542 powerpc-64l.o, and powerpc-altivec64l.o.
15543 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15544 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15545 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15546 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15547 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15550 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15551 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15552 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15553 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15554 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15555 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15556 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15557 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15558 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15559 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15562 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15563 (init_registers_powerpc_32l): ... this new prototype.
15564 (init_registers_powerpc_32): Remove, replace by ...
15565 (init_registers_powerpc_altivec32l): ... this new prototype.
15566 (init_registers_powerpc_e500): Remove, replace by ...
15567 (init_registers_powerpc_e500l): ... this new prototype.
15568 (init_registers_ppc64): Remove, replace by ...
15569 (init_registers_powerpc_64l): ... this new prototype.
15570 (init_registers_powerpc_64): Remove, replace by ...
15571 (init_registers_powerpc_altivec64l): ... this new prototype.
15572 (ppc_num_regs): Set to 73.
15573 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15574 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15575 (ppc_cannot_store_register): Handle orig_r3 and trap.
15576 (ppc_arch_setup): Update init_registers_... calls.
15577 (ppc_fill_gregset): Handle orig_r3 and trap.
15579 * inferiors.c (clear_inferiors): Reset current_inferior.
15581 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15583 * acinclude.m4: Add override.m4.
15584 * configure: Regenerate.
15586 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15588 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15589 initial call to init_register_ppc64.
15591 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15593 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15594 single powerpc*-*-linux* case.
15595 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15597 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15599 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15600 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15602 * linux-ppc-low.c: Include <elf.h>.
15603 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15604 (ppc_hwcap): New global variable.
15605 (ppc_regmap): Remove __SPE__ #ifdef sections.
15606 (ppc_regmap_e500): New global variable.
15607 (ppc_cannot_store_register): Update __SPE__ special case.
15608 (ppc_get_hwcap): New function.
15609 (ppc_arch_setup): Use it to determine whether inferior supports
15610 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15611 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15612 Do not access registers if target does not support AltiVec.
15613 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15614 Do not access registers if target does not support SPE.
15615 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15617 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15619 * linux-low.c (disabled_regsets, num_regsets): New.
15620 (use_regsets_p): Delete.
15621 (linux_wait_for_process): Clear disabled_regsets.
15622 (regsets_fetch_inferior_registers): Check and set it.
15623 (regsets_store_inferior_registers): Likewise.
15624 (linux_fetch_registers, linux_store_registers): Do not use
15626 (initialize_low): Allocate disabled_regsets.
15628 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15630 * Makefile.in (LIBOBJS): New.
15631 (OBS): Use LIBOBJS.
15632 (memmem.o): New rule.
15633 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15634 * configure: Regenerated.
15636 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15638 * server.c (handle_query): Never return "unsupported" for
15639 qXfer:features:read queries.
15641 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15643 * server.c (get_features_xml): Fix inverted condition.
15644 (handle_query): Always support qXfer:feature:read.
15646 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15648 * server.c (wrapper_argv): New.
15649 (start_inferior): Handle wrapper_argv. If set, expect an extra
15651 (gdbserver_usage): Document --wrapper.
15652 (main): Parse --wrapper.
15654 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15656 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15657 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15658 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15659 (ppc_set_pc): Likewise.
15660 (ppc_arch_setup): New function.
15661 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15662 of collect_register.
15663 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15665 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15667 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15668 instead of linux-ppc64-low.o.
15669 * linux-ppc64-low.c: Remove file.
15670 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15671 (linux-ppc64-low.o): Remove rule.
15673 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15674 (init_registers_powerpc_64): Likewise.
15675 (ppc_regmap): Conditionally define depending on __powerpc64__.
15676 (ppc_cannot_store_register): Do not special-case "fpscr" when
15677 compiled on __powerpc64__.
15678 (ppc_collect_ptrace_register): New function.
15679 (ppc_supply_ptrace_register): New function.
15680 (ppc_breakpoint): Change type to "unsigned int".
15681 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15682 (the_low_target): Conditionally provide initializers for the
15683 arch_setup member depending on __powerpc64__. Install
15684 collect_ptrace_register and supply_ptrace_register members.
15686 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15688 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15689 * server.c (gdbserver_xmltarget): Define.
15690 (get_features_xml): Use it to replace "target.xml" and arch_string.
15692 * configure.srv: Remove srv_xmltarget. Add XML files that were
15693 mentioned there to srv_xmlfiles instead. Remove conditional tests
15694 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15695 srv_xmlfiles and srv_regobj to include all possible choices.
15696 * configure.ac (srv_xmltarget): Remove.
15697 (srv_xmlfiles): Do not add "target.xml".
15698 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15699 checks for supplementary target information.
15700 * configure: Regenerate.
15701 * Makefile.in (XML_TARGET): Remove.
15702 (target.xml): Remove rule.
15703 (clean): Do not clean up target.xml.
15704 (.PRECIOUS): Do not mention target.xml.
15706 * target.h (struct target_ops): Remove arch_string member.
15707 * linux-low.c (linux_arch_string): Remove.
15708 (linux_target_ops): Remove arch_string initializer.
15709 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15710 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15711 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15712 * spu-low.c (spu_arch_string): Remove.
15713 (spu_target_ops): Remove arch_string initializer.
15714 * win32-low.c (win32_arch_string): Remove.
15715 (win32_target_ops): Remove arch_string initializer.
15716 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15717 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15718 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15720 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15722 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15723 by collect_ptrace_register and supply_ptrace_register hooks.
15724 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15725 instead of checking for the_low_target.left_pad_xfer.
15726 (usr_store_inferior_registers): Use collect_ptrace_register callback
15727 instead of checking for the_low_target.left_pad_xfer.
15729 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15730 (s390_supply_ptrace_register): Likewise.
15731 (s390_fill_gregset): Call s390_collect_ptrace_register.
15732 (the_low_target): Update.
15734 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15735 (ppc_supply_ptrace_register): Likewise.
15736 (the_low_target): Update.
15738 * linux-i386-low.c (the_low_target): Update.
15739 * linux-x86-64-low.c (the_low_target): Update.
15741 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15743 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15744 reg-s390.o and reg-s390x.o.
15746 * linux-low.c (new_inferior): New global variable.
15747 (linux_create_inferior, linux_attach): Set it.
15748 (linux_wait_for_process): Call the_low_target.arch_setup after the
15749 target has stopped for the first time.
15750 (initialize_low): Do not call the_low_target.arch_setup.
15752 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15753 (s390_set_pc): Likewise.
15754 (s390_arch_setup): New function.
15755 (the_low_target): Use s390_arch_setup as arch_setup routine.
15757 * regcache.c (realloc_register_cache): New function.
15758 (set_register_cache): Call it for each existing regcache.
15760 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15762 * server.h (init_registers): Remove prototype.
15764 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15765 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15766 instead of init_registers ().
15767 * linux-arm-low.c (init_registers_arm): Add prototype.
15768 (init_registers_arm_with_iwmmxt): Likewise.
15769 (the_low_target): Add initializer for arch_setup field.
15770 * linux-cris-low.c (init_registers_cris): Add prototype.
15771 (the_low_target): Add initializer for arch_setup field.
15772 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15773 (the_low_target): Add initializer for arch_setup field.
15774 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15775 (the_low_target): Add initializer for arch_setup field.
15776 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15777 (the_low_target): Add initializer for arch_setup field.
15778 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15779 (the_low_target): Add initializer for arch_setup field.
15780 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15781 (the_low_target): Add initializer for arch_setup field.
15782 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15783 (init_registers_mips64_linux): Likewise.
15784 (the_low_target): Add initializer for arch_setup field.
15785 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15786 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15787 (the_low_target): Add initializer for arch_setup field.
15788 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15789 (init_registers_powerpc_64): Likewise.
15790 (the_low_target): Add initializer for arch_setup field.
15791 * linux-s390-low.c (init_registers_s390): Add prototype.
15792 (init_registers_s390x): Likewise.
15793 (the_low_target): Add initializer for arch_setup field.
15794 * linux-sh-low.c (init_registers_sh): Add prototype.
15795 (the_low_target): Add initializer for arch_setup field.
15796 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15797 (the_low_target): Add initializer for arch_setup field.
15798 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15799 (the_low_target): Add initializer for arch_setup field.
15801 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15802 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15803 instead of init_registers ().
15804 * win32-arm-low.c (init_registers_arm): Add prototype.
15805 (the_low_target): Add initializer for arch_setup field.
15806 * win32-i386-low.c (init_registers_i386): Add prototype.
15807 (the_low_target): Add initializer for arch_setup field.
15809 * spu-low.c (init_registers_spu): Add prototype.
15810 (initialize_low): Call initialie_registers_spu () instead of
15811 initialize_registers ().
15813 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15815 * server.c (handle_v_requests): When handling the vRun and vAttach
15816 packets, if already debugging a process, don't kill it. Return an
15819 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15821 * server.c (handle_query): Correct length check.
15823 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15825 * win32-low.c (do_initial_child_stuff): Add process handle
15826 parameter. Set current_process_handle and current_process_id from the
15827 parameters. Clear globals.
15828 (win32_create_inferior): Don't set current_process_handle and
15829 current_process_id here. Instead pass them on the call to
15830 do_initial_child_stuff.
15831 (win32_attach): Likewise.
15832 (win32_clear_inferiors): New.
15833 (win32_kill): Don't close the current process handle or the
15834 current thread handle here. Instead call win32_clear_inferiors.
15835 (win32_detach): Don't open a new handle to the process. Call
15836 win32_clear_inferiors.
15837 (win32_join): Don't rely on current_process_handle; open a new
15838 handle using the process id.
15839 (win32_wait): Call win32_clear_inferiors when the inferior process
15842 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15844 * server.c (monitor_show_help): Add "exit".
15846 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15848 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15849 (clean): Add reg-xtensa.c.
15850 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15851 * configure.srv (xtensa*-*-linux*) New target.
15852 * linux-xtensa-low.c: New.
15853 * xtensa-xtregs.c: New.
15855 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15857 * hostio.c: Don't include errno.h.
15858 (errno_to_fileio_errno): Move to hostio-errno.
15859 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15860 error number outputting to the target->hostio_last_error callback.
15861 (hostio_packet_error): Use FILEIO_EINVAL directly.
15862 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15863 calls to hostio_error.
15864 * hostio-errno.c: New.
15865 * server.h (hostio_last_error_from_errno): Declare.
15866 * target.h (target_ops): Add hostio_last_error member.
15867 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15868 as hostio_last_error handler.
15869 * spu-low.c (spu_target_ops): Likewise.
15870 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15871 (wince_hostio_last_error): New functions.
15872 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15873 as hostio_last_error handler.
15874 (win32_target_ops) [!_WIN32_WCE]: Register
15875 hostio_last_error_from_errno as hostio_last_error handler.
15876 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15877 (hostio-errno.o): New rule.
15878 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15879 * configure.srv (srv_hostio_err_objs): New variable. Default to
15881 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15882 * configure: Regenerate.
15884 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15886 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15887 (linux_kill, linux_detach): Clean up the process list.
15888 * remote-utils.c (remote_open): Improve port number parsing.
15889 (putpkt_binary, input_interrupt): Only send interrupts if the target
15891 * server.c (extended_protocol): Make static.
15892 (attached): Define earlier.
15893 (exit_requested, response_needed, program_argv): New variables.
15894 (target_running): New.
15895 (start_inferior): Clear attached here.
15896 (attach_inferior): Set attached here.
15897 (require_running): Define.
15898 (handle_query): Use require_running and target_running. Implement
15900 (handle_v_attach, handle_v_run): New.
15901 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15902 (gdbserver_usage): Update.
15903 (main): Redo argument parsing. Handle --debug and --multi. Handle
15904 --attach along with other options or after the port. Save
15905 program_argv. Support no initial program. Resynchronize
15906 communication with GDB after an error. Handle "monitor exit".
15907 Use require_running and target_running. Always allow the extended
15908 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15909 restart in extended mode.
15910 * README: Refer to the GDB manual. Update --attach usage.
15912 2007-12-20 Andreas Schwab <schwab@suse.de>
15914 * linux-low.c (STACK_SIZE): Define.
15915 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15916 (linux_test_for_tracefork): Likewise.
15918 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15920 * linux-low.c (linux_wait_for_event): Update messages. Do not
15921 reinsert auto-delete breakpoints.
15922 * mem-break.c (struct breakpoint): Change return type of handler to
15924 (set_breakpoint_at): Update handler type.
15925 (reinsert_breakpoint_handler): Return 1 instead of calling
15927 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15929 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15930 * mem-break.h (set_breakpoint_at): Update handler type.
15931 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15932 * win32-low.c (auto_delete_breakpoint): New.
15933 (get_child_debug_event): Use it.
15935 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15937 * configure.ac: Check for pread and pwrite.
15938 * hostio.c (handle_pread): Fall back to lseek and read.
15939 (handle_pwrite): Fall back to lseek and write.
15940 * config.in, configure: Regenerated.
15942 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15944 * server.c (myresume): Add own_buf argument.
15945 (main): Update calls.
15947 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15949 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15950 * remote-utils.c (remote_open): Do not call disable_async_io.
15951 (block_async_io): Delete.
15952 (unblock_async_io): Make static.
15953 (initialize_async_io): New.
15954 * server.c (handle_v_cont): Handle async I/O here.
15955 (myresume): Likewise. Move other common resume tasks here...
15956 (main): ... from here. Call initialize_async_io. Disable async
15957 I/O before the main loop.
15958 * server.h (initialize_async_io): Declare.
15959 (block_async_io, unblock_async_io): Delete prototypes.
15960 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15962 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15964 * remote-utils.c (readchar): Allow binary data in received messages.
15966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15968 * win32-low.c (attaching): New global.
15969 (win32_create_inferior): Clear the `attaching' global.
15970 (win32_attach): Set the `attaching' global.
15971 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15972 attaching. Only set a breakpoint at the entry point if not
15975 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15977 * server.c (main): Don't report dll events on the initial
15978 connection on attaches.
15980 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15982 * server.c (main): Relax numerical bases supported for the pid of
15983 the --attach command line argument.
15985 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15987 * win32-low.c (win32_attach): Call OpenProcess before
15988 DebugActiveProcess, not after. Add last error output to error
15991 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15993 * win32-low.c (win32_get_thread_context)
15994 (win32_set_thread_context): New functions.
15995 (thread_rec): Use win32_get_thread_context.
15996 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15997 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16000 2007-12-03 Leo Zayas
16001 Pedro Alves <pedro_alves@portugalmail.pt>
16003 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16005 (child_add_thread): Minor cleanup.
16006 (child_continue): Resume artificially suspended threads before
16007 calling ContinueDebugEvent.
16008 (suspend_one_thread): New.
16009 (fake_breakpoint_event): New.
16010 (get_child_debug_event): Change return type to int. Check here if
16011 gdb sent an interrupt request. If a soft interrupt was requested,
16012 fake a breakpoint event. Return 0 if there is no event to handle,
16014 (win32_wait): Don't check here if gdb sent an interrupt request.
16015 Ensure there is a valid event to handle.
16016 (win32_request_interrupt): Add soft interruption method as last
16019 2007-12-03 Leo Zayas
16020 Pedro Alves <pedro_alves@portugalmail.pt>
16022 * win32-low.h (win32_thread_info): Add descriptions to the
16023 structure members. Replace `suspend_count' counter by a
16025 * win32-low.c (thread_rec): Update condition of when to get the
16026 context from the inferior. Rely on ContextFlags being set if it
16027 has already been retrieved. Only suspend the inferior thread if
16028 we haven't already. Warn if that fails.
16029 (continue_one_thread): s/suspend_count/suspended/. Only call
16030 ResumeThread once. Warn if that fails.
16032 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16034 * win32-low.c (win32_wait): Don't read from the inferior when it
16035 has already exited.
16037 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16039 * Makefile.in (win32_low_h): New variable.
16040 (win32-low.o): Add dependency on $(win32_low_h).
16041 (win32-arm-low.o, win32-i386-low.o): New rules.
16043 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16045 * hostio.c: Correct copyright year.
16047 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16049 * Makefile.in (OBS): Add hostio.o.
16050 (hostio.o): New rule.
16051 * server.h (handle_vFile): Declare.
16052 * hostio.c: New file.
16053 * server.c (handle_v_requests): Take packet_len and new_packet_len
16054 for binary packets. Call handle_vFile.
16055 (main): Update call to handle_v_requests.
16057 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16059 * linux-low.c: Include <sched.h>.
16061 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16063 * linux-low.c (linux_tracefork_grandchild): New.
16064 (linux_tracefork_child): Use clone.
16065 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16067 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16069 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16071 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16073 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16075 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16077 * inferiors.c (change_inferior_id): Delete.
16078 (add_pid_to_list, pull_pid_from_list): New.
16079 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16080 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16081 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16082 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16083 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16084 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16085 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16086 (using_threads): Always set to 1.
16087 (handle_extended_wait): New.
16088 (add_process): Do not set TID.
16089 (linux_create_inferior): Set must_set_ptrace_flags.
16090 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16091 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16092 (linux_thread_alive): Rename TID argument to LWPID.
16093 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16094 (linux_wait_for_event): Do not use TID or check using_threads. Update
16095 call to dead_thread_notify. Call handle_extended_wait.
16096 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16097 (send_sigstop): Delete sigstop_sent.
16098 (wait_for_sigstop): Avoid TID.
16099 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16100 (linux_test_for_tracefork): New.
16101 (linux_lookup_signals): Use thread_db_active and
16102 linux_supports_tracefork_flag.
16103 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16104 * linux-low.h (get_process_thread): Avoid TID.
16105 (struct process_ifo): Move thread_known and tid to the end. Remove
16107 (linux_attach_lwp, thread_db_init): Update prototypes.
16108 * server.h (change_inferior_id): Delete prototype.
16109 (add_pid_to_list, pull_pid_from_list): New prototypes.
16110 * thread-db.c (thread_db_use_events): New.
16111 (find_first_thread): Rename to...
16112 (find_one_thread): ...this. Update callers and messages. Do not
16113 call fatal. Check thread_db_use_events. Do not call
16114 change_inferior_id or new_thread_notify.
16115 (maybe_attach_thread): Update. Do not call new_thread_notify.
16116 (thread_db_init): Set thread_db_use_events. Check use_events.
16117 * utils.c (fatal, warning): Correct message prefix.
16119 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16121 * Makefile.in (clean): Remove new files.
16122 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16123 (powerpc-64.o, powerpc-64.c): New rules.
16124 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16125 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16127 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16129 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16130 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16131 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16132 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16133 (target_regsets): Add AltiVec and SPE register sets.
16134 * configure.ac: Check for AltiVec and SPE.
16135 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16136 (ppc_fill_vrregset, ppc_store_vrregset): New.
16137 (target_regsets): Add AltiVec register set.
16138 * configure: Regenerated.
16140 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16142 * linux-low.c (O_LARGEFILE): Define.
16143 (linux_read_memory): Use /proc/PID/mem.
16144 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16145 * configure, config.in: Regenerated.
16147 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16149 * linux-low.c (linux_wait_for_event): Do not pass signals while
16152 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16154 * win32-low.c (create_process): New.
16155 (win32_create_inferior): Use create_process instead of
16156 CreateProcess. If create_process failed retry appending an ".exe"
16157 suffix. Store the GetLastError result immediatelly after
16158 create_process calls and use it on the call to error.
16160 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16162 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16164 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16166 * configure.ac: Switch license to GPLv3.
16168 2007-08-01 Michael Snyder <msnyder@access-company.com>
16170 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16172 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16174 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16176 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16177 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16178 CloseToolhelp32Snapshot.
16179 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16180 CloseToolhelp32Snapshot.
16182 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16184 * server.c (main): Check for inferior exit before main loop.
16186 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16188 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16189 instead of on tmp_desc.
16191 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16192 Daniel Jacobowitz <dan@codesourcery.com>
16194 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16195 (add_thread): Minor cleanups.
16196 (clear_inferiors): Move lower in the file. Clear the DLL
16198 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16199 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16200 (xml_escape_text): New.
16201 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16203 (handle_v_cont): Report errors.
16204 (gdbserver_version): Update.
16205 (main): Correct size of own_buf. Do not report initial DLL events.
16206 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16207 (unloaded_dll, xml_escape_text): New.
16208 * win32-low.c (enum target_waitkind): Update comments.
16209 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16210 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16211 (win32_EnumProcessModules, win32_GetModuleInformation)
16212 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16213 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16214 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16215 (win32_Module32First, win32_Module32Next, load_toolhelp)
16216 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16217 (get_child_debug_event): Handle DLL events.
16218 (win32_wait): Likewise.
16220 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16222 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16223 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16225 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16227 * win32-low.c (handle_output_debug_string): Ignore event if not
16230 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16232 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16234 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16236 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16238 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16240 * inferiors.c (change_inferior_id): Add comment.
16241 * linux-low.c (check_removed_breakpoint): Add an early
16242 prototype. Improve debug output.
16243 (linux_attach): Doc update.
16244 (linux_detach_one_process, linux_detach): Clean up before releasing
16246 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16247 * linux-low.h (struct process_info): Doc improvement.
16248 * mem-break.c (delete_all_breakpoints): New.
16249 * mem-break.h (delete_all_breakpoints): New prototype.
16250 * thread-db.c (find_first_thread): New.
16251 (thread_db_create_event): Call it instead of
16252 thread_db_find_new_threads. Clean up unused variables.
16253 (maybe_attach_thread): Remove first thread handling.
16254 (thread_db_find_new_threads): Use find_first_thread.
16255 (thread_db_get_tls_address): Likewise.
16257 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16259 * thread-db.c (thread_db_find_new_threads): Add prototype.
16260 (thread_db_create_event): Check for the main thread before adding
16262 (maybe_attach_thread): Only enable event reporting if TID == 0.
16263 (thread_db_get_tls_address): Check for new threads.
16265 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16267 * linux-low.c (linux_create_inferior): Try execv before execvp.
16268 * spu-low.c (spu_create_inferior): Likewise.
16270 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16272 * linux-low.c (linux_create_inferior): Change execv to execvp.
16273 * spu-low.c (spu_create_inferior): Likewies.
16275 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16277 * Makefile.in (clean): Clean new files instead of deleted ones.
16278 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16279 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16281 * configure.srv: Specify XML files and new regformats for MIPS and
16283 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16284 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16285 an entry for the restart register.
16286 (mips_cannot_fetch_register, mips_cannot_store_register)
16287 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16288 register names to match the XML descriptions.
16289 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16290 restart register instead of $0.
16292 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16293 Markus Deuling <deuling@de.ibm.com>
16295 * remote-utils.c (decode_xfer_write): New function.
16296 * server.h (decode_xfer_write): Add prototype.
16297 * server.c (handle_query): Add PACKET_LEN argument. Support
16298 qXfer:spu:read and qXfer:spu:write packets.
16299 (main): Pass packet_len to handle_query.
16300 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16301 * target.h (target_ops): Add qxfer_spu.
16303 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16305 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16306 accessing non-seekable spufs files.
16308 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16310 * server.c (handle_query): Add reply for qC packet.
16312 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16313 Leo Zayas <lerele@champenstudios@com>
16315 * server.h (check_remote_input_interrupt_request): New function.
16316 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16317 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16318 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16319 (check_remote_input_interrupt_request): New function.
16320 * server.h (check_remote_input_interrupt_request): Declare.
16321 * win32-low.c (winapi_DebugBreakProcess,
16322 winapi_GenerateConsoleCtrlEvent): New typedefs.
16323 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16325 (win32_wait): Check for remote interrupt request
16326 with check_remote_input_interrupt_request.
16327 (win32_request_interrupt): New function.
16328 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16330 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16332 * win32-low.c (debug_registers_changed,
16333 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16334 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16335 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16336 (thread_rec): Get context using the low target.
16337 (child_add_thread): Call thread_added on the low target,
16338 which does the same thing.
16340 (do_initial_child_stuff): Remove debug registers references.
16341 Set context using the low target. Resume threads after
16342 setting the contexts.
16343 (child_continue): Remove dead variable. Remove debug
16344 registers references.
16345 (child_fetch_inferior_registers): Go through the low target.
16346 (do_child_store_inferior_registers): Remove.
16347 (child_store_inferior_registers): Go through the low target.
16348 (win32_resume): Remove debug registers references.
16349 Set context using the low target.
16350 (handle_exception): Change return type to void. Don't record
16351 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16352 first chance exception.
16353 (get_child_debug_event): Change return type to void. Remove
16354 goto loop. Always return after waiting for debug event.
16355 (win32_wait): Convert to switch statement. Handle spurious
16358 * win32-i386-low.c (debug_registers_changed,
16359 debug_registers_used): New.
16360 (initial_stuff): Rename to ...
16361 (i386_initial_stuff): ... this. Clear debug registers
16363 (store_debug_registers): Delete.
16364 (i386_get_thread_context): New.
16365 (load_debug_registers): Delete.
16366 (i386_set_thread_context): New.
16367 (i386_thread_added): New.
16368 (single_step): Rename to ...
16369 (i386_single_step): ... this.
16370 (do_fetch_inferior_registers): Rename to ...
16371 (i386_fetch_inferior_register): ... this.
16372 (i386_store_inferior_register): New.
16373 (the_low_target): Adapt to new interface.
16375 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16376 (arm_get_thread_context): New.
16377 (arm_set_thread_context): New.
16379 (do_fetch_inferior_registers): Rename to ...
16380 (arm_fetch_inferior_register): ... this.
16381 (arm_store_inferior_register): New.
16382 (arm_wince_breakpoint): Reimplement as unsigned long.
16383 (arm_wince_breakpoint_len): Define.
16384 (the_low_target): Adapt to new interface.
16386 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16387 load_debug_registers. Add get_thread_context, set_thread_context,
16388 thread_added and store_inferior_register. Rename
16389 fetch_inferior_registers to fetch_inferior_register.
16390 (regptr): Remove declaration.
16392 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16394 * linux-low.c (linux_detach): Change return type to int. Return 0.
16395 * spu-low.c (spu_detach): Likewise.
16397 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16399 * target.h (target_ops): Change return type of detach to int.
16401 (join_inferior): New.
16402 * server.c (main): Don't skip detach support on mingw32.
16403 If the inferior doesn't support detaching return error.
16404 Call join_inferior instead of using waitpid.
16405 * linux-low.c (linux_join): New.
16406 (linux_target_op): Add linux_join.
16407 * spu-low.c (spu_join): New.
16408 (spu_target_ops): Add spu_join.
16409 * win32-low.c (win32_detach): Adapt to new interface.
16410 Reopen current_process_handle before detaching. Issue a child
16411 resume before detaching.
16413 (win32_target_op): Add win32_join.
16415 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16417 * win32-low.c (win32-attach): Fix return value.
16418 * target.h (target_ops): Describe ATTACH return values.
16420 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16422 * win32-low.c (GETPROCADDRESS): Define.
16423 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16424 (winapi_DebugSetProcessKillOnExit): Likewise.
16425 (win32_create_inferior): Force usage of ansi CreateProcessA.
16426 (win32_attach): Use GETPROCADDRESS.
16427 (win32_detach): Likewise.
16429 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16431 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16433 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16435 * win32-low.c: Commit leftover changes from 2007-03-29.
16437 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16439 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16440 fields short instead of int. Add explicit padding.
16441 (i387_cache_to_fsave): Remove unnecessary casts.
16442 (i387_fsave_to_cache): Doc fix.
16443 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16445 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16447 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16448 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16450 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16452 * configure.srv (arm*-*-mingw32ce*): Move near the other
16455 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16457 * configure.ac: Add errno checking.
16458 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16459 sys/file.h and malloc.h.
16460 (AC_CHECK_DECLS): Add perror.
16461 (srv_mingwce): Handle.
16462 * configure.srv (i[34567]86-*-cygwin*): Add
16463 win32-i386-low.o to srv_tgtobj.
16464 (i[34567]86-*-mingw*): Likewise.
16465 (arm*-*-mingw32ce*): Add case.
16466 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16467 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16468 [__MINGW32CE__] (strerror): New function.
16469 [__MINGW32CE__] (errno): Define to GetLastError.
16470 [__MINGW32CE__] (COUNTOF): New macro.
16471 (remote_open): Remove extra close call.
16472 * mem-break.c (delete_breakpoint_at): New function.
16473 * mem-break.h (delete_breakpoint_at): Declare.
16474 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16475 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16476 [USE_WIN32API] (read, write): Add char* casts.
16477 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16478 * server.h: Include wincecompat.h on Windows CE.
16479 [HAVE_ERRNO_H]: Check.
16480 (perror): Declare if not declared.
16481 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16482 (perror_with_name): Remove errno declaration.
16483 * wincecompat.h: New.
16484 * wincecompat.c: New.
16485 * win32-low.h: New.
16486 * win32-arm-low.c: New.
16487 * win32-i386-low.c: New.
16488 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16489 (OUTMSG2): Make it safe.
16491 (COUNTOF): New macro.
16492 (NUM_REGS): Get it from the low target.
16493 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16494 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16495 (thread_rec): Let low target handle debug registers.
16496 (child_add_thread): Likewise.
16497 (child_init_thread_list): Likewise.
16498 (continue_one_thread): Likewise.
16500 (do_child_fetch_inferior_registers): Move to ...
16501 * win32-i386-low.c: ... here, and rename to ...
16502 (do_fetch_inferior_registers): ... this.
16503 * win32-low.c (child_fetch_inferior_registers):
16504 Go through the low target.
16505 (do_child_store_inferior_registers): Use regptr.
16506 (strwinerror): New function.
16507 (win32_create_inferior): Handle Windows CE.
16508 Use strwinerror instead of strerror on Windows error
16509 codes. Add program to the error output.
16510 Don't close the main thread handle on Windows CE.
16511 (win32_attach): Use coredll.dll on Windows CE.
16512 (win32_kill): Close current process and current
16514 (win32_detach): Use coredll.dll on Windows CE.
16515 (win32_resume): Let low target handle debug registers, and
16517 (handle_exception): Add/Remove initial breakpoint. Avoid
16518 non-existant WSTOPSIG on Windows CE.
16519 (win32_read_inferior_memory): Cast to remove warning.
16520 (win32_arch_string): Go through the low target.
16521 (initialize_low): Call set_breakpoint_data with the low
16522 target's breakpoint.
16523 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16524 FOP_REGNUM, mappings): Move to ...
16525 * win32-i386-low.c: ... here.
16526 * win32-low.c (win32_thread_info): Move to ...
16527 * win32-low.h: ... here.
16528 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16529 win32-arm-low.c and wincecompat.c.
16530 (all:): Add $EXEEXT.
16531 (install-only:): Likewise.
16532 (gdbserver:): Likewise.
16533 (gdbreplay:): Likewise.
16534 * config.in: Regenerate.
16535 * configure: Regenerate.
16537 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16539 * win32-low.c: Rename typedef thread_info to
16540 win32_thread_info throughout.
16542 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16544 * win32-i386-low.c: Rename to ...
16545 * win32-low.c: ... this.
16546 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16547 * Makefile.in: Likewise.
16549 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16551 * remote-utils.c (monitor_output): Constify msg parameter.
16552 * server.h (monitor_output): Likewise.
16553 * win32-i386-low.c (handle_output_debug_string): New.
16554 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16555 handle_output_debug_string.
16556 (get_child_debug_event): Likewise.
16558 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16560 * server.c (main): Correct strtoul check.
16562 2007-03-27 Jon Ringle <jon@ringle.org>
16564 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16566 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16568 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16570 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16572 * terminal.h: Check HAVE_SGTTY_H.
16574 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16576 * remote-utils.c (remote_open): Print out the assigned port number.
16578 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16580 * remote-utils.c (monitor_output): New function.
16581 * server.c (debug_threads): Define here.
16582 (monitor_show_help): New function.
16583 (handle_query): Handle qRcmd.
16584 (main): Do not handle 'd' packet.
16585 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16586 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16589 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16591 * Makefile.in (EXEEXT): New.
16592 (clean): Use $(EXEEXT).
16594 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16596 * target.h (target_ops): Rename send_signal to request_interrupt,
16597 and remove enum target_signal parameter.
16598 * linux-low.c (linux_request_interrupt): Rename from
16599 linux_send_signal, and always send SIGINT.
16600 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16601 and always send SIGINT.
16602 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16604 (input_interrupt): Likewise.
16606 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16608 * server.c (get_features_xml): Check if target implemented
16610 * win32-i386-low.c (win32_arch_string): New.
16611 (win32_target_ops): Add win32_arch_string as arch_string member.
16613 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16615 * spu-low.c (spu_arch_string): New.
16616 (spu_target_ops): Add spu_arch_string.
16618 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16620 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16621 * configure.ac: Do not check for terminal.h.
16622 * configure, config.in: Regenerated.
16624 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16626 * Makefile.in (OBS): Add $(XML_BUILTIN).
16627 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16629 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16630 (arm-with-iwmmxt.c): New.
16631 * config.in, configure: Regenerate.
16632 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16633 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16634 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16635 (arm*-*-linux*): Add iWMMXt and regset support.
16636 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16637 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16638 (arm_store_wmmxregset, target_regsets): New.
16639 * server.c (get_features_xml): Take annex argument. Check builtin
16641 (handle_query): Handle multiple annexes.
16643 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16645 * remote-utils.c [USE_WIN32API] (read, write): Define.
16646 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16649 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16651 * linux-i386-low.c (the_low_target): Set arch_string.
16652 * linux-x86-64-low.c (the_low_target): Likewise.
16653 * linux-low.c (linux_arch_string): New.
16654 (linux_target_ops): Add it.
16655 * linux-low.h (struct linux_target_ops): Add arch_string.
16656 * server.c (write_qxfer_response): Use const void * for DATA.
16657 (get_features_xml): New.
16658 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16659 * target.h (struct target_ops): Add arch_string method.
16661 2007-01-03 Denis Pilat <denis.pilat@st.com>
16662 Daniel Jacobowitz <dan@codesourcery.com>
16664 * linux-low.c (linux_kill): Handle being called with no threads.
16665 * win32-i386-low.c (win32_kill): Likewise.
16666 (get_child_debug_event): Clear current_process_handle.
16668 2006-12-30 Denis PILAT <denis.pilat@st.com>
16669 Daniel Jacobowitz <dan@codesourcery.com>
16671 * remote-utils.c (remote_open): Check the type of specified
16672 serial port devices before opening them.
16673 * server.c (main): Kill the inferior if an error occurs during
16674 the first remote_open.
16676 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16678 * README: Update supported targets.
16680 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16682 * Makefile.in (clean): Remove reg-mips64.c.
16683 (reg-mips64.c, reg-mips64.o): New rules.
16684 * configure.srv: Handle mips64. Include regset support for mips.
16685 * linux-mips-low.c (union mips_register): New.
16686 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16687 (mips_breakpoint, mips_breakpoint_at): Use int.
16688 (mips_collect_register, mips_supply_register)
16689 (mips_collect_register_32bit, mips_supply_register_32bit)
16690 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16691 (mips_store_fpregset, target_regsets): New.
16692 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16694 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16696 * configure.srv: Add target "spu*-*-*".
16697 * Makefile.in (clean): Remove reg-spu.c.
16698 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16699 * spu-low.c: New file.
16701 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16703 * configure.ac: Correct td_thr_tls_get_addr test.
16704 * configure: Regenerated.
16706 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16708 * linux-low.c (linux_wait_for_event): Reformat. Use the
16709 pass_signals array.
16710 * remote-utils.c (decode_address_to_semicolon): New.
16711 * server.c (pass_signals, handle_general_set): New.
16712 (handle_query): Mention QPassSignals for qSupported.
16713 (main): Call handle_general_set.
16714 * server.h (pass_signals, decode_address_to_semicolon): New.
16716 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16718 * server.c (handle_query): Correct error handling for read_auxv.
16720 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16722 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16723 and srv_linux_thread_db to yes.
16724 * linux-s390-low.c (s390_fill_gregset): New function.
16725 (target_regsets): Define data structure.
16727 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16729 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16730 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16731 * config.in, configure: Regenerated.
16732 * inferiors.c (gdb_id_to_thread): New function.
16733 (gdb_id_to_thread_id): Use it.
16734 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16735 * linux-low.h (struct process_info): Add th member.
16736 (thread_db_get_tls_address): New prototype.
16737 * remote-utils.c (decode_address): Make non-static.
16738 * server.c (handle_query): Handle qGetTLSAddr.
16739 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16740 * target.h (struct target_ops): Add get_tls_address.
16741 * thread-db.c (maybe_attach_thread): Save the thread handle.
16742 (thread_db_get_tls_address): New.
16744 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16746 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16747 (linux_resume_one_process): Take a siginfo_t *. Update all
16748 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16749 (struct pending_signals): Add a siginfo_t.
16750 (linux_wait_for_process): Always set last_status.
16751 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16752 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16753 * linux-low.h (struct process_info): Add last_status.
16755 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16757 * remote-utils.c (try_rle): New function.
16758 (putpkt_binary): Use it.
16760 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16762 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16763 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16764 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16765 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16766 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16769 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16771 * server.c (terminal_fd): New variable.
16772 (old_foreground_pgrp): Likewise.
16773 (restore_old_foreground_pgrp): New function.
16774 (start_inferior): Record the terminal file descriptor in terminal_fd
16775 and its original foreground group in old_foreground_pgrp. Register
16776 restore_old_foreground_pgrp with atexit().
16778 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16780 * server.c (handle_query): Correct qPart to qXfer.
16782 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16784 * configure.ac: Check for more headers which are missing on
16785 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16786 * configure.srv: Add Cygwin and mingw32.
16787 * remote-utils.c: Don't include headers unconditionally which
16788 are missing on mingw32. Include <winsock.h> for mingw32.
16789 (remote_open): Adjust for mingw32 support. Flush
16790 standard error after writing to it.
16791 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16792 (unblock_async_io, enable_async_io, disable_async_io)
16793 (readchar, getpkt): Update for Winsock support.
16794 (prepare_resume_reply): Expect a protocol signal number.
16795 * server.c: Disable <sys/wait.h> on mingw32.
16796 (start_inferior): Adjust for mingw32 support. Flush
16797 standard error after writing to it.
16798 (attach_inferior): Likewise. Use protocol signal
16800 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16802 * win32-i386-low.c: New file.
16803 * Makefile.in (XM_CLIBS): Set.
16804 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16805 (win32-i386-low.o): New dependency rule.
16806 * linux-low.c (linux_wait): Use target signal numbers.
16807 * target.h (struct target_ops): Doc fix.
16808 * server.h (target_signal_to_name): New prototype.
16809 * gdbreplay.c: Don't include headers unconditionally which
16810 are missing on mingw32. Include <winsock.h> for mingw32.
16811 (remote_close, remote_open): Adjust for Winsock support.
16812 * configure, config.in: Regenerated.
16814 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16816 * server.c (decode_xfer_read, write_qxfer_response): New.
16817 (handle_query): Take a packet length argument. Handle
16818 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16819 the qSupported response.
16820 (main): Update call to handle_query.
16822 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16824 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16825 (putpkt_binary): Renamed from putpkt and adjusted for binary
16827 (putpkt): New wrapper for putpkt_binary.
16828 (readchar): Don't mask off the high bit.
16829 (decode_X_packet): New function.
16830 * server.c (main): Call putpkt_binary if a handler sets the packet
16831 length. Save the length of the incoming packet. Handle 'X'.
16832 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16834 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16836 * server.c (handle_query): Handle qSupported.
16838 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16840 * remote-utils.c (all_symbols_looked_up): New variable.
16841 (look_up_one_symbol): Check it.
16842 * server.h (look_up_one_symbol): New declaration.
16843 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16845 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16847 * Makefile.in (linux-arm-low.o): Update dependencies.
16848 * linux-arm-low.c: Include "gdb_proc_service.h".
16849 (PTRACE_GET_THREAD_AREA): Define.
16850 (ps_get_thread_area): New function.
16852 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16854 * configure.srv (m68k*-*-uclinux*): New target.
16855 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16856 (linux_resume_one_process): Remove extraneous cast.
16857 (linux_read_offsets): New.
16858 (linux_target_op): Add linux_read_offsets on mmuless systems.
16859 * server.c (handle_query): Add qOffsets logic.
16860 * target.h (struct target_ops): Add read_offsets.
16862 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16864 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16865 (PTRACE_GET_THREAD_AREA): Define.
16866 (ps_get_thread_area): New function.
16867 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16868 (linux-x86-64-low.o): Update.
16870 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16872 * configure.ac: Remove checks for prfpregset_t.
16873 * gdb_proc_service.h: New file.
16874 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16875 new "gdb_proc_service.h".
16876 * proc-service.c: Likewise.
16877 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16878 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16879 * Makefile.in (gdb_proc_service_h): Updated.
16880 * configure, config.in: Regenerated.
16882 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16884 * remote-utils.c (prepare_resume_reply): Move declaration
16885 of gdb_id_from_wait to the top of the block.
16887 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16889 * linux-low.c (regsets_store_inferior_registers): Read the regset
16890 from the target before filling it.
16892 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16894 * server.c (attach_inferior): Return SIGTRAP for a successful
16897 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16899 * Makefile.in (OBS): Add version.o.
16900 (STAGESTUFF): Delete.
16901 (version.o): Add dependencies.
16902 (version.c): Replace rule.
16903 (clean): Remove version.c.
16904 * server.c (gdbserver_version): New.
16905 (gdbserver_usage): Use printf.
16906 (main): Handle --version and --help.
16907 * server.h (version, host_name): Add declarations.
16909 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16921 * linux-x86-64-low.c:
16923 * linux-s390-low.c:
16924 * linux-ppc64-low.c:
16926 * linux-mips-low.c:
16927 * linux-m68k-low.c:
16928 * linux-m32r-low.c:
16931 * linux-ia64-low.c:
16932 * linux-i386-low.c:
16933 * linux-crisv32-low.c:
16945 * gdbserver.1: Add (C) after Copyright. Update the FSF
16948 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16950 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16951 (arm_breakpoint_at): Recognize both breakpoints.
16952 (the_low_target): Use the correct breakpoint instruction.
16954 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16956 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16957 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16958 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16959 (the_low_target): Update.
16961 2005-10-25 Andreas Schwab <schwab@suse.de>
16963 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16965 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16966 (ia64_num_regs): Reduce to 462.
16968 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16970 * acinclude.m4: Correct quoting.
16971 * aclocal.m4: Regenerated.
16973 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16974 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16975 (thread_db_init): Call thread_db_err_str.
16976 * configure.ac: Check for TD_VERSION.
16977 * config.in, configure: Regenerated.
16979 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16981 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16983 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16985 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16986 is not available. Define HAVE_PTRACE_GETREGS if it is.
16987 * config.in, configure: Regenerated.
16988 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16989 * linux-i386-low.c, linux-m68k-low.c: Update to use
16990 HAVE_PTRACE_GETREGS.
16991 * linux-low.c (regsets_fetch_inferior_registers)
16992 (regsets_store_inferior_registers): Only return 0 if we processed
16994 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16995 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16997 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16999 * inferiors.c (struct thread_info): Add gdb_id.
17000 (add_thread): Add gdb_id argument.
17001 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17002 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17003 calls to add_thread.
17004 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17005 * server.c (handle_query): Use thread_to_gdb_id.
17006 (handle_v_cont, main): Use gdb_id_to_thread_id.
17007 * server.h (add_thread): Update prototype.
17008 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17011 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17013 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17014 left-padded registers.
17015 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17016 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17018 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17020 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17021 * configure: Regenerate.
17022 * config.in: Regenerate.
17023 * server.h (NEED_DECLARATION_STRERROR):
17024 Replace with !HAVE_DECL_STRERROR.
17026 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17028 * linux-low.c (linux_wait, linux_send_signal): Don't test
17029 an unsigned long variable for > 0 if it could be MAX_ULONG.
17030 * server.c (myresume): Likewise.
17031 * target.c (set_desired_inferior): Likewise.
17033 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17035 * configure.ac: Simplify and improve check for socklen_t.
17036 * configure, config.in: Regenerate.
17038 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17040 * acconfig.h: Remove.
17041 * configure.ac: Add a test for socklen_t. Use three-argument
17042 AC_DEFINE throughout.
17043 * config.in: Regenerated using autoheader 2.59.
17044 * configure: Regenerated.
17046 * gdbreplay.c (socklen_t): Provide a default.
17047 (remote_open): Use socklen_t.
17048 * remote-utils.c (socklen_t): Provide a default.
17049 (remote_open): Use socklen_t.
17050 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17053 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17055 * linux-low.c (linux_read_memory, linux_write_memory)
17056 (linux_read_auxv): Likewise.
17057 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17058 (check_mem_write): Likewise.
17059 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17061 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17062 (registers_from_string, register_data): Likewise.
17063 * server.c (handle_query, main): Likewise.
17064 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17065 (decode_M_packet): Likewise.
17066 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17067 * target.h (struct target_ops): Update read_memory, write_memory,
17069 (read_inferior_memory, write_inferior_memory): Update.
17070 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17071 to unsigned char *.
17072 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17073 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17074 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17075 linux-s390-low.c, linux-sh-low.c: Update for changes in
17076 read_inferior_memory and the_low_target->breakpoint.
17078 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17080 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17081 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17082 * configure.srv: Add powerpc64-*-linux*.
17083 * linux-ppc64-low.c: New file.
17085 2005-05-23 Orjan Friberg <orjanf@axis.com>
17087 * linux-cris-low.c: New file with support for CRIS.
17088 * linux-crisv32-low.c: Ditto for CRISv32.
17089 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17090 (clean): Add reg-cris.c and reg-crisv32.c.
17091 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17092 reg-crisv32.o, and reg-crisv32.c to make rules.
17093 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17094 recognized targets.
17096 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17098 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17099 of sizeof (PTRACE_XFER_TYPE).
17100 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17102 2005-05-12 Orjan Friberg <orjanf@axis.com>
17104 * target.h (struct target_ops): Add insert_watchpoint,
17105 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17106 pointers for hardware watchpoint support.
17107 * linux-low.h (struct linux_target_ops): Ditto.
17108 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17109 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17110 to linux_target_ops.
17111 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17113 * server.c (main): Recognize 'Z' and 'z' packets.
17115 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17117 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17118 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17119 (the_low_target): Add new members.
17121 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17123 * proc-service.c (ps_lgetregs): Search all_processes instead of
17126 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17128 * server.c (start_inferior): Change return type to int.
17129 (attach_inferior): Change sigptr to int *.
17130 (handle_v_cont, handle_v_requests): Change signal to int *.
17131 (main): Change signal to int.
17133 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17135 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17136 * configure.srv: Add m32r*-*-linux*.
17137 * linux-m32r-low.c: New file.
17139 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17141 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17143 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17145 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17146 Take unsigned long arguments for PIDs.
17147 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17148 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17149 (wait_for_sigstop, linux_resume_one_process)
17150 (regsets_fetch_inferior_registers, linux_send_signal)
17151 (linux_read_auxv): Likewise. Update the types of variables holding
17152 PIDs. Update format string specifiers.
17153 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17154 * remote-utils.c (prepare_resume_reply): Likewise.
17155 * server.c (cont_thread, general_thread, step_thread)
17156 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17158 (handle_query): Update format specifiers.
17159 (handle_v_cont, main): Use strtoul for thread IDs.
17160 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17161 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17162 (general_thread, step_thread, thread_from_wait)
17163 (old_thread_from_wait): Update.
17164 * target.h (struct thread_resume): Use unsigned long for THREAD.
17165 (struct target_ops): Use unsigned long for arguments to attach and
17168 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17170 * acinclude.m4: Include bfd/bfd.m4 directly.
17171 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17172 <agriffis@toolchain.org>.
17173 * aclocal.m4, configure: Regenerated.
17175 2005-01-07 Andrew Cagney <cagney@gnu.org>
17177 * configure.ac: Rename configure.in, require autoconf 2.59.
17178 * configure: Re-generate.
17180 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17182 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17183 LIBS when finished.
17184 * aclocal.m4: Regenerated.
17185 * configure: Regenerated.
17187 2004-11-21 Andreas Schwab <schwab@suse.de>
17189 * linux-m68k-low.c (m68k_num_gregs): Define.
17190 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17191 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17192 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17193 (m68k_breakpoint_at): New. Add to the_low_target.
17195 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17196 srv_linux_thread_db to yes.
17198 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17200 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17201 (ARCH_SET_FS): Likewise.
17202 (ARCH_GET_FS): Likewise.
17203 (ARCH_GET_GS): Likewise.
17205 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17207 * linux-i386-low.c (ps_get_thread_area): New.
17208 * linux-x86-64-low.c (ps_get_thread_area): New.
17209 * linux-low.c: Include <sys/syscall.h>.
17210 (linux_kill_one_process): Don't kill the first thread here.
17211 (linux_kill): Kill the first thread here.
17212 (kill_lwp): New function.
17213 (send_sigstop, linux_send_signal): Use it.
17214 * proc-service.c: Clean up #ifdefs.
17215 (fpregset_info): Delete.
17216 (ps_lgetregs): Update and enable implementation.
17217 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17219 * remote-utils.c (struct sym_cache, symbol_cache): New.
17220 (input_interrupt): Print a clearer message.
17221 (async_io_enabled): New variable.
17222 (enable_async_io, disable_async_io): Use it. Update comments.
17223 (look_up_one_symbol): Use the symbol cache.
17224 * thread-db.c (thread_db_look_up_symbols): New function.
17225 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17227 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17229 * configure.in: Test for -rdynamic.
17230 * configure: Regenerated.
17231 * Makefile (INTERNAL_LDFLAGS): New.
17232 (gdbserver, gdbreplay): Use it.
17234 2004-09-02 Andrew Cagney <cagney@gnu.org>
17236 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17238 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17240 * linux-low.c (linux_wait): Clear all_processes list also.
17242 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17244 * linux-low.c: Include <errno.h>. Remove extern declaration of
17247 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17249 * gdbreplay.c, server.h, utils.c: Update copyright years.
17251 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17253 * server.c (main): Print child status or termination signal from
17254 variable 'signal', not 'sig'.
17256 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17258 * linux-low.c (linux_read_memory): Change return type to
17259 int. Check for and return error from ptrace().
17260 * target.c (read_inferior_memory): Change return type to int. Pass
17261 back return status from the_target->read_memory().
17262 * target.h (struct target_ops): Adapt *read_memory() prototype.
17264 (read_inferior_memory): Adapt prototype.
17265 * server.c (main): Return an error packet if
17266 read_inferior_memory() returns an error.
17268 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17270 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17271 Unify with other clean targets.
17273 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17275 * server.c (handle_v_cont): Call set_desired_inferior.
17277 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17279 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17281 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17283 * linux-low.c (linux_wait): Unblock async I/O.
17284 (linux_resume): Block and enable async I/O.
17285 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17286 * server.h (block_async_io, unblock_async_io): Add prototypes.
17288 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17290 * remote-utils.c (remote_open): Print a status notice after
17291 opening a TCP port.
17292 * server.c (attach_inferior): Print a status notice after
17295 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17297 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17299 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17301 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17303 * server.c, target.h: Update copyright years.
17305 2004-02-25 Roland McGrath <roland@redhat.com>
17307 * target.h (struct target_ops): New member `read_auxv'.
17308 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17309 * linux-low.c (linux_read_auxv): New function.
17310 (linux_target_ops): Initialize `read_auxv' member to that.
17312 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17314 Committed by Jim Blandy <jimb@redhat.com>.
17316 * linux-s390-low.c (s390_num_regs): Update.
17317 (s390_regmap): Remove control registers. Use __s390x__ predefine
17318 instead of GPR_SIZE to distiguish s390 and s390x targets.
17320 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17322 * linux-low.c: Update copyright year.
17323 (check_removed_breakpoint): Clear pending_is_breakpoint.
17324 (linux_set_resume_request, linux_queue_one_thread)
17325 (resume_status_pending_p): New functions.
17326 (linux_continue_one_thread): Use process->resume.
17327 (linux_resume): Only resume threads if there are no pending events.
17328 * linux-low.h (struct process_info): Add resume request
17331 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17333 * regcache.c (new_register_cache): Clear the allocated register
17334 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17336 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17338 * linux-low.c (linux_resume): Take a struct thread_resume *
17340 (linux_wait): Update call.
17341 (resume_ptr): New static variable.
17342 (linux_continue_one_thread): Renamed from
17343 linux_continue_one_process. Use resume_ptr.
17344 (linux_resume): Use linux_continue_one_thread.
17345 * server.c (handle_v_cont, handle_v_requests): New functions.
17346 (myresume): New function.
17347 (main): Handle 'v' case.
17348 * target.h (struct thread_resume): New type.
17349 (struct target_ops): Change argument of "resume" to struct
17351 (myresume): Delete macro.
17353 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17355 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17356 (uninstall): Support DESTDIR.
17358 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17360 * configure.srv: Add xscale*linux copy of arm*linux entry.
17362 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17364 * linux-arm-low.c (arm_reinsert_addr): New function.
17365 (the_low_target): Add arm_reinsert_addr.
17367 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17369 * mem-break.c: Remove whitespace at end of file.
17371 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17373 * configure.in: Check whether we need to prototype strerror.
17374 * server.h: Optionally prototype strerror.
17375 * gdbreplay.c (perror_with_name): Use strerror.
17376 * linux-low.c (linux_attach_lwp): Use strerror.
17377 * utils.c (perror_with_name): Use strerror.
17378 * config.in, configure: Regenerated.
17380 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17382 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17383 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17385 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17387 * Makefile.in (SFILES): Update.
17388 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17389 low-sun3.c: Remove files.
17391 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17393 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17394 (linux_detach_one_process, linux_detach): New functions.
17395 (linux_target_ops): Add linux_detach.
17396 * server.c (main): Handle 'D' packet.
17397 * target.h (struct target_ops): Add "detach" member.
17398 (detach_inferior): Define.
17400 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17402 From Kelley Cook <kelleycook@wideopenwest.com>:
17403 * configure.srv: Accept i[34567]86 variants.
17405 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17407 * linux-low.c (linux_wait_for_event): Correct comment typos.
17408 (linux_resume_one_process): Call check_removed_breakpoint.
17409 (linux_send_signal): New function.
17410 (linux_target_ops): Add linux_send_signal.
17411 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17413 * target.h (struct target_ops): Add send_signal.
17415 2003-05-29 Jim Blandy <jimb@redhat.com>
17417 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17418 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17419 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17420 away part of the register's value.
17422 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17424 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17425 (linux_wait_for_event, linux_init_signals): Likewise.
17427 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17429 * configure.in: Check for stdlib.h.
17430 * configure: Regenerated.
17431 * config.in: Regenerated.
17433 2003-01-04 Andreas Schwab <schwab@suse.de>
17435 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17437 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17439 * Makefile.in: Remove obsolete code.
17441 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17443 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17444 defined(PT_FPR0_HI).
17446 2002-11-17 Stuart Hughes <seh@zee2.com>
17448 * linux-arm-low.c (arm_num_regs): Increase.
17449 (arm_regmap): Include status register.
17451 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17453 * linux-low.c (register_addr): Remove incorrect -1 check.
17455 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17457 * linux-low.c (linux_create_inferior): Call setpgid. Return
17459 (unstopped_p, linux_signal_pid): Remove.
17460 (linux_target_ops): Remove linux_signal_pid.
17461 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17462 global instead of target method.
17463 * target.h (struct target_ops): Remove signal_pid. Update comment
17464 for create_inferior.
17465 * server.c (signal_pid): New variable.
17466 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17467 gdbserver. Set the child to be the foreground process group.
17468 (attach_inferior): Set signal_pid.
17470 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17472 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17474 2002-08-20 Jim Blandy <jimb@redhat.com>
17476 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17479 2002-08-01 Andrew Cagney <cagney@redhat.com>
17481 * Makefile.in: Make chill references obsolete.
17483 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17485 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17486 * configure: Regenerate.
17487 * config.in: Regenerate.
17489 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17491 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17492 (perror_with_name, remote_close, remote_open, expect, play): Static.
17494 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17496 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17497 byte offsets instead of an array of indexes.
17498 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17500 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17502 * regcache.c: Add comment.
17504 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17506 * thread-db.c: New file.
17507 * proc-service.c: New file.
17508 * acinclude.m4: New file.
17509 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17510 proc-service.o, and thread-db.o.
17511 (linux-low.o): Add USE_THREAD_DB.
17512 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17513 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17514 * aclocal.m4: Regenerated.
17515 * config.in: Regenerated.
17516 * configure: Regenerated.
17517 * configure.in: Check for proc_service.h, sys/procfs.h,
17518 thread_db.h, and linux/elf.h headrs.
17519 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17520 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17521 Check for -lthread_db and thread support.
17522 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17523 PowerPC, and SuperH.
17524 * i387-fp.c: Constify arguments.
17525 * i387-fp.h: Likewise.
17526 * inferiors.c: (struct thread_info): Renamed from
17527 `struct inferior_info'. Remove PID member. Use generic inferior
17528 list header. All uses updated.
17529 (inferiors, signal_pid): Removed.
17530 (all_threads): New variable.
17531 (get_thread): Define.
17532 (add_inferior_to_list): New function.
17533 (for_each_inferior): New function.
17534 (change_inferior_id): New function.
17535 (add_inferior): Removed.
17536 (remove_inferior): New function.
17537 (add_thread): New function.
17538 (free_one_thread): New function.
17539 (remove_thread): New function.
17540 (clear_inferiors): Use for_each_inferior and free_one_thread.
17541 (find_inferior): New function.
17542 (find_inferior_id): New function.
17543 (inferior_target_data): Update argument type.
17544 (set_inferior_target_data): Likewise.
17545 (inferior_regcache_data): Likewise.
17546 (set_inferior_regcache_data): Likewise.
17547 * linux-low.c (linux_bp_reinsert): Remove.
17548 (all_processes, stopping_threads, using_thrads)
17549 (struct pending_signals, debug_threads, pid_of): New.
17550 (inferior_pid): Replace with macro.
17551 (struct inferior_linux_data): Remove.
17552 (get_stop_pc, add_process): New functions.
17553 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17554 Use add_process and add_thread.
17555 (linux_attach_lwp): New function, based on old linux_attach. Use
17556 add_process and add_thread. Set stop_expected for new threads.
17557 (linux_attach): New function.
17558 (linux_kill_one_process): New function.
17559 (linux_kill): Kill all LWPs.
17560 (linux_thread_alive): Use find_inferior_id.
17561 (check_removed_breakpoints, status_pending_p): New functions.
17562 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17563 Update. Use WNOHANG. Wait for cloned processes also. Update process
17564 struct for the found process.
17565 (linux_wait_for_event): New function.
17566 (linux_wait): Use it. Support LWPs.
17567 (send_sigstop, wait_for_sigstop, stop_all_processes)
17568 (linux_resume_one_process, linux_continue_one_process): New functions.
17569 (linux_resume): Support LWPs.
17570 (REGISTER_RAW_SIZE): Remove.
17571 (fetch_register): Use register_size instead. Call supply_register.
17572 (usr_store_inferior_registers): Likewise. Call collect_register.
17573 Fix recursive case.
17574 (regsets_fetch_inferior_registers): Improve error message.
17575 (regsets_store_inferior_registers): Add debugging.
17576 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17577 (unstopped_p, linux_signal_pid): New functions.
17578 (linux_target_ops): Add linux_signal_pid.
17579 (linux_init_signals): New function.
17580 (initialize_low): Call it. Initialize using_threads.
17581 * regcache.c (inferior_regcache_data): Add valid
17583 (get_regcache): Fetch registers lazily. Add fetch argument
17584 and update all callers.
17585 (regcache_invalidate_one, regcache_invalidate): New
17587 (new_register_cache): Renamed from create_register_cache.
17588 Return the new regcache.
17589 (free_register_cache): Change argument to a void *.
17590 (registers_to_string, registers_from_string): Call get_regcache
17591 with fetch flag set.
17592 (register_data): Make static. Pass fetch flag to get_regcache.
17593 (supply_register): Call get_regcache with fetch flag clear.
17594 (collect_register): Call get_regcache with fetch flag set.
17595 (collect_register_as_string): New function.
17596 * regcache.h: Update.
17597 * remote-utils.c (putpkt): Flush after debug output and use
17599 Handle input interrupts while waiting for an ACK.
17600 (input_interrupt): Use signal_pid method.
17601 (getpkt): Flush after debug output and use stderr.
17602 (outreg): Use collect_register_as_string.
17603 (new_thread_notify, dead_thread_notify): New functions.
17604 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17605 and general_thread.
17606 (look_up_one_symbol): Flush after debug output.
17607 * server.c (step_thread, server_waiting): New variables.
17608 (start_inferior): Don't use signal_pid. Update call to mywait.
17609 (attach_inferior): Update call to mywait.
17610 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17611 (main): Don't fetch/store registers explicitly. Use
17612 set_desired_inferior. Support proposed ``Hs'' packet. Update
17614 * server.h: Update.
17615 (struct inferior_list, struct_inferior_list_entry): New.
17616 * target.c (set_desired_inferior): New.
17617 (write_inferior_memory): Constify.
17618 (mywait): New function.
17619 * target.h: Update.
17620 (struct target_ops): New signal_pid method.
17621 (mywait): Removed macro, added prototype.
17623 * linux-low.h (regset_func): Removed.
17624 (regset_fill_func, regset_store_func): New.
17625 (enum regset_type): New.
17626 (struct regset_info): Add type field. Use new operation types.
17627 (struct linux_target_ops): stop_pc renamed to get_pc.
17628 Add decr_pc_after_break and breakpoint_at.
17629 (get_process, get_thread_proess, get_process_thread)
17630 (strut process_info, all_processes, linux_attach_lwp)
17631 (thread_db_init): New.
17633 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17634 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17635 (the_low_target): Add new members.
17636 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17637 (i386_store_fpxregset): Constify.
17638 (target_regsets): Add new kind identifier.
17639 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17640 (i386_set_pc): Add debugging.
17641 (i386_breakpoint_at): New function.
17642 (the_low_target): Add new members.
17643 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17644 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17645 (mips_breakpoint_at): New.
17646 (the_low_target): Add new members.
17647 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17648 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17649 (the_low_target): Add new members.
17650 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17651 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17652 (the_low_target): Add new members.
17653 * linux-x86-64-low.c (target_regsets): Add new kind
17656 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17658 From Martin Pool <mbp@samba.org>:
17659 * server.c (gdbserver_usage): New function.
17662 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17664 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17665 stop_at -> stop_pc.
17667 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17669 * Makefile.in: Remove obsolete code.
17671 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17673 * linux-low.c (regsets_fetch_inferior_registers),
17674 (regsets_store_inferior_registers): Removed cast to int from
17676 * regcache.h: Added declaration of struct inferior_info.
17678 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17680 * inferiors.c (struct inferior_info): Add regcache_data.
17681 (add_inferior): Call create_register_cache.
17682 (clear_inferiors): Call free_register_cache.
17683 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17684 * regcache.c (struct inferior_regcache_data): New.
17685 (registers): Remove.
17686 (get_regcache): New function.
17687 (create_register_cache, free_register_cache): New functions.
17688 (set_register_cache): Don't initialize the register cache here.
17689 (registers_to_string, registers_from_string, register_data): Call
17691 * regcache.h: Add prototypes.
17692 * server.h: Likewise.
17694 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17696 * mem-break.c: New file.
17697 * mem-break.h: New file.
17698 * Makefile.in: Add mem-break.o rule; update server.h
17700 * inferiors.c (struct inferior_info): Add target_data
17702 (clear_inferiors): Free target_data member if set.
17703 (inferior_target_data, set_inferior_target_data): New functions.
17704 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17705 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17706 * linux-low.c (linux_bp_reinsert): New variable.
17707 (struct inferior_linux_data): New.
17708 (linux_create_inferior): Use set_inferior_target_data.
17709 (linux_attach): Likewise. Call add_inferior.
17710 (linux_wait_for_one_inferior): New function.
17711 (linux_wait): Call it.
17712 (linux_write_memory): Add const.
17713 (initialize_low): Call set_breakpoint_data.
17714 * linux-low.h (struct linux_target_ops): Add breakpoint
17716 * server.c (attach_inferior): Remove extra add_inferior
17718 * server.h: Include mem-break.h. Update inferior.c
17720 * target.c (read_inferior_memory)
17721 (write_inferior_memory): New functions.
17722 * target.h (read_inferior_memory)
17723 (write_inferior_memory): Change macros to prototypes.
17724 (struct target_ops): Update comments. Add const to write_memory
17727 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17729 * linux-low.c (usr_store_inferior_registers): Support
17730 registers which are allowed to fail to store.
17731 * linux-low.h (linux_target_ops): Likewise.
17732 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17733 (ppc_cannot_store_register): FPSCR may not be storable.
17735 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17737 * server.h: Include <string.h> if HAVE_STRING_H.
17738 * ChangeLog: Correct paths in last ChangeLog entry.
17740 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17742 * linux-low.h: Remove obsolete prototypes.
17743 (struct linux_target_ops): New.
17744 (extern the_low_target): New.
17745 * linux-low.c (num_regs, regmap): Remove declarations.
17746 (register_addr): Use the_low_target explicitly.
17747 (fetch_register): Likewise.
17748 (usr_fetch_inferior_registers): Likewise.
17749 (usr_store_inferior_registers): Likewise.
17750 * linux-arm-low.c (num_regs): Remove.
17751 (arm_num_regs): Define.
17752 (arm_regmap): Renamed from regmap, made static.
17753 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17755 (arm_cannot_store_register): Renamed from cannot_store_register,
17757 (the_low_target): New.
17758 * linux-i386-low.c (num_regs): Remove.
17759 (i386_num_regs): Define.
17760 (i386_regmap): Renamed from regmap, made static.
17761 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17763 (i386_cannot_store_register): Renamed from cannot_store_register,
17765 (the_low_target): New.
17766 * linux-ia64-low.c (num_regs): Remove.
17767 (ia64_num_regs): Define.
17768 (ia64_regmap): Renamed from regmap, made static.
17769 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17771 (ia64_cannot_store_register): Renamed from cannot_store_register,
17773 (the_low_target): New.
17774 * linux-m68k-low.c (num_regs): Remove.
17775 (m68k_num_regs): Define.
17776 (m68k_regmap): Renamed from regmap, made static.
17777 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17779 (m68k_cannot_store_register): Renamed from cannot_store_register,
17781 (the_low_target): New.
17782 * linux-mips-low.c (num_regs): Remove.
17783 (mips_num_regs): Define.
17784 (mips_regmap): Renamed from regmap, made static.
17785 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17787 (mips_cannot_store_register): Renamed from cannot_store_register,
17789 (the_low_target): New.
17790 * linux-ppc-low.c (num_regs): Remove.
17791 (ppc_num_regs): Define.
17792 (ppc_regmap): Renamed from regmap, made static.
17793 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17795 (ppc_cannot_store_register): Renamed from cannot_store_register,
17797 (the_low_target): New.
17798 * linux-s390-low.c (num_regs): Remove.
17799 (s390_num_regs): Define.
17800 (s390_regmap): Renamed from regmap, made static.
17801 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17803 (s390_cannot_store_register): Renamed from cannot_store_register,
17805 (the_low_target): New.
17806 * linux-sh-low.c (num_regs): Remove.
17807 (sh_num_regs): Define.
17808 (sh_regmap): Renamed from regmap, made static.
17809 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17811 (sh_cannot_store_register): Renamed from cannot_store_register,
17813 (the_low_target): New.
17814 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17815 (the_low_target): New.
17817 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17819 * Makefile.in: Add stamp-h target.
17820 * configure.in: Create stamp-h.
17821 * configure: Regenerated.
17823 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17825 * inferiors.c: New file.
17826 * target.c: New file.
17827 * target.h: New file.
17828 * Makefile.in: Add target.o and inferiors.o. Update
17830 * linux-low.c (inferior_pid): New static variable,
17831 moved from server.c.
17832 (linux_create_inferior): Renamed from create_inferior.
17833 Call add_inferior. Return 0 on success instead of a PID.
17834 (linux_attach): Renamed from myattach.
17835 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17836 (linux_thread_alive): Renamed from mythread_alive.
17837 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17839 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17840 (regsets_store_inferior_registers): Correct error message.
17841 Add missing ``return 0''.
17842 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17843 (linux_store_registers): Renamed from store_inferior_registers.
17844 (linux_read_memory): Renamed from read_inferior_memory.
17845 (linux_write_memory): Renamed from write_inferior_memory.
17846 (linux_target_ops): New structure.
17847 (initialize_low): Call set_target_ops ().
17848 * remote-utils.c (unhexify): New function.
17849 (hexify): New function.
17850 (input_interrupt): Send signals to ``signal_pid''.
17851 * server.c (inferior_pid): Remove.
17852 (start_inferior): Update create_inferior call.
17853 (attach_inferior): Call add_inferior.
17854 (handle_query): New function.
17855 (main): Call handle_query for `q' packets.
17856 * server.h: Include "target.h". Remove obsolete prototypes.
17857 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17859 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17861 * Makefile.in: Add WARN_CFLAGS. Update configury
17863 * configure.in: Check for <string.h>
17864 * configure: Regenerate.
17865 * config.in: Regenerate.
17866 * gdbreplay.c: Include needed system headers.
17867 (remote_open): Remove strchr prototype.
17868 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17869 * regcache.c (supply_register): Change buf argument to const void *.
17870 (supply_register_by_name): Likewise.
17871 (collect_register): Change buf argument to void *.
17872 (collect_register_by_name): Likewise.
17873 * regcache.h: Add missing prototypes.
17874 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17875 * server.c (handle_query): New function.
17876 (attached): New static variable, moved out of main.
17877 (main): Quiet longjmp clobber warnings.
17878 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17879 * utils.c (error): Remove NORETURN.