1 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
3 * configure: Regenerate.
5 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
6 Andrew Burgess <andrew.burgess@embecosm.com>
8 * linux-riscv-low.cc: New file.
9 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
10 and nat/riscv-linux-tdesc.c.
11 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
12 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
15 2020-02-14 Tom Tromey <tom@tromey.com>
17 * acinclude.m4: Don't include acx_configure_dir.m4.
18 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
19 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
20 (all, install-only, uninstall, clean-info, clean)
21 (maintainer-clean): Don't recurse.
22 (subdir_do, all-lib): Remove.
23 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
25 (generated_files): Update.
26 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
28 * configure.ac: Don't configure gnulib or libiberty.
31 2020-02-14 Eli Zaretskii <eliz@gnu.org>
33 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
34 preparing the command line for CreateProcess.
35 (win32_create_inferior): Reflect the program name in debugging
36 output that shows the process and its command line.
38 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
40 * Makefile.in: Rename source files from .c to .cc.
41 * %.c: Rename to %.cc.
42 * configure.ac: Rename server.c to server.cc.
43 * configure: Re-generate.
45 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
47 * Makefile.in: Rename gdbsupport source files from .c to .cc.
49 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
51 * win32-low.c (win32_create_inferior): Set signal_pid.
53 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
54 Pedro Alves <palves@redhat.com>
56 Skip building gdbserver in a cross-configuration.
57 * configure.srv: Set $gdbserver_host depending on whether $target
58 is $host. Use $gdbserver_host instead of $host.
60 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
62 * configure: Re-generate.
64 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
66 * configure: Re-generate.
68 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
70 * acinclude.m4: Update warning.m4 path.
72 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
74 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
75 (handle_exception): Set siginfo_er.
76 (win32_xfer_siginfo): New function.
78 2020-02-07 Tom Tromey <tom@tromey.com>
79 Pedro Alves <palves@redhat.com>
81 * README: Update build documentation.
82 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
84 * configure.ac: Update paths.
86 * acinclude.m4: Update paths.
87 * Makefile.in: Update include paths.
88 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
89 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
90 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
91 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
92 (%-generated.c): Update paths.
93 * Move entire directory from ../gdb/gdbserver.
95 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
97 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
99 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
101 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
102 assignment instead of srv_linux_obj.
104 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
106 * server.c (handle_qxfer_libraries): Write segment-address with
109 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
111 * Makefile.in (install-strip): New target.
112 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
113 * aclocal.m4: Regenerate.
114 * configure: Regenerate.
115 * configure.ac: Add AM_PROG_INSTALL_STRIP.
117 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
119 * Makefile.in (SFILES): Adjust paths to point to real files.
120 (OBS): Move waitstatus.o to target/waitstatus.o.
121 (TAGS): Transform paths appropriately.
123 (nat/%.o): ... this pattern rule.
125 (target/%.o): ... this pattern rule.
126 * configure.srv: Adjust paths throughout to include nat/ prefix
127 with the revant files.
128 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
129 * configure: Regenerate.
131 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
133 * Makefile.in (TAGS): Remove config files from the recipe.
135 2020-01-14 Tom Tromey <tom@tromey.com>
137 * configure: Rebuild.
138 * configure.ac: Remove any checks that were added to common.m4.
139 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
142 2020-01-14 Tom Tromey <tom@tromey.com>
144 * server.h: Include config.h.
145 * gdbreplay.c: Include config.h.
146 * configure: Rebuild.
147 * configure.ac: Don't source common.host.
148 * acinclude.m4: Update path.
149 * Makefile.in (INCSUPPORT): New variable.
150 (INCLUDE_CFLAGS): Add INCSUPPORT.
151 (SFILES): Update paths.
152 (version-generated.c): Update path to create-version.sh.
153 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
155 2020-01-14 Tom Tromey <tom@tromey.com>
157 * configure.ac (LIBS): Use WIN32APILIBS.
158 (USE_WIN32API): Don't define.
159 * configure: Rebuild.
161 2020-01-14 Tom Tromey <tom@tromey.com>
163 * configure: Rebuild.
165 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
167 * Makefile.in (%-generated.c): Remove rule for files from
170 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
172 * configure: Re-generate.
174 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
176 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
178 * tracepoint.c (stop_tracing, flush_trace_buffer,
179 about_to_request_buffer_space, get_trace_state_variable_value,
180 set_trace_state_variable_value, gdb_collect): Add declaration.
182 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
184 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
185 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
186 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
187 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
188 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
191 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
193 * inferiors.c: Include gdbsupport/common-inferior.h.
195 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
197 * hostio-errno.c: Include hostio.h.
199 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
201 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
204 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
206 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
207 * linux-arm-tdesc.h: Include arch/arm.h.
209 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
211 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
213 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
215 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
216 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
218 2020-01-10 Pedro Alves <palves@redhat.com>
220 * fork-child.c (post_fork_inferior): Pass target down to
222 * inferiors.c (switch_to_thread): Add process_stratum_target
224 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
225 * nto-low.c (nto_target_ops): Now a process_stratum_target.
226 * linux-low.c (linux_target_ops): Now a process_stratum_target.
227 * remote-utils.c (prepare_resume_reply): Pass the target to
229 * target.c (the_target): Now a process_stratum_target.
230 (done_accessing_memory): Pass the target to switch_to_thread.
231 (set_target_ops): Ajust to use process_stratum_target.
232 * target.h (struct target_ops): Rename to ...
233 (struct process_stratum_target): ... this.
234 (the_target, set_target_ops): Adjust.
235 (prepare_to_access_memory): Adjust comment.
236 * win32-low.c (child_xfer_memory): Adjust to use
237 process_stratum_target.
238 (win32_target_ops): Now a process_stratum_target.
240 2020-01-06 Eli Zaretskii <eliz@gnu.org>
241 Pedro Alves <palves@redhat.com>
243 * win32-low.c (get_child_debug_event): Extract the fatal exception
244 from the exit status and convert to the equivalent Posix signal
246 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
247 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
249 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
251 * Makefile.in: Use INSTALL_PROGRAM_ENV.
253 2020-01-01 Joel Brobecker <brobecker@adacore.com>
255 * server.c (gdbserver_version): Change copyright year to 2020.
256 * gdbreplay.c (gdbreplay_version): Likewise.
258 2019-12-19 Christian Biesinger <cbiesinger@google.com>
260 * configure: Regenerate.
261 * configure.ac: Quote variable arguments of test.
263 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
265 * Makefile.in: Fix build with GNU Make 3.81
267 2019-12-16 Tom Tromey <tromey@adacore.com>
269 * server.c (get_exec_file): Constify result.
271 2019-12-10 Christian Biesinger <cbiesinger@google.com>
273 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
274 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
275 * config.in: Regenerate.
276 * configure: Regenerate.
277 * configure.ac: Don't check for strerror.
278 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
279 Call safe_strerror instead of strerror.
280 * server.h (strerror): Remove this now-unnecessary declaration.
281 * tracepoint.c (init_named_socket): Call safe_strerror instead of
283 (gdb_agent_helper_thread): Likewise.
284 * utils.c (perror_with_name): Likewise.
286 2019-11-26 Tom Tromey <tom@tromey.com>
288 * configure, config.in: Rebuild.
290 2019-11-26 Tom Tromey <tom@tromey.com>
292 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
293 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
295 * configure, config.in: Rebuild.
297 2019-11-26 Tom Tromey <tom@tromey.com>
299 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
300 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
301 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
302 * acinclude.m4: Include ax_pthread.m4.
303 * config.in, configure: Rebuild.
305 2019-11-26 Christian Biesinger <cbiesinger@google.com>
307 * debug.c (debug_set_output): Call safe_strerror instead of
309 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
310 (linux_kill_one_lwp): Likewise.
311 (linux_detach_one_lwp): Likewise.
312 (linux_wait_for_event_filtered): Likewise.
313 (store_register): Likewise.
314 * lynx-low.c (lynx_attach): Likewise.
315 * mem-break.c (insert_memory_breakpoint): Likewise.
316 (remove_memory_breakpoint): Likewise.
317 (delete_fast_tracepoint_jump): Likewise.
318 (set_fast_tracepoint_jump): Likewise.
319 (uninsert_fast_tracepoint_jumps_at): Likewise.
320 (reinsert_fast_tracepoint_jumps_at): Likewise.
321 * nto-low.c (nto_xfer_memory): Likewise.
322 (nto_resume): Likewise.
324 2019-11-20 Luis Machado <luis.machado@linaro.org>
326 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
327 instead of register count.
328 * tdesc.c (tdesc_contains_feature): New function.
329 * tdesc.h (tdesc_contains_feature): New prototype.
331 2019-11-15 Christian Biesinger <cbiesinger@google.com>
333 * Makefile.in: Add safe-strerror.c.
334 * configure: Regenerate.
335 * configure.ac: Don't source common.host.
337 2019-11-15 Christian Biesinger <cbiesinger@google.com>
339 * config.in: Regenerate.
340 * configure: Regenerate.
342 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
344 * ax.c (ax_printf): Handle size_t_arg.
346 2019-11-06 Christian Biesinger <cbiesinger@google.com>
348 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
349 * mi/mi-main.c (output_cores): Likewise.
350 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
351 (linux_xfer_osdata_modules): Likewise.
352 * remote.c (register_remote_support_xml): Likewise.
353 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
354 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
356 2019-11-01 Christian Biesinger <cbiesinger@google.com>
358 * configure: Regenerate.
359 * configure.ac: Remove check for strerror_r.
361 2019-10-31 Christian Biesinger <cbiesinger@google.com>
363 * config.in: Regenerate.
364 * configure: Regenerate.
365 * configure.ac: Also check for strerror_r.
367 2019-10-31 Christian Biesinger <cbiesinger@google.com>
369 * ax.h (debug_agent): Remove duplicate declaration.
371 2019-10-26 Tom de Vries <tdevries@suse.de>
373 * linux-aarch64-low.c: Fix typos in comments.
374 * linux-arm-low.c: Same.
376 * linux-ppc-low.c: Same.
377 * proc-service.c: Same.
380 * tracepoint.c: Same.
383 2019-10-25 Tom Tromey <tromey@adacore.com>
385 * utils.c (xstrdup): Remove.
387 2019-10-23 Tom Tromey <tom@tromey.com>
389 * configure, config.in: Rebuild.
391 2019-10-23 Tom Tromey <tom@tromey.com>
393 * configure: Rebuild.
394 * acinclude.m4: Use m4_include, not sinclude.
396 2019-10-17 Tom Tromey <tromey@adacore.com>
398 * configure: Rebuild.
399 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
400 in AC_CONFIG_FILES invocation.
401 * Makefile.in (stamp-h, Makefile): Use new-style config.status
404 2019-10-16 Christian Biesinger <cbiesinger@google.com>
406 * server.c: Include xml-builtin.h.
407 (get_xml_features): Don't declare xml_builtins here.
409 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
411 * Makefile.in: Remove references to vec-ipa.o.
413 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
415 * Makefile.in: Remove references to vec.c.
417 2019-10-02 Christian Biesinger <cbiesinger@google.com>
419 * server.c (server_waiting): Change to bool.
420 (extended_protocol): Likewise.
421 (response_needed): Likewise.
422 (exit_requested): Likewise.
423 (run_once): Likewise.
424 (report_no_resumed): Likewise.
425 (non_stop): Likewise.
426 (disable_packet_vCont): Likewise.
427 (disable_packet_Tthread): Likewise.
428 (disable_packet_qC): Likewise.
429 (disable_packet_qfThreadInfo): Likewise.
430 (handle_general_set): Update.
431 (handle_detach): Update.
432 (handle_monitor_command): Update.
433 (handle_query): Update.
434 (captured_main): Update.
435 (process_serial_event): Update.
436 * server.h (server_waiting): Change to bool.
437 (disable_packet_vCont): Likewise.
438 (disable_packet_Tthread): Likewise.
439 (disable_packet_qC): Likewise.
440 (disable_packet_qfThreadInfo): Likewise.
441 (run_once): Likewise.
442 (non_stop): Likewise.
443 * target.c (target_stop_and_wait): Update.
445 2019-10-02 Tom Tromey <tromey@adacore.com>
447 * Makefile.in (SFILES): Add common-inferior.c.
448 (OBS): Add common-inferior.o.
449 * server.c (startup_with_shell): Don't define.
451 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
453 * linux-low.c (linux_low_read_btrace): Update for change to
456 2019-09-20 Christian Biesinger <cbiesinger@google.com>
458 * debug.c (debug_threads): Remove comment in favor of the header.
459 * debug.h (using_threads): Add declaration.
460 (debug_threads): Add comment.
461 * linux-aarch64-low.c: Include debug.h and remove declaration of
463 * nto-low.c: Likewise.
464 * remote-utils.c: Likewise.
465 * thread-db.c: Likewise.
467 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
469 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
470 and powerpc-cell64l-ipa.o.
471 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
472 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
473 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
476 * spu-low.c: Remove file.
478 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
479 (parse_spufs_run): Remove.
480 (ppc_get_pc): Remove Cell/B.E. support.
481 (ppc_set_pc): Likewise.
482 (ppc_breakpoint_at): Likewise.
483 (ppc_arch_setup): Likewise.
484 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
485 tdesc_powerpc_cell32l.
486 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
487 or init_registers_powerpc_cell32l.
488 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
489 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
490 or init_registers_powerpc_cell32l.
491 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
492 (init_registers_powerpc_cell32l): Remove prototype.
493 (init_registers_powerpc_cell64l): Likewise.
495 * target.h (struct target_ops): Remove qxfer_spu member.
496 * server.c (handle_qxfer_spu): Remove.
497 (qxfer_packets): Remove entry for "spu".
498 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
499 * linux-low.c (SPUFS_MAGIC): Remove.
500 (spu_enumerate_spu_ids): Remove.
501 (linux_qxfer_spu): Remove.
502 (linux_target_ops): Remove qxfer_spu member.
503 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
504 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
505 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
507 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
509 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
510 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
511 * config.in: Regenerate.
512 * configure: Regenerate.
514 2019-08-15 Tom Tromey <tromey@adacore.com>
516 * target.c (target_write_memory): Use gdb::byte_vector.
518 2019-08-15 Tom Tromey <tromey@adacore.com>
520 * tracepoint.c (write_inferior_data_pointer)
521 (write_inferior_integer, write_inferior_int8)
522 (write_inferior_uinteger, m_tracepoint_action_download)
523 (r_tracepoint_action_download, x_tracepoint_action_download)
524 (l_tracepoint_action_download, clear_inferior_trace_buffer)
525 (download_agent_expr, download_tracepoint_1)
526 (download_trace_state_variables, upload_fast_traceframes): Update.
527 * server.c (gdb_write_memory): Update.
528 * remote-utils.c (relocate_instruction): Update.
529 * proc-service.c (ps_pdwrite): Update.
530 * mem-break.c (remove_memory_breakpoint)
531 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
532 (uninsert_fast_tracepoint_jumps_at)
533 (reinsert_fast_tracepoint_jumps_at): Update.
534 * linux-x86-low.c (append_insns)
535 (i386_install_fast_tracepoint_jump_pad)
536 (amd64_write_goto_address, i386_write_goto_address): Update.
537 * linux-s390-low.c (append_insns, s390_write_goto_address):
539 * linux-ppc-low.c (ppc_relocate_instruction)
540 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
541 (ppc_write_goto_address): Update.
542 * linux-aarch64-low.c (append_insns): Update.
543 * target.h (struct target_ops): Update.
544 (write_inferior_memory): Don't declare.
545 * target.c (target_write_memory): Rename from
546 write_inferior_memory. Remove old target_write_memory.
548 2019-08-15 Tom Tromey <tromey@adacore.com>
550 * target.c (write_inferior_memory): Use std::vector.
552 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
555 * configure.ac: Drop enable-libmcheck support.
556 * configure, config.in: Rebuild.
557 * acinclude.m4: Don't include it.
559 2019-07-19 Alan Hayward <alan.hayward@arm.com>
561 * configure.srv: Remove Arm xml files.
563 2019-07-19 Alan Hayward <alan.hayward@arm.com>
565 * configure.srv: Add new files. Remove xml generated files.
566 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
568 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
569 * linux-aarch32-tdesc.c: New file.
570 * linux-aarch32-tdesc.h: New file.
571 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
572 * linux-arm-low.c (init_registers_arm, tdesc_arm)
573 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
574 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
575 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
576 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
577 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
578 (arm_read_description): Call arm_linux_read_description.
579 (initialize_low_arch): Don't init registers.
580 * linux-arm-tdesc.c: New file.
581 * linux-arm-tdesc.h: New file.
583 2019-07-10 Alan Hayward <alan.hayward@arm.com>
585 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
586 Move counter inside for.
587 (arm_read_description): Check ptrace earlier.
588 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
590 2019-07-09 Tom Tromey <tom@tromey.com>
592 * configure: Rebuild.
593 * configure.ac: Change common to gdbsupport.
594 * acinclude.m4: Change common to gdbsupport.
595 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
596 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
597 common to gdbsupport.
598 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
599 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
600 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
601 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
602 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
603 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
604 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
605 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
606 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
607 common to gdbsupport.
609 2019-07-04 Alan Hayward <alan.hayward@arm.com>
611 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
613 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
615 2019-07-04 Alan Hayward <alan.hayward@arm.com>
617 * configure.srv: Remove legacy xml.
618 * linux-aarch64-low.c (initialize_low_arch): Remove
619 initialize_low_tdesc call.
620 * linux-aarch64-tdesc-selftest.c: Remove file.
621 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
622 * linux-x86-low.c (initialize_low_arch): Remove
623 initialize_low_tdesc call.
624 * linux-x86-tdesc-selftest.c: Remove file.
625 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
627 2019-06-20 Tom de Vries <tdevries@suse.de>
629 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
630 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
632 2019-06-19 Tom de Vries <tdevries@suse.de>
634 * debug.h (debug_write): Change return type to ssize_t.
635 * debug.c (debug_write): Same.
637 2019-06-14 Tom Tromey <tom@tromey.com>
639 * configure.ac: Use new path to gnulib.
640 * configure: Rebuild.
641 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
644 2019-06-11 Tom Tromey <tom@tromey.com>
646 * Makefile.in (SFILES): Add alloc.c.
648 (IPA_OBJS): Add alloc-ipa.o.
649 (alloc-ipa.o): New target.
650 (%.o: ../%.c): New pattern rule.
652 2019-06-10 Tom Tromey <tromey@adacore.com>
654 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
655 end warning with a newline.
656 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
658 * thread-db.c (attach_thread): Don't end warning with a newline.
659 (thread_db_notice_clone): Likewise.
660 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
662 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
663 end warning with a newline.
665 2019-06-04 Pedro Alves <palves@redhat.com>
667 * server.c (captured_main): Use make_unique_xstrdup.
669 2019-06-02 Tom Tromey <tom@tromey.com>
671 * gdbreplay.c (fromhex): Remove.
672 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
674 2019-05-29 Tom Tromey <tromey@adacore.com>
676 * configure: Rebuild.
678 2019-05-06 Kevin Buettner <kevinb@redhat.com>
680 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
681 sign extension code on 32-bit builds.
683 2019-05-03 Eli Zaretskii <eliz@gnu.org>
686 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
688 2019-04-19 Tom Tromey <tom@tromey.com>
690 * server.c (struct vstop_notif): Derive from notif_event.
692 (queue_stop_reply): Update.
693 (remove_all_on_match_ptid): Change type. Rewrite.
694 (discard_queued_stop_replies): Rewrite.
695 (in_queued_stop_replies_ptid): Change type.
696 (in_queued_stop_replies): Rewrite.
697 (notif_stop): Update.
698 (queue_stop_reply_callback): Update.
699 (captured_main): Don't call initialize_notif.
700 (push_stop_notification): Update.
701 * notif.c (notif_write_event, handle_notif_ack)
702 (notif_event_enque, notif_push): Update.
703 (notif_event_xfree, initialize_notif): Remove.
704 * notif.h (struct notif_event): Include <list>, not
706 (struct notif_server) <queue>: Now a std::list.
707 (notif_event_p): Remove typedef.
708 (initialize_notif): Don't declare.
709 (struct notif_event): Add virtual destructor.
711 2019-04-17 Alan Hayward <alan.hayward@arm.com>
713 * ax.c (ax_vdebug): Call debug_printf.
714 * debug.c (debug_write): New function.
715 * debug.h (debug_write): New declaration.
716 * linux-low.c (sigchld_handler): Call debug_write.
718 2019-04-17 Alan Hayward <alan.hayward@arm.com>
720 * debug.c (debug_set_output): New function.
721 (debug_vprintf): Send output to debug_file.
722 (debug_flush): Likewise.
723 * debug.h (debug_set_output): New declaration.
724 * server.c (handle_monitor_command): Add debug-file option.
725 (captured_main): Likewise.
727 2019-04-17 Alan Hayward <alan.hayward@arm.com>
729 * debug.c (remote_debug): Add definition.
730 * debug.h (remote_debug): Add declaration.
731 * hostio.c (remote_debug): Remove declaration.
732 * remote-utils.c (struct ui_file): Likewise.
733 (remote_debug): Likewise.
734 * remote-utils.h (remote_debug): Likewise,
735 * server.c (remote_debug): Remove definition.
737 2019-04-10 Kevin Buettner <kevinb@redhat.com>
739 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
740 when using a 64-bit gdbserver.
742 2019-04-09 Tom Tromey <tromey@adacore.com>
744 * linux-low.c (select_event_lwp): Use find_thread_in_random.
746 2019-04-08 Tom Tromey <tom@tromey.com>
748 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
750 (linux_resume_one_lwp): Likewise.
752 2019-04-08 Tom Tromey <tom@tromey.com>
754 * gdbreplay.c: Update.
755 * linux-low.c: Update.
758 2019-04-08 Tom Tromey <tom@tromey.com>
760 * server.c: Use C++ exception handling.
761 * linux-low.c: Use C++ exception handling.
762 * gdbreplay.c: Use C++ exception handling.
764 2019-04-08 Tom Tromey <tom@tromey.com>
766 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
767 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
768 (captured_main, main): Update.
769 * gdbreplay.c (main): Update.
771 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
773 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
774 value in argument pointer, return 1 if the entry is found and 0
775 otherwise. Move comment.
776 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
777 * linux-low.h (linux_get_auxv): Declare.
778 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
780 2019-04-05 Tom Tromey <tromey@adacore.com>
782 * server.c (gdbserver_usage): Use upper-case for metasyntactic
785 2019-03-28 Alan Hayward <alan.hayward@arm.com>
787 * linux-low.c (AT_HWCAP2): Add define if not already included.
789 2019-03-26 Alan Hayward <alan.hayward@arm.com>
791 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
792 (aarch64_arch_setup): Call linux_get_hwcap.
793 * linux-arm-low.c (arm_get_hwcap): Remove function.
794 (arm_read_description): Call linux_get_hwcap.
795 * linux-low.c (linux_get_auxv): New function.
796 (linux_get_hwcap): Likewise.
797 (linux_get_hwcap2): Likewise.
798 * linux-low.h (linux_get_hwcap): New declaration.
799 (linux_get_hwcap2): Likewise.
800 * linux-ppc-low.c (ppc_get_auxv): Remove function.
801 (ppc_arch_setup): Call linux_get_hwcap.
802 * linux-s390-low.c (s390_get_hwcap): Remove function.
803 (s390_arch_setup): Call linux_get_hwcap.
805 2019-03-22 Alan Hayward <alan.hayward@arm.com>
806 Jiong Wang <jiong.wang@arm.com>
808 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
809 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
811 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
813 2019-03-22 Alan Hayward <alan.hayward@arm.com>
814 Jiong Wang <jiong.wang@arm.com>
816 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
817 (aarch64_get_hwcap): New function.
818 (aarch64_arch_setup): Read APIA hwcap.
820 2019-03-22 Alan Hayward <alan.hayward@arm.com>
821 Jiong Wang <jiong.wang@arm.com>
823 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
824 (initialize_low_tracepoint): Likewise.
825 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
826 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
827 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
828 (aarch64_linux_read_description): Likewise.
829 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
831 2019-03-12 John Baldwin <jhb@FreeBSD.org>
833 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
834 i386_create_target_description for 'segments' parameter.
835 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
836 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
837 * win32-i386-low.c (i386_arch_setup): Likewise.
839 2019-03-12 Tom Tromey <tromey@adacore.com>
841 * linux-low.c (iterate_over_lwps): Update.
843 2019-03-06 Tom Tromey <tom@tromey.com>
845 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
846 (captured_main): Use SCOPE_EXIT.
848 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
850 * configure.srv: Use '$enable_unittest' instead of '$development'
851 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
854 2019-02-27 Tom Tromey <tromey@adacore.com>
856 * gdbreplay.c (logchar): Handle \r\n.
858 2019-02-07 Alan Hayward <alan.hayward@arm.com>
860 * linux-low.c (linux_attach): Add process before lwp.
861 * server.c (attach_inferior): Check if already attached.
863 2019-02-07 Tom Tromey <tom@tromey.com>
865 * x86-tdesc.h: Rename include guard.
866 * x86-low.h: Add include guard.
867 * wincecompat.h: Rename include guard.
868 * win32-low.h: Add include guard.
869 * utils.h: Rename include guard.
870 * tracepoint.h: Rename include guard.
871 * tdesc.h: Rename include guard.
872 * target.h: Rename include guard.
873 * server.h: Rename include guard.
874 * remote-utils.h: Rename include guard.
875 * regcache.h: Rename include guard.
876 * nto-low.h: Rename include guard.
877 * notif.h: Add include guard.
878 * mem-break.h: Rename include guard.
879 * lynx-low.h: Add include guard.
880 * linux-x86-tdesc.h: Add include guard.
881 * linux-s390-tdesc.h: Add include guard.
882 * linux-ppc-tdesc-init.h: Add include guard.
883 * linux-low.h: Add include guard.
884 * linux-aarch64-tdesc.h: Add include guard.
885 * linux-aarch32-low.h: Add include guard.
886 * inferiors.h: Rename include guard.
887 * i387-fp.h: Rename include guard.
888 * hostio.h: Rename include guard.
889 * gdbthread.h: Rename include guard.
890 * gdb_proc_service.h: Rename include guard.
891 * event-loop.h: Rename include guard.
892 * dll.h: Rename include guard.
893 * debug.h: Rename include guard.
894 * ax.h: Rename include guard.
896 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
899 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
900 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
902 2019-01-25 Tom Tromey <tom@tromey.com>
904 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
906 2019-01-25 Tom Tromey <tom@tromey.com>
908 * win32-low.c: Fix common/ includes.
909 * win32-i386-low.c: Fix common/ includes.
910 * tracepoint.c: Fix common/ includes.
911 * thread-db.c: Fix common/ includes.
912 * target.h: Fix common/ includes.
913 * symbol.c: Fix common/ includes.
914 * spu-low.c: Fix common/ includes.
915 * server.h: Fix common/ includes.
916 * server.c: Fix common/ includes.
917 * remote-utils.c: Fix common/ includes.
918 * regcache.h: Fix common/ includes.
919 * regcache.c: Fix common/ includes.
920 * nto-x86-low.c: Fix common/ includes.
921 * notif.h: Fix common/ includes.
922 * mem-break.h: Fix common/ includes.
923 * lynx-low.c: Fix common/ includes.
924 * lynx-i386-low.c: Fix common/ includes.
925 * linux-x86-tdesc-selftest.c: Fix common/ includes.
926 * linux-x86-low.c: Fix common/ includes.
927 * linux-low.c: Fix common/ includes.
928 * inferiors.h: Fix common/ includes.
929 * i387-fp.c: Fix common/ includes.
930 * hostio.c: Fix common/ includes.
931 * hostio-errno.c: Fix common/ includes.
932 * gdbthread.h: Fix common/ includes.
933 * gdbreplay.c: Fix common/ includes.
934 * fork-child.c: Fix common/ includes.
935 * event-loop.c: Fix common/ includes.
937 (enum gdb_agent_op): Fix common/ includes.
939 2019-01-21 Tom Tromey <tom@tromey.com>
941 * tracepoint.c: Fix includes.
942 * remote-utils.c: Fix includes.
943 * linux-x86-low.c: Fix includes.
945 2019-01-01 Joel Brobecker <brobecker@adacore.com>
947 * gdbreplay.c (gdbreplay_version): Update copyright year in
949 * server.c (gdbserver_version): Likewise.
951 2018-12-05 Alan Hayward <alan.hayward@arm.com>
953 * linux-low.c (add_lwp): Switch ordering.
955 2018-11-29 Tom Tromey <tom@tromey.com>
957 * win32-low.c (win32_join): Take pid, not process.
958 * target.h (struct target_ops) <join>: Change argument type.
959 (join_inferior): Change argument name.
960 * spu-low.c (spu_join): Take pid, not process.
961 * server.c (handle_detach): Preserve pid before destroying
963 * lynx-low.c (lynx_join): Take pid, not process.
964 * linux-low.c (linux_join): Take pid, not process.
966 2018-11-23 Alan Hayward <alan.hayward@arm.com>
968 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
969 (aarch64_cannot_fetch_register): Likewise.
970 (struct linux_target_ops): Update references.
972 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
974 * linux-ppc-low.c: Include nat/linux-ptrace.h.
976 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
978 * configure.srv (ipa_ppc_linux_regobj): Add
979 powerpc-isa207-htm-vsx32l-ipa.o and
980 powerpc-isa207-htm-vsx64l-ipa.o.
981 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
982 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
983 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
984 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
985 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
986 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
987 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
988 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
989 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
990 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
991 (init_registers_powerpc_isa207_htm_vsx32l)
992 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
993 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
994 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
995 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
996 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
997 (ppc_store_tm_ctarregset): New functions.
998 (ppc_regsets): Add entries for HTM regsets.
999 (ppc_arch_setup): Set htm in features struct when needed. Set
1000 sizes for the HTM regsets.
1001 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1002 (initialize_low_arch): Call
1003 init_registers_powerpc_isa207_htm_vsx32l and
1004 init_registers_powerpc_isa207_htm_vsx64l.
1005 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1006 PPC_TDESC_ISA207_HTM_VSX.
1007 (initialize_low_tracepoint): Call
1008 init_registers_powerpc_isa207_htm_vsx32l and
1009 init_registers_powerpc_isa207_htm_vsx64l.
1011 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1013 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1014 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1015 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1016 (ppc_store_pmuregset): New functions.
1017 (ppc_regsets): Add entries for ebb and pmu regsets.
1018 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1019 pmu regsets are available. Set sizes for these regsets.
1021 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1023 * configure.srv (ipa_ppc_linux_regobj): Add
1024 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1025 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1026 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1027 rs6000/powerpc-isa207-vsx32l.xml, and
1028 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1029 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1030 <PPC_TDESC_ISA207_VSX>: New enum value.
1031 (init_registers_powerpc_isa207_vsx32l): Declare.
1032 (init_registers_powerpc_isa207_vsx64l): Declare.
1033 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1034 (ppc_store_tarregset): New function.
1035 (ppc_regsets): Add entry for the TAR regset.
1036 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1037 size for the TAR regsets.
1038 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1039 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1040 and init_registers_powerpc_isa207_vsx64l.
1041 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1042 (initialize_low_tracepoint): Call
1043 init_registers_powerpc_isa207_vsx32l and
1044 init_registers_powerpc_isa207_vsx64l.
1046 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1047 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1049 * configure.srv (ipa_ppc_linux_regobj): Add
1050 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1051 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1052 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1053 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1054 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1055 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1056 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1057 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1058 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1059 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1060 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1061 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1062 (ppc_hwcap): Add comment.
1063 (ppc_hwcap2): New global.
1064 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1065 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1066 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1067 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1068 when needed. Set sizes for the the DSCR and PPR regsets.
1069 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1070 (initialize_low_arch): Call
1071 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1072 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1073 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1074 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1075 (initialize_low_tracepoint): Call
1076 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1077 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1079 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1081 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1083 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1084 Simon Marchi <simark@simark.ca>
1086 * acinclude.m4: Include "../selftest.m4".
1087 * configure: Regenerate.
1088 * configure.ac: Use "GDB_AC_SELFTEST".
1089 * configure.srv: Use "$enable_unittests" instead of
1090 "$development" when checking whether unit tests have been
1092 * server.c (captured_main): Update message informing that
1093 selftests have been disabled.
1095 2018-10-04 Tom Tromey <tom@tromey.com>
1097 * configure: Rebuild.
1099 2018-10-04 Tom Tromey <tom@tromey.com>
1101 * server.c (handle_status): Rename inner "thread".
1102 (process_serial_event): Declare "res" in 'm' case.
1103 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1104 (iterate_over_lwps): Rename inner "thread".
1105 (linux_qxfer_libraries_svr4): Rename inner "len".
1106 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1108 2018-10-01 Gary Benson <gbenson@redhat.com>
1110 * gdb_proc_service.h: Moved common code to
1111 common/gdb_proc_service.h.
1113 2018-10-01 Gary Benson <gbenson@redhat.com>
1115 * gdb_proc_service.h: Synchronize comments and whitespace with
1116 GDB's version of this file.
1118 2018-09-25 Tom Tromey <tom@tromey.com>
1120 * configure: Rebuild.
1121 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1123 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1125 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1126 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1127 ($(IPA_LIB)): Sort IPA_OBJS.
1129 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1131 * Makefile.in: Remove references to $(ADD_DEPS).
1133 2018-09-16 Tom Tromey <tom@tromey.com>
1135 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1137 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1140 2018-09-05 Tom Tromey <tom@tromey.com>
1142 * configure: Rebuild.
1144 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1147 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1149 2018-08-27 Tom Tromey <tom@tromey.com>
1152 * configure: Rebuild.
1154 2018-08-27 Tom Tromey <tom@tromey.com>
1156 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1157 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1158 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1159 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1160 (s390x_emit_stack_adjust): Add casts to unsigned char.
1162 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1166 * server.h (struct client_state) <disable_randomization>:
1169 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1171 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1173 (mips_supply_ptrace_register): Likewise.
1175 2018-07-22 Tom Tromey <tom@tromey.com>
1177 * configure: Rebuild.
1179 2018-07-22 Tom Tromey <tom@tromey.com>
1181 * win32-low.c (win32_create_inferior): Remove unused variables.
1182 * gdbreplay.c (remote_open): Remove unused variable.
1183 * remote-utils.c (remote_prepare): Remove unused variable.
1184 * x86-tdesc.h (X86_TDESC_H): Define.
1185 (amd64_expedite_regs): Define conditionally.
1186 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1187 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1188 * remote-utils.c (readchar): Remove unused variable.
1190 2018-07-13 Pedro Alves <palves@redhat.com>
1192 * linux-low.c (linux_kill): Change parameter to process_info
1193 pointer instead of pid. Adjust.
1194 * lynx-low.c (lynx_kill): Likewise.
1195 * nto-low.c (nto_kill): Likewise.
1196 * spu-low.c (spu_kill): Likewise.
1197 * win32-low.c (win32_kill): Likewise.
1198 * server.c (handle_v_kill, kill_inferior_callback)
1199 (detach_or_kill_for_exit): Adjust.
1200 * target.c (kill_inferior): Change parameter to process_info
1201 pointer instead of pid. Adjust.
1202 * target.h (struct target_ops) <kill>: Change parameter to
1203 process_info pointer instead of pid. Adjust all implementations
1205 (kill_inferior): Likewise.
1207 2018-07-13 Pedro Alves <palves@redhat.com>
1209 * linux-low.c (linux_detach, linux_join): Change parameter to
1210 process_info pointer instead of pid. Adjust.
1211 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1212 * nto-low.c (nto_detach): Likewise.
1213 * spu-low.c (spu_detach, spu_join): Likewise.
1214 * win32-low.c (win32_detach, win32_join): Likewise.
1215 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1216 * target.h (struct target_ops) <detach, join>: Change parameter to
1217 process_info pointer instead of pid. Adjust all implementations
1219 (detach_inferior, join_inferior): Rename 'pid' parameter to
1222 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1223 Jan Kratochvil <jan.kratochvil@redhat.com>
1224 Paul Fertser <fercerpav@gmail.com>
1225 Tsutomu Seki <sekiriki@gmail.com>
1227 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1228 (OBS): Add 'common/netstuff.o'.
1229 (GDBREPLAY_OBS): Likewise.
1230 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1231 (remote_open): Implement support for IPv6
1233 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1235 (handle_accept_event): Accept connections from IPv6 sources.
1236 (remote_prepare): Handle IPv6-style hostnames; implement
1237 support for IPv6 connections.
1238 (remote_open): Implement support for printing connections from
1241 2018-07-11 Pedro Alves <palves@redhat.com>
1244 * mem-break.c (any_persistent_commands): Add process_info
1245 parameter and use it instead of relying on the current process.
1246 Change return type to bool.
1247 * mem-break.h (any_persistent_commands): Add process_info
1248 parameter and change return type to bool.
1249 * server.c (handle_detach): Remove require_running_or_return call.
1250 Look up the process_info for the process we're about to detach.
1251 If not found, return back error to GDB. Adjust
1252 any_persistent_commands call to pass down a process pointer.
1254 2018-07-11 Pedro Alves <palves@redhat.com>
1256 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1257 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1258 instead of collect_register_by_name.
1259 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1260 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1262 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1263 Pedro Alves <palves@redhat.com>
1265 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1267 2018-07-03 Tom Tromey <tom@tromey.com>
1269 * linux-low.c: Update.
1270 * lynx-low.c: Update.
1271 * mem-break.c: Update.
1272 * nto-low.c: Update.
1273 * remote-utils.c: Update.
1275 * spu-low.c: Update.
1277 * win32-low.c: Update.
1279 2018-07-03 Tom Tromey <tom@tromey.com>
1283 2018-07-03 Tom Tromey <tom@tromey.com>
1285 * linux-low.c: Update.
1287 2018-07-03 Tom Tromey <tom@tromey.com>
1291 2018-07-03 Tom Tromey <tom@tromey.com>
1293 * linux-low.c: Update.
1294 * linux-mips-low.c: Update.
1295 * lynx-low.c: Update.
1296 * nto-low.c: Update.
1297 * remote-utils.c: Update.
1299 * spu-low.c: Update.
1301 * thread-db.c: Update.
1303 2018-07-03 Tom Tromey <tom@tromey.com>
1305 * linux-low.c: Update.
1306 * linux-mips-low.c: Update.
1307 * lynx-low.c: Update.
1308 * mem-break.c: Update.
1309 * nto-low.c: Update.
1310 * remote-utils.c: Update.
1312 * spu-low.c: Update.
1314 * tracepoint.c: Update.
1316 2018-07-03 Tom Tromey <tom@tromey.com>
1318 * linux-low.c: Update.
1319 * linux-ppc-low.c: Update.
1320 * linux-x86-low.c: Update.
1321 * proc-service.c: Update.
1323 * spu-low.c: Update.
1324 * thread-db.c: Update.
1325 * win32-low.c: Update.
1327 2018-07-03 Tom Tromey <tom@tromey.com>
1329 * linux-low.c: Update.
1330 * lynx-low.c: Update.
1331 * nto-low.c: Update.
1332 * remote-utils.c: Update.
1333 * spu-low.c: Update.
1334 * thread-db.c: Update.
1335 * win32-low.c: Update.
1337 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1339 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1340 parameter in call to 'amd64_create_target_description'.
1342 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1344 * x86-tdesc.h: Remove executable permission flag.
1346 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1348 * configure.ac: Remove AC_PREREQ, add missing quoting.
1349 * configure: Re-generate.
1350 * config.in: Re-generate.
1351 * aclocal.m4: Re-generate.
1353 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1355 * tracepoint.h (current_traceframe): Remove declaration.
1357 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1359 * linux-aarch64-low.c (is_sve_tdesc): New function.
1360 (aarch64_sve_regs_copy_to_regcache): Likewise.
1361 (aarch64_sve_regs_copy_from_regcache): Likewise.
1362 (aarch64_regs_info): Add SVE checks.
1363 (initialize_low_arch): Initialize SVE.
1365 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1367 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1369 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1371 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1372 (initialize_low_tracepoint): Likewise
1373 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1374 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1376 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1378 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1380 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1382 * server.h (PBUFSIZ): Increase size
1384 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1386 * regcache.c (regcache::raw_compare): New function.
1387 * regcache.h (regcache::raw_compare): New declaration.
1389 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1391 * regcache.c (new_register_cache): Use new.
1392 (free_register_cache): Use delete.
1393 (register_data): Use const.
1394 (supply_register): Move body inside regcache.
1395 (regcache::raw_supply): New override function.
1396 (collect_register): Move body inside regcache.
1397 (regcache::raw_collect): New override function.
1398 (regcache::get_register_status): New override function.
1399 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1401 2018-06-09 Tom Tromey <tom@tromey.com>
1403 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1405 (event_queue): Use std::queue.
1406 (gdb_event_xfree): Remove.
1407 (initialize_event_loop, process_event, wait_for_event): Update.
1409 2018-06-08 Stan Cox <scox@redhat.com>
1411 * win32-low.c (win32_create_inferior): last_ptid and last_status
1412 moved to client_state.
1414 2018-06-08 Pedro Alves <palves@redhat.com>
1416 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1417 common/common-exceptions.o, common/common-utils.o,
1418 common/errors.o, common/print-utils.o and utils.o.
1419 * gdbreplay.c: Include "common-defs.h" instead of the two
1420 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1421 string.h or alloca.h.
1422 (perror_with_name): Delete.
1423 (remote_open): Use xstrdup instead of strdup.
1424 (main): Rename to ...
1425 (captured_main): ... this.
1428 2018-06-08 Tom Tromey <tom@tromey.com>
1430 * linux-low.c (linux_low_read_btrace): Update.
1432 2018-06-04 Stan Cox <scox@redhat.com>
1434 * server.h (struct client_state): New.
1435 * server.c (cont_thread, general_thread, multi_process)
1436 (report_fork_events, report_vfork_events, report_exec_events)
1437 (report_thread_events, swbreak_feature, hwbreak_feature)
1438 (vCont_supported, disable_randomization, pass_signals)
1439 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1440 Moved to client_state.
1441 * remote-utils.c (remote_debug, noack_mode)
1442 (transport_is_reliable): Moved to client_state.
1443 * tracepoint.c (current_traceframe): Moved to client_state.
1446 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1447 linux-low.c, remote-utils.h, target.c: Use client_state.
1449 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1451 * configure.srv: Add new c/h file.
1453 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1455 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1458 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1460 * gdb.arch/mips-fpregset-core.exp: New test.
1461 * gdb.arch/mips-fpregset-core.c: New test source.
1463 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1466 * hostio.c (require_int): Do not report overflow for integers
1467 between 0xfffffff and 0x7fffffff.
1469 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1471 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1472 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1473 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1475 (the_low_target): Wire them.
1477 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1479 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1480 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1481 mode. Call collect_register_by_name with vscr using
1482 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1483 (ppc_store_vrregset): Add and set vscr_offset variable as in
1484 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1487 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1489 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1490 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1491 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1493 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1495 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1496 (ppc_store_vsxregset): Likewise.
1497 (ppc_fill_vrregset): Likewise.
1498 (ppc_store_vrregset): Likewise.
1499 (ppc_fill_evrregset): Likewise.
1500 (ppc_store_evrregset): Likewise.
1501 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1502 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1505 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1507 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1508 wordsize of the inferior. Call ppc_linux_target_wordsize.
1510 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1512 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1513 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1514 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1515 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1516 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1517 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1518 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1519 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1520 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1521 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1522 (tdesc_powerpc_e500l): Remove.
1523 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1524 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1525 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1526 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1528 (ppc_arch_setup): Remove target description matching code. Fill a
1529 ppc_linux_features struct and call ppc_linux_match_description
1532 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1534 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1535 width of the requested register exceeds the width of the
1537 (mips_cannot_store_register): Likewise.
1539 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1541 * linux-mips-low.c (mips_fetch_register): New function. Update
1543 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1544 (the_low_target): Wire `mips_fetch_register'.
1546 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1548 * lynx-i386-low.c (LYNXOS_178): New macro.
1549 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1550 the layout on LynxOS-178.
1551 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1552 handle floating point registers that are not supported by
1555 2018-05-10 Tom Tromey <tom@tromey.com>
1557 * configure: Rebuild.
1559 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1562 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1563 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1564 Use it to set the expedite_regs field in the given tdesc.
1565 * x86-tdesc.h: New file.
1566 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1567 Adjust following the addition of the new expedite_regs parameter
1568 to init_target_desc.
1569 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1570 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1571 (i386_linux_read_description, amd64_linux_read_description):
1572 Adjust following the addition of the new expedite_regs parameter
1573 to init_target_desc.
1574 * lynx-i386-low.c: #include "x86-tdesc.h".
1575 (lynx_i386_arch_setup): Adjust following the addition of the new
1576 expedite_regs parameter to init_target_desc.
1577 * nto-x86-low.c: #include "x86-tdesc.h".
1578 (nto_x86_arch_setup): Adjust following the addition of the new
1579 expedite_regs parameter to init_target_desc.
1580 * win32-i386-low.c: #include "x86-tdesc.h".
1581 (i386_arch_setup): Adjust following the addition of the new
1582 expedite_regs parameter to init_target_desc.
1584 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1587 * win32-low.c (win32_create_inferior): Add call to my_wait
1588 setting last_status global.
1590 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1593 * win32-low.c (create_process): Only call gdb_tilde_expand if
1594 inferior_cwd is not NULL.
1596 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1598 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1599 registers to the cache if their values have changed.
1600 (i387_xsave_to_cache): Provide default values for x87 control
1601 registers when these features are available, but disabled.
1602 * regcache.c (supply_register_by_name_zeroed): New function.
1603 * regcache.h (supply_register_by_name_zeroed): Declare new
1606 2018-05-07 Tom Tromey <tom@tromey.com>
1608 * configure: Rebuild.
1610 2018-05-04 Tom Tromey <tom@tromey.com>
1612 * configure: Rebuild.
1614 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1615 Pedro Alves <palves@redhat.com>
1617 * linux-aarch64-low.c (aarch64_stopped_data_address):
1620 2018-04-27 Tom Tromey <tom@tromey.com>
1622 * configure: Rebuild.
1624 2018-04-23 Tom Tromey <tom@tromey.com>
1626 * configure: Rebuild.
1628 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1630 * Makefile.in (depcomp): Add "..".
1631 (all_deps_files): New and use it.
1633 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1635 * configure.srv (aarch64*-*-linux*): Don't include xml.
1636 (i[34567]86-*-cygwin*): Likewise.
1637 (i[34567]86-*-linux*): Likewise.
1638 (i[34567]86-*-lynxos*): Likewise.
1639 (i[34567]86-*-mingw32ce*): Likewise.
1640 (i[34567]86-*-mingw*): Likewise.
1641 (i[34567]86-*-nto*): Likewise.
1642 (tic6x-*-uclinux): Likewise.
1643 (x86_64-*-linux*): Likewise.
1644 (x86_64-*-mingw*): Likewise.
1645 (x86_64-*-cygwin*): Likewise.
1647 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1649 * tdesc.c: Remove xml parameter.
1651 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1653 * server.c (get_features_xml): Remove cast.
1654 * tdesc.c (void target_desc::accept): Fill in function.
1655 (tdesc_get_features_xml): Remove old xml creation.
1656 (print_xml_feature::visit_pre): Add xml vistor.
1657 * tdesc.h (struct target_desc): Make xmltarget mutable.
1658 (tdesc_get_features_xml): Remove declaration.
1660 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1662 * tdesc.c (tdesc_architecture_name): Add new function.
1663 (tdesc_osabi_name): Likewise.
1664 (tdesc_get_features_xml): Use new functions.
1666 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1668 * tdesc.c (tdesc_create_flags): Remove.
1669 (tdesc_add_flag): Likewise.
1670 (tdesc_named_type): Likewise.
1671 (tdesc_create_union): Likewise.
1672 (tdesc_create_struct): Likewise.
1673 (tdesc_create_vector): Likewise.
1674 (tdesc_add_bitfield): Likewise.
1675 (tdesc_add_field): Likewise.
1676 (tdesc_set_struct_size): Likewise.
1678 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1680 * tdesc.c (~target_desc): Remove implictly deleted items.
1681 (init_target_desc): Iterate all features.
1682 (tdesc_get_features_xml): Use vector.
1683 (tdesc_create_feature): Create feature.
1684 * tdesc.h (tdesc_feature) Remove
1685 (target_desc): Add features.
1687 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1689 * Makefile.in: Add common/tdesc.c
1690 * tdesc.c (init_target_desc): init all reg_defs from register
1692 (tdesc_create_reg): Create tdesc_reg.
1693 * tdesc.h (tdesc_feature): Add register vector.
1695 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1697 * tdesc.h (struct target_desc) <features>: Change type to
1698 std::vector<std::string>.
1699 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1701 (tdesc_get_features_xml): Likewise.
1702 (tdesc_create_feature): Likewise.
1704 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1706 * regcache.c (find_register_by_number): Return a ref.
1707 (find_regno): Use references.
1708 (register_size): Likewise.
1709 (register_data): Likewise.
1710 * tdesc.c (target_desc::~target_desc): Remove free calls.
1711 (target_desc::operator==): Use std::vector compare.
1712 (init_target_desc): Use reference.
1713 (tdesc_create_reg): Use reg constructors.
1714 * tdesc.h (struct target_desc): Replace pointer with object.
1716 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1718 * regcache.c (find_register_by_number): Make static.
1719 (find_regno): Use find_register_by_number
1720 * regcache.h (struct reg): Remove declaration.
1722 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1724 * tdesc.c (target_desc::~target_desc): Move to here.
1725 (target_desc::operator==): Likewise.
1726 * tdesc.h (target_desc::~target_desc): Move from here.
1727 (target_desc::operator==): Likewise.
1729 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1731 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1733 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1735 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1737 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1738 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1739 and init_registers_s390_gs_linux64.
1741 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1743 * linux-s390-low.c (s390_fill_gs): Remove function.
1744 (s390_fill_gsbc): Remove function.
1745 (s390_regsets): Set fill functions for the guarded storage regsets
1748 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1750 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1751 the word size. Add comment.
1752 (s390_get_wordsize): New function.
1753 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1754 pswm with it. Instead, use s390_get_wordsize to determine the
1755 word size first and derive the correct tdesc from that directly.
1757 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1759 * Makefile.in: Include silent-rules.mk.
1760 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1761 (COMPILE): Add ECHO_CXX.
1762 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1763 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1764 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1765 (version-generated.c): Add ECHO_GEN.
1766 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1767 (IPAGENT_COMPILE): Add ECHO_CXX.
1768 (%-generated.c): Add ECHO_REGDAT.
1770 2018-03-14 Tom Tromey <tom@tromey.com>
1773 * ax.c (ax_printf): Special case for NULL.
1775 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1777 * linux-low.c (linux_qxfer_libraries_svr4): Use
1778 xml_escape_text_append.
1780 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1782 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1784 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1786 * server.c (handle_general_set): Remove unnecessary xstrdup.
1788 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1790 * server.c (parse_debug_format_options): Adjust to
1791 delim_string_to_char_ptr_vec changes.
1792 * thread-db.c (thread_db_load_search): Adjust to
1793 dirnames_to_char_ptr_vec changes.
1795 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1797 * target.h (target_enable_btrace, target_disable_btrace)
1798 (target_read_btrace, target_read_btrace_conf): Turn macro into
1799 inline function. Throw error if target method is not defined.
1800 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1801 check for btrace target method. Be prepared to handle exceptions
1802 from btrace target methods.
1804 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1806 * server.c (captured_main): Change order of error message printed
1807 when the current working directory cannot be found.
1809 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1811 * server.c: Include "filenames.h" and "pathstuff.h".
1812 (program_name): Delete variable.
1813 (program_path): New anonymous class.
1814 (get_exec_wrapper): Use "program_path" instead of
1816 (handle_v_run): Likewise.
1817 (captured_main): Likewise.
1818 (process_serial_event): Likewise.
1820 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1822 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1823 (OBJS): Add "pathstuff.o".
1824 * server.c (current_directory): New global variable.
1825 (captured_main): Initialize "current_directory".
1827 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1829 * tdesc.c: Use common/tdesc.h.
1830 * tdesc.h: Likewise.
1832 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1833 Simon Marchi <simon.marchi@ericsson.com>
1835 * Makefile.in: Switch order of make rules.
1837 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1839 * Makefile.in: Add common directory in build.
1840 * configure.ac: Add common reference.
1841 * configure: Regenerate.
1843 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1845 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1846 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1847 * spu-low.c (spu_target_ops): Likewise.
1848 * win32-low.c (win32_target_ops): Likewise.
1849 * server.c (supported_btrace_packets): Report packets unconditionally.
1850 * target.h (target_ops) <supports_btrace>: Remove.
1851 (target_supports_btrace): Remove.
1853 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1855 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1856 (handle_btrace_disable): Change return type to void. Use exceptions
1858 (handle_btrace_general_set): Catch exception and copy message to
1861 2018-02-08 Tom Tromey <tom@tromey.com>
1863 * linux-low.c (install_software_single_step_breakpoints): Use
1864 make_scoped_restore.
1865 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1866 (do_restore_current_thread_cleanup): Remove.
1867 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1870 2018-02-08 Tom Tromey <tom@tromey.com>
1872 * mem-break.c (set_raw_breakpoint_at): Use
1873 gdb::unique_xmalloc_ptr.
1875 2018-01-30 Pedro Alves <palves@redhat.com>
1878 * target.c (target_terminal::terminal_state): Rename to ...
1879 (target_terminal::m_terminal_state): ... this.
1881 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1883 * linux-low.c (handle_extended_wait): Surround call to
1884 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1886 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1888 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1889 linux_ptrace_attach_fail_reason_string now returning an
1891 (linux_attach): Likewise.
1892 * thread-db.c (attach_thread): Likewise.
1894 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1897 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1898 checking for fs_base/gs_base fields in struct user_regs_struct.
1899 * configure: Regenerate.
1901 2018-01-16 Yao Qi <yao.qi@linaro.org>
1904 * linux-low.c (fetch_register): Call supply_register instead of
1907 2018-01-08 Yao Qi <yao.qi@linaro.org>
1908 Simon Marchi <simon.marchi@ericsson.com>
1910 * Makefile.in (OBS): Remove selftest.o.
1911 * configure.ac: Set srv_selftest_objs if $development is true.
1912 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1913 * configure: Re-generated.
1914 * server.c (captured_main): Wrap variable selftest_filter with
1917 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1919 * server.c (parse_debug_format_options): Return std::string.
1920 (handle_monitor_command, captured_main): Adjust.
1922 2018-01-05 Pedro Alves <palves@redhat.com>
1925 * server.c (captured_main): Pass quiet=false to
1926 save_original_signals_state.
1928 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1930 * gdbreplay.c (gdbreplay_version): Update copyright year in
1932 * server.c (gdbserver_version): Likewise.
1934 2017-12-08 Tom Tromey <tom@tromey.com>
1936 * ax.c (ax_printf): Update.
1938 2017-12-07 Yao Qi <yao.qi@linaro.org>
1940 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1941 aarch64_linux_read_description.
1942 * linux-amd64-ipa.c (idx2mask): New array.
1943 (get_ipa_tdesc): Move idx2mask out.
1944 (initialize_low_tracepoint): Initialize target descriptions.
1945 * linux-i386-ipa.c (idx2mask): New array.
1946 (get_ipa_tdesc): Move idx2mask out.
1947 (initialize_low_tracepoint): Initialize target descriptions.
1949 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1951 * tdesc.c (struct tdesc_type): Change return type.
1952 (tdesc_add_flag): Change parameter type.
1953 (tdesc_add_bitfield): Likewise.
1954 (tdesc_add_field): Likewise.
1955 (tdesc_set_struct_size): Likewise.
1957 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1959 * regcache.c (registers_to_string): Remove unused variable.
1961 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1963 * inferiors.c (for_each_inferior_with_data): Remove.
1964 * inferiors.h (for_each_inferior_with_data): Remove.
1965 * server.c (handle_qxfer_threads_worker): Change parameter type.
1966 (handle_qxfer_threads_proper): Use for_each_thread.
1968 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1970 * inferiors.c (for_each_inferior): Remove.
1971 (clear_inferiors): Use for_each_thread.
1972 * inferiors.h (for_each_inferior): Remove.
1973 * linux-low.c (linux_wait_for_event_filtered): Use
1975 (linux_stabilize_threads): Likewise.
1976 * regcache.c (regcache_release): Likewise.
1977 * server.c (gdb_wants_all_threads_stopped): Likewise.
1978 (clear_pending_status_callback): Remove.
1979 (handle_status): Use for_each_thread.
1980 (captured_main): Likewise.
1981 * win32-low.c (child_init_thread_list): Likewise.
1982 (win32_clear_inferiors): Likewise.
1983 (fake_breakpoint_event): Likewise.
1985 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1987 * inferiors.h (find_inferior): Remove.
1988 * inferiors.c (find_inferior): Remove.
1990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1992 * linux-low.c (resume_status_pending_p): Update comment.
1993 (need_step_over_p): Update comment.
1995 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1997 * linux-low.c (proceed_one_lwp): Return void, change parameter
1999 (unsuspend_and_proceed_one_lwp): Likewise.
2000 (proceed_all_lwps): Use for_each_thread.
2001 (unstop_all_lwps): Likewise.
2003 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2005 * linux-low.c (linux_resume_one_thread): Return void, take
2007 (linux_resume): Use for_each_thread.
2009 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2011 * linux-low.c (send_sigstop_callback): Return void, change
2012 parameter type. Rename to...
2013 (send_sigstop): ... this.
2014 (suspend_and_send_sigstop_callback): Return void, change parameter
2016 (suspend_and_send_sigstop): ... this.
2017 (stop_all_lwps): Use for_each_thread.
2019 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2021 * linux-low.c (lwp_running): Return bool, remove unused
2023 (linux_stabilize_threads): Use find_thread.
2025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2027 * linux-low.c (select_singlestep_lwp_callback): Remove.
2028 (count_events_callback): Remove.
2029 (select_event_lwp_callback): Remove.
2030 (select_event_lwp): Use find_thread/for_each_thread.
2032 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2034 * linux-low.c (not_stopped_callback): Return bool, take filter
2036 (linux_wait_for_event_filtered): Use find_thread.
2037 (linux_wait_1): Likewise.
2039 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2041 * linux-low.c (same_lwp): Remove.
2042 (find_lwp_pid): Use find_thread.
2044 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2046 * linux-low.c (delete_lwp_callback): Remove.
2047 (linux_mourn): Use for_each_thread.
2049 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2051 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2052 args parameter, don't check for pid.
2053 (linux_detach): Use for_each_thread.
2055 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2057 * linux-low.c (struct counter): Remove.
2058 (second_thread_of_pid_p): Remove.
2059 (last_thread_of_process_p): Use find_thread.
2061 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2063 * inferiors.c (find_inferior_in_random): Remove.
2064 * inferiors.h (find_inferior_in_random): Remove.
2065 * linux-low.c (status_pending_p_callback): Return bool, accept
2066 parameter ptid directly.
2067 (linux_wait_for_event_filtered): Use find_thread_in_random.
2068 (linux_wait_1): Likewise.
2070 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2072 * inferiors.c (find_inferior_id): Remove.
2073 (find_thread_ptid): Move implemention from find_inferior_id to
2075 * inferiors.h (find_inferior_id): Remove.
2076 * server.c (handle_status): Use find_thread_ptid.
2077 (process_serial_event): Likewise.
2078 * thread-db.c (find_one_thread): Likewise.
2079 (thread_db_thread_handle): Likewise.
2080 * win32-low.c (thread_rec): Likewise.
2081 (child_delete_thread): Likewise.
2082 (win32_thread_alive): Likewise.
2083 (get_child_debug_event): Likewise.
2085 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2087 * linux-mips-low.c (update_watch_registers_callback): Return
2088 void, remove pid_p parameter, don't check for pid.
2089 (mips_insert_point, mips_remove_point): Use for_each_thread.
2091 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2093 * lynx.low (lynx_delete_thread_callback): Remove.
2094 (lynx_mourn): Use for_each_thread.
2096 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2098 * regcache.c (regcache_invalidate_one): Remove.
2099 (regcache_invalidate_pid): use for_each_thread.
2101 2017-11-26 Tom Tromey <tom@tromey.com>
2103 * linux-low.c (linux_create_inferior): Update.
2105 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2107 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2109 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2111 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2112 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2113 * linux-aarch64-tdesc-selftest.c: New file.
2114 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2116 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2118 * configure.srv: Add new file.
2119 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2120 * linux-aarch64-tdesc-selftest.c: New file.
2121 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2123 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2125 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2126 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2127 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2129 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2131 * configure.srv: Add new files.
2132 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2133 aarch64_linux_read_description.
2134 * linux-aarch64-low.c (aarch64_linux_read_description):
2135 Merge with aarch64_arch_setup.
2136 (aarch64_arch_setup): Call aarch64_linux_read_description.
2137 * linux-aarch64-tdesc.c: New file.
2138 * linux-aarch64-tdesc.h: New file.
2140 2017-11-24 Yao Qi <yao.qi@linaro.org>
2142 * configure.srv: Set $srv_regobj for tic6x-linux.
2143 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2144 (tic6x_read_description): Move some code to tic6x_arch_setup.
2145 (tic6x_tdesc_test): New function.
2146 (initialize_low_arch): Call selftests::register_test.
2148 2017-11-22 Yao Qi <yao.qi@linaro.org>
2150 * remote-utils.c (prepare_resume_reply): Use memcpy.
2152 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2154 * linux-low.c (kill_one_lwp_callback): Return void, take
2155 argument directly, don't filter on pid.
2156 (linux_kill): Use for_each_thread.
2158 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2160 * linux-low.c (need_step_over_p): Return bool, remove dummy
2162 (linux_resume, proceed_all_lwps): Use find_thread.
2164 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2166 * linux-low.c (resume_status_pending_p): Return bool, remove
2168 (linux_resume): Use find_thread.
2170 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2172 * linux-low.c (struct thread_resume_array): Remove.
2173 (linux_set_resume_request): Return void, take arguments
2175 (linux_resume): Use for_each_thread.
2177 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2179 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2180 return bool, remove data argument.
2181 (linux_stabilize_threads): Use find_thread.
2183 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2185 * linux-low.c (unsuspend_one_lwp): Remove.
2186 (unsuspend_all_lwps): Use for_each_thread, inline code from
2189 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2191 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2192 * linux-low.c (struct iterate_over_lwps_args): Remove.
2193 (iterate_over_lwps_filter): Remove.
2194 (iterate_over_lwps): Use find_thread.
2196 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2198 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2199 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2200 code from reset_lwp_ptrace_options_callback.
2202 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2204 * linux-arm-low.c (struct update_registers_data): Remove.
2205 (update_registers_callback): Return void, take arguments
2206 directly, don't check thread's pid.
2207 (arm_insert_point, arm_remove_point): Use for_each_thread.
2209 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2211 * win32-low.c (continue_one_thread): Return void, take argument
2213 (child_continue): Use for_each_thread.
2215 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2217 * win32-i386-low.c (update_debug_registers_callback): Rename
2219 (update_debug_registers): ... this, return void, remove pid_p arg.
2220 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2222 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2224 * inferiors.h (struct process_info): Add constructor, initialize
2226 <syscalls_to_catch>: Change type to std::vector<int>.
2227 * inferiors.c (add_process): Allocate process_info with new.
2228 (remove_process): Free process_info with delete.
2229 * linux-low.c (handle_extended_wait): Adjust.
2230 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2231 * server.c (handle_general_set): Adjust.
2233 2017-11-16 Pedro Alves <palves@redhat.com>
2235 * remote-utils.c (remote_close): Block SIGIO signals instead of
2236 uninstalling the SIGIO handler.
2238 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2240 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2242 2017-11-16 Yao Qi <yao.qi@linaro.org>
2244 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2245 (tic6x_store_gregset): Likewise.
2246 (tic6x_usrregs_info): Move it up.
2248 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2250 * Makefile.in: Update arch rules.
2251 * configure.srv: Explicitly mark arch/ files.
2253 2017-11-13 Andreas Schwab <schwab@suse.de>
2255 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2257 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2259 2017-11-06 Pedro Alves <palves@redhat.com>
2261 * config.in, configure: Regenerate.
2263 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2265 * target.c (struct thread_search): Remove.
2266 (thread_search_callback): Remove.
2267 (prepare_to_access_memory): Use for_each_thread instead of
2268 find_inferior. Inline code from thread_search_callback.
2270 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2272 * server.c (struct visit_actioned_threads_data): Remove.
2273 (visit_actioned_threads): Change prototype to take arguments
2275 (resume): Use find_thread instead of find_inferior.
2277 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2279 * server.c (queue_stop_reply_callback): Change prototype, return
2281 (find_status_pending_thread_callback): Remove.
2282 (handle_status): Replace find_inferior with find_thread and
2285 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2287 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2289 (aarch64_store_gregset): Likewise.
2290 (aarch64_fill_fpregset): Likewise.
2291 (aarch64_store_fpregset): Likewise.
2293 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2295 * gdbthread.h (find_thread, for_each_thread): New functions.
2296 * inferiors.c (thread_of_pid): Remove.
2297 (find_any_thread_of_pid): Use find_thread.
2298 * linux-low.c (num_lwps): Use for_each_thread.
2300 2017-10-17 Yao Qi <yao.qi@linaro.org>
2302 * Makefile.in: Remove one rule.
2303 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2305 2017-10-17 Yao Qi <yao.qi@linaro.org>
2307 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2308 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2310 2017-10-17 Yao Qi <yao.qi@linaro.org>
2312 * configure.srv: Rename arm.o with arch/arm.o.
2314 2017-10-17 Yao Qi <yao.qi@linaro.org>
2316 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2317 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2318 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2319 (arch-i386.o, arch-amd64.o): Remove rules.
2320 (arch/%.o): New rule.
2321 Update POSTCOMPILE and COMPILE.pre.
2322 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2323 * configure: Re-generated.
2324 * configure.srv: Replace arch-i386.o with arch/i386.o.
2325 Replace arch-amd64.o with arch/amd64.o.
2327 2017-10-16 Yao Qi <yao.qi@linaro.org>
2329 * configure: Regenerated.
2331 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2333 * inferiors.h: (struct inferior_list): Remove.
2334 (struct inferior_list_entry); Remove.
2335 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2336 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2337 get_first_inferior): Remove.
2338 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2339 find_inferior_id, find_inferior_in_random): Change signature.
2340 * inferiors.c (all_threads): Change type to
2341 std::list<thread_info *>.
2342 (get_thread): Remove macro.
2343 (find_inferior, find_inferior_id): Change signature, implement
2345 (find_inferior_in_random): Change signature, implement using
2346 find_thread_in_random.
2347 (for_each_inferior, for_each_inferior_with_data): Change
2348 signature, implement using for_each_thread.
2349 (add_inferior_to_list, remove_inferior): Remove.
2350 (add_thread, get_first_thread, thread_of_pid,
2351 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2352 (get_first_inferior, one_inferior_p, clear_inferior_list):
2354 (clear_inferiors, get_thread_process): Update.
2355 * gdbthread.h: Include <list>.
2356 (struct thread_info) <entry>: Remove field.
2358 (all_threads): Change type to std::list<thread_info *>.
2359 (get_first_inferior): Add doc.
2360 (find_thread, for_each_thread, find_thread_in_random): New
2362 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2363 * linux-arm-low.c (update_registers_callback): Update.
2364 * linux-low.c (second_thread_of_pid_p): Update.
2365 (kill_one_lwp_callback, linux_detach_lwp_callback,
2366 delete_lwp_callback, status_pending_p_callback, same_lwp,
2367 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2368 iterate_over_lwps, not_stopped_callback,
2369 resume_stopped_resumed_lwps, count_events_callback,
2370 select_singlestep_lwp_callback, select_event_lwp_callback,
2371 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2372 suspend_and_send_sigstop_callback, wait_for_sigstop,
2373 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2374 lwp_running, linux_set_resume_request, resume_status_pending_p,
2375 need_step_over_p, start_step_over, linux_resume_one_thread,
2376 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2377 reset_lwp_ptrace_options_callback): Update.
2378 * linux-mips-low.c (update_watch_registers_callback): Update.
2379 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2381 (free_register_cache_thread_one): Remove.
2382 (regcache_release): Update.
2383 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2384 handle_qxfer_threads_worker): Update.
2385 (handle_query): Update, use list iterator.
2386 (visit_actioned_threads, handle_pending_status,
2387 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2388 clear_pending_status_callback, set_pending_status_callback,
2389 find_status_pending_thread_callback, handle_status,
2390 process_serial_event): Update.
2391 * target.c (thread_search_callback): Update.
2392 * thread-db.c (thread_db_get_tls_address): Update.
2393 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2395 * win32-i386-low.c (update_debug_registers_callback): Update.
2396 * win32-low.c (delete_thread_info, child_delete_thread,
2397 continue_one_thread, suspend_one_thread,
2398 get_child_debug_event): Adjust.
2400 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2402 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2403 * inferiors.h: Include <list>.
2404 (struct process_info) <entry>: Remove field.
2406 (pid_of): Change macro to function.
2407 (ptid_of, lwpid_of): Remove macro.
2408 (all_processes): Change type to std::list<process_info *>.
2409 (ALL_PROCESSES): Remove macro.
2410 (for_each_process, find_process): New function.
2411 * inferiors.c (all_processes): Change type to
2412 std::list<process_info *>.
2413 (find_thread_process): Adjust.
2414 (add_process): Likewise.
2415 (remove_process): Likewise.
2416 (find_process_pid): Likewise.
2417 (get_first_process): Likewise.
2418 (started_inferior_callback): Remove.
2419 (have_started_inferiors_p): Adjust.
2420 (attached_inferior_callback): Remove.
2421 (have_attached_inferiors_p): Adjust.
2422 * linux-low.c (check_zombie_leaders): Likewise.
2423 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2424 (x86_linux_update_xmltarget): Adjust.
2425 * server.c (handle_query): Likewise.
2426 (gdb_reattached_process): Remove.
2427 (handle_status): Adjust.
2428 (kill_inferior_callback): Likewise.
2429 (detach_or_kill_inferior): Remove.
2430 (print_started_pid): Likewise.
2431 (print_attached_pid): Likewise.
2432 (detach_or_kill_for_exit): Update.
2433 (process_serial_event): Likewise.
2434 * linux-arm-low.c (arm_new_fork): Likewise.
2436 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2438 * dll.h: Include <list>.
2439 (struct dll_info): Add constructor.
2440 <entry>: Remove field.
2441 (all_dlls): Change type to std::list<dll_info>.
2442 * dll.c: Include <algorithm>.
2443 (get_dll): Remove macro.
2444 (all_dlls): Change type to std::list<dll_info *>.
2445 (free_one_dll): Remove.
2446 (match_dll): Likewise.
2447 (loaded_dll): Adjust.
2448 (unloaded_dll): Adjust to all_dlls type change, use
2449 std::find_if. Inline code from match_dll.
2450 (clear_dlls): Adjust to all_dlls type change.
2451 * server.c (emit_dll_description): Remove.
2452 (handle_qxfer_libraries): Adjust to all_dlls type change,
2453 integrate emit_dll_description's functionality.
2455 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2457 * linux-low.h (struct linux_target_ops) <delete_process>: New
2459 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2460 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2461 (struct linux_target_ops): Add delete_process callback.
2462 * linux-arm-low.c (arm_delete_process): New.
2463 (struct linux_target_ops): Add delete_process callback.
2464 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2465 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2466 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2467 * linux-mips-low.c (mips_linux_delete_process): New.
2468 (struct linux_target_ops): Add delete_process callback.
2469 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2470 * linux-s390-low.c (struct linux_target_ops): Likewise.
2471 * linux-sh-low.c (struct linux_target_ops): Likewise.
2472 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2473 * linux-tile-low.c (struct linux_target_ops): Likewise.
2474 * linux-x86-low.c (x86_linux_delete_process): New.
2475 (struct linux_target_ops): Add delete_process callback.
2476 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2478 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2480 * linux-aarch64-low.c (the_low_target): Add thread delete
2482 * linux-arm-low.c (arm_delete_thread): New function.
2483 (the_low_target): Add thread delete callback.
2484 * linux-bfin-low.c (the_low_target): Likewise.
2485 * linux-crisv32-low.c (the_low_target): Likewise.
2486 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2488 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2490 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2491 * linux-mips-low.c (mips_linux_delete_thread): New function.
2492 (the_low_target): Add thread delete callback.
2493 * linux-ppc-low.c (the_low_target): Likewise.
2494 * linux-s390-low.c (the_low_target): Likewise.
2495 * linux-sh-low.c (the_low_target): Likewise.
2496 * linux-tic6x-low.c (the_low_target): Likewise.
2497 * linux-tile-low.c (the_low_target): Likewise.
2498 * linux-x86-low.c (the_low_target): Likewise.
2499 * linux-xtensa-low.c (the_low_target): Likewise.
2501 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2503 * win32-low.c: Include "common-inferior.h".
2505 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2507 * inferiors.c (set_inferior_cwd): New function.
2508 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2509 (handle_query): Inform that QSetWorkingDir is supported.
2510 * win32-low.c (create_process): Pass the inferior's cwd to
2513 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2515 * inferiors.c (current_inferior_cwd): New global variable.
2516 (get_inferior_cwd): New function.
2517 * inferiors.h (struct process_info) <cwd>: New field.
2519 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2521 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2522 (OBS): Add gdb_tilde_expand.o.
2524 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2526 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2527 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2529 2017-09-29 Pedro Alves <palves@redhat.com>
2531 * ax.c (gdb_parse_agent_expr): Constify.
2532 * ax.h (gdb_parse_agent_expr): Constify.
2533 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2535 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2536 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2537 * remote-utils.h (read_ptid): Constify.
2538 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2539 (process_point_options, process_serial_event): Constify.
2540 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2541 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2542 (cmd_qtbuffer): Constify.
2544 2017-09-29 Pedro Alves <palves@redhat.com>
2546 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2549 2017-09-29 Pedro Alves <palves@redhat.com>
2551 * linux-low.c (handle_extended_wait): Pass parent thread instead
2552 of process to thread_db_notice_clone.
2553 * linux-low.h (thread_db_notice_clone): Replace parent process
2554 parameter with parent thread parameter.
2555 * thread-db.c (find_one_thread): Add comment.
2556 (thread_db_notice_clone): Replace parent process parameter with
2557 parent thread parameter. Temporarily switch to the parent thread.
2559 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2561 * gdbthread.h: Include "common-gdbthread.h".
2562 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2563 "if" when validating the ptid.
2564 * remote-utils.c: Include "gdbthread.h".
2565 (prepare_resume_reply): Use "switch_to_thread".
2566 * target.c (done_accessing_memory): Likewise.
2568 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2570 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2571 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2572 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2573 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2574 s390x-gs-linux64-ipa.o to ipa_obj.
2575 * linux-s390-low.c (HWCAP_S390_GS): New define.
2576 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2578 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2579 (s390_arch_setup): Check for guarded-storage support and choose
2581 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2582 init_registers_s390x_gs_linux64.
2583 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2585 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2586 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2588 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2590 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2592 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2594 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2595 (thread_db_thread_handle): Declare.
2596 * linux-low.c (linux_target_ops): Initialize thread_handle.
2597 * server.c (handle_qxfer_threads_worker): Add support for
2599 * target.h (struct target_ops): Add new function pointer,
2601 (target_thread_handle): Define.
2602 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2604 (thread_db_thread_handle): New function.
2606 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2608 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2609 * linux-low.h (thread_db_notice_clone): Declare.
2610 * thread-db.c (thread_db_notice_clone): New function.
2612 2017-09-21 Pedro Alves <palves@redhat.com>
2614 * server.c (gdb_read_memory, handle_status, process_serial_event)
2615 (handle_serial_event, handle_target_event): Adjust to
2616 set_desired_thread prototype change.
2617 * target.c (set_desired_thread): Remove 'use_general' parameter
2619 * target.h (set_desired_thread): Remove 'use_general' parameter.
2621 2017-09-20 Tom Tromey <tom@tromey.com>
2623 * target.c (target_terminal::terminal_state): Define.
2624 (target_terminal::init): Rename from target_terminal_init.
2625 (target_terminal::inferior): Rename from
2626 target_terminal_inferior.
2627 (target_terminal::ours): Rename from target_terminal_ours.
2628 (target_terminal::ours_for_output, target_terminal::info): New.
2630 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2632 * server.c (accumulate_file_name_length): Remove.
2633 (emit_dll_description): Adjust to std::string change.
2634 (handle_qxfer_libraries): Use std::string to hold document.
2636 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2638 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2639 return type of xml_escape_text.
2640 * server.c (emit_dll_description): Likewise.
2642 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2644 * server.c (captured_main): Accept argument for --selftest.
2645 Update run_tests call.
2646 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2647 when registering selftests.
2649 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2651 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2652 instead of "VEC" for "target_desc.reg_defs".
2653 (regcache_cpy): Likewise.
2654 (registers_to_string): Likewise.
2655 (registers_from_string): Likewise.
2656 (find_regno): Likewise.
2657 (supply_regblock): Likewise.
2658 (regcache_raw_read_unsigned): Likewise.
2659 * tdesc.c (init_target_desc): Likewise.
2660 (tdesc_create_reg): Likewise.
2661 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2662 (struct target_desc) <reg_defs>: Convert to "std::vector".
2663 (target_desc): Do not initialize "reg_defs".
2664 (~target_desc): Update code to use "std::vector" instead of "VEC"
2665 for "target_desc.reg_defs".
2666 (operator==): Likewise.
2668 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2670 * inferiors.h (thread_to_gdb_id): Remove.
2671 * inferiors.c (thread_to_gdb_id): Remove.
2672 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2673 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2674 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2676 * nto-low.c (nto_fetch_registers, nto_store_registers,
2677 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2679 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2681 * inferiors.h (gdb_id_to_thread_id): Remove.
2682 * inferiors.c (gdb_id_to_thread_id): Remove.
2683 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2684 removal. Move pid declaration closer to where it's used.
2686 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2688 * server.c (handle_detach): New function.
2689 (process_serial_event): Move code out, call handle_detach.
2691 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2693 * server.c (require_running): Rename to ...
2694 (require_running_or_return): ... this ...
2695 (require_running_or_break): ... and this.
2696 (handle_query, process_serial_event): Adjust.
2698 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2700 * linux-low.c (linux_set_resume_request): Remove unused
2703 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2705 * server.c (first_thread_of): Remove.
2706 (process_serial_event): Replace usage of first_thread_of with
2707 find_any_thread_of_pid.
2708 * tracepoint.c (same_process_p): Remove.
2709 (gdb_agent_about_to_close): Replace usage of same_process_p with
2710 find_any_thread_of_pid.
2711 * linux-x86-low.c (same_process_callback): Remove.
2712 (x86_arch_setup_process_callback): Replace usage of
2713 same_process_callback with find_any_thread_of_pid.
2714 * thread-db.c (any_thread_of): Remove.
2715 (switch_to_process): Replace usage of any_thread_of with
2716 find_any_thread_of_pid.
2717 * inferiors.c (thread_pid_matches_callback): Remove.
2718 (find_thread_process): Adjust to use find_any_thread_of_pid.
2720 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2722 * regcache.c (get_thread_regcache): Guard calls to "memset"
2725 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2727 * linux-low.c (handle_extended_wait): Use
2728 "allocate_target_description" instead of "XNEW".
2729 * linux-x86-low.c (initialize_low_arch): Likewise.
2731 2017-09-05 Yao Qi <yao.qi@linaro.org>
2733 * configure.srv (srv_i386_regobj): Remove.
2734 (srv_amd64_regobj): Remove.
2735 (srv_regobj): Set it to "" for x86 non-linux targets.
2736 * linux-x86-tdesc.c (i386_linux_read_description):
2737 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2738 (init_registers_i386): Remove the declaration.
2739 (tdesc_i386): Remove the declaration.
2740 (lynx_i386_arch_setup): Call i386_create_target_description.
2741 * nto-x86-low.c: Likewise.
2742 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2743 [!__x86_64__]: include arch/i386.h.
2744 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2746 2017-09-05 Yao Qi <yao.qi@linaro.org>
2748 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2749 i386/amd64-XXX-linux from it.
2751 2017-09-05 Yao Qi <yao.qi@linaro.org>
2753 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2755 (ipa_amd64_linux_regobj): Remove.
2756 (ipa_x32_linux_regobj): Remove.
2758 2017-09-05 Yao Qi <yao.qi@linaro.org>
2760 * Makefile.in (arch-amd64.o): New rule.
2761 * configure.srv: Append arch-amd64.o.
2762 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2763 (get_ipa_tdesc): Call amd64_linux_read_description.
2764 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2765 and init_registers_amd64_XXX.
2766 * linux-x86-low.c (x86_linux_read_description): Call
2767 amd64_linux_read_description.
2768 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2769 (initialize_low_arch): Don't call init_registers_x32_XXX and
2770 init_registers_amd64_XXX.
2771 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2772 and tdesc_amd64_XXX.
2773 [__x86_64__] (amd64_tdesc_test): New function.
2774 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2775 and init_registers_amd64_XXX.
2776 * linux-x86-tdesc.c: Include arch/amd64.h.
2777 (xcr0_to_tdesc_idx): New function.
2778 (i386_linux_read_description): New function.
2779 (amd64_get_ipa_tdesc_idx): New function.
2780 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2781 (amd64_get_ipa_tdesc): Declare.
2783 2017-09-05 Yao Qi <yao.qi@linaro.org>
2785 * configure.srv (srv_i386_linux_xmlfiles): Remove
2786 i386/i386-XXX-linux.xml from it.
2788 2017-09-05 Yao Qi <yao.qi@linaro.org>
2790 * configure.srv: Set srv_i386_linux_regobj empty if $development
2792 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2793 initialize_low_tdesc.
2794 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2795 with #if initialize_low_tdesc.
2796 * linux-x86-tdesc-selftest.c: New file.
2797 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2799 2017-09-05 Yao Qi <yao.qi@linaro.org>
2801 * Makefile.in (arch-i386.o): New rule.
2802 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2803 (x86_64-*-linux*): Likewise.
2804 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2805 include arch/i386.h.
2806 (i386_linux_read_description): Remove code and call
2807 i386_create_target_description.
2808 * tdesc.c (allocate_target_description): New function.
2809 * tdesc.h (set_tdesc_architecture): Remove declaration.
2810 (set_tdesc_osabi): Likewise.
2812 2017-09-05 Yao Qi <yao.qi@linaro.org>
2814 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2815 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2816 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2818 * server.c (get_features_xml): Call tdesc_get_features_xml.
2819 * tdesc.c (set_tdesc_architecture): New function.
2820 (set_tdesc_osabi): New function.
2821 (tdesc_get_features_xml): New function.
2822 (tdesc_create_feature): Add an argument.
2823 * tdesc.h (struct target_desc) <features>: New field.
2824 <arch, osabi>: New field.
2825 (~target_desc): xfree features, arch, and osabi.
2826 (target_desc::oerator==): Don't compare .xmltarget.
2827 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2828 (set_tdesc_osabi): Likewise.
2829 (tdesc_get_features_xml): Likewise.
2831 2017-09-05 Yao Qi <yao.qi@linaro.org>
2833 * linux-x86-tdesc.c: Include selftest.h.
2834 (i386_tdesc_test): New function.
2835 (initialize_low_tdesc): Call selftests::register_test.
2836 * tdesc.h: Include regdef.h.
2837 (target_desc): Override operator == and !=.
2839 2017-09-05 Yao Qi <yao.qi@linaro.org>
2841 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2842 (ipa_obj): Likewise.
2843 * linux-i386-ipa.c: Include common/x86-xstate.h
2844 (get_ipa_tdesc): Call i386_linux_read_description.
2845 (initialize_low_tracepoint): Don't call init_registers_XXX
2846 functions, call initialize_low_tdesc instead.
2847 * linux-x86-low.c (x86_linux_read_description): Call
2848 i386_linux_read_description.
2849 (initialize_low_arch): Don't call init_registers_i386_XXX
2850 functions, call initialize_low_tdesc.
2851 * linux-x86-tdesc.c: New file.
2852 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2853 (i386_get_ipa_tdesc_idx): Declare.
2854 (i386_get_ipa_tdesc): Declare.
2855 (initialize_low_tdesc): Declare.
2857 2017-09-05 Yao Qi <yao.qi@linaro.org>
2859 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2862 2017-09-05 Yao Qi <yao.qi@linaro.org>
2864 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2865 * regcache.c (get_thread_regcache): Use VEC_length.
2866 (init_register_cache): Likewise.
2867 (regcache_cpy): Likewise.
2868 (registers_to_string): Iterate reg_defs via VEC_iterate.
2869 (find_regno): Likewise.
2870 (find_register_by_number): Use VEC_index.
2871 (register_size): Call find_register_by_number.
2872 (register_data): Call find_register_by_number.
2873 (supply_regblock): Use VEC_length.
2874 (regcache_raw_read_unsigned): Likewise.
2875 * tdesc.c (init_target_desc): Iterate reg_defs via
2877 (default_description): Update initializer.
2878 (copy_target_description): Don't update field num_registers.
2879 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2880 <num_registers>: Remove.
2882 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2884 * Makefile.in (.SECONDARY): Define target.
2886 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2888 * linux-low.c (linux_wait_1): Adjust.
2889 * server.c (queue_stop_reply_callback): Adjust.
2891 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2893 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2894 QEnvironmentUnset and QEnvironmentReset packets.
2895 (handle_query): Inform remote that QEnvironmentHexEncoded,
2896 QEnvironmentUnset and QEnvironmentReset are supported.
2898 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2900 * inferiors.h (inferior_target_data): Rename to ...
2901 (thread_target_data): ... this.
2902 (inferior_regcache_data): Rename to ...
2903 (thread_regcache_data): ... this.
2904 (set_inferior_regcache_data): Rename to ...
2905 (set_thread_regcache_data): ... this.
2906 * inferiors.c (inferior_target_data): Rename to ...
2907 (thread_target_data): ... this.
2908 (inferior_regcache_data): Rename to ...
2909 (thread_regcache_data): ... this.
2910 (set_inferior_regcache_data): Rename to ...
2911 (set_thread_regcache_data): ... this.
2912 (free_one_thread): Update.
2913 * linux-low.h (get_thread_lwp): Update.
2914 * regcache.c (get_thread_regcache): Update.
2915 (regcache_invalidate_thread): Update.
2916 (free_register_cache_thread): Update.
2917 * win32-i386-low.c (update_debug_registers_callback): Update.
2918 (win32_get_current_dr): Update.
2919 * win32-low.c (thread_rec): Update.
2920 (delete_thread_info): Update.
2921 (continue_one_thread): Update.
2922 (suspend_one_thread): Update.
2924 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2926 * inferiors.c (set_inferior_target_data): Remove.
2927 * inferiors.h (set_inferior_target_data): Remove.
2929 2017-08-18 Yao Qi <yao.qi@linaro.org>
2931 * Makefile.in (OBS): Add selftest.o.
2932 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2933 * configure, config.in: Re-generated.
2934 * server.c: Include common/sefltest.h.
2935 (captured_main): Handle option --selftest.
2937 2017-08-09 Yao Qi <yao.qi@linaro.org>
2939 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2940 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2941 i386-avx-mpx.o and i386-mmx.o.
2942 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2943 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2944 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2945 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2946 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2947 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2948 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2949 i386/amd64-avx-mpx.xml.
2951 2017-08-09 Yao Qi <yao.qi@linaro.org>
2953 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2954 and x32-avx-avx512.o.
2955 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2956 i386/x32-avx-avx512.xml.
2958 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2960 * tracepoint.h (enum class fast_tpoint_collect_result): New
2962 (fast_tracepoint_collecting): Change return type to
2963 fast_tpoint_collect_result.
2964 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2965 * linux-low.h: Include tracepoint.h.
2966 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2967 fast_tpoint_collect_result.
2968 * linux-low.c (handle_tracepoints): Adjust.
2969 (linux_fast_tracepoint_collecting): Change return type to
2970 fast_tpoint_collect_result.
2971 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2972 linux_wait_1, stuck_in_jump_pad_callback,
2973 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2974 proceed_one_lwp): Adjust to type change.
2976 2017-07-10 Yao Qi <yao.qi@linaro.org>
2978 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2980 2017-06-29 Yao Qi <yao.qi@linaro.org>
2982 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2984 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2986 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2988 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2990 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2992 * linux-low.c (linux_create_inferior): Adjust code to access the
2993 environment information via 'gdb_environ' class.
2994 * lynx-low.c (lynx_create_inferior): Likewise.
2995 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2996 (get_environ): Return a pointer to 'our_environ'.
2997 (captured_main): Initialize 'our_environ'.
2998 * server.h (get_environ): Adjust prototype.
2999 * spu-low.c (spu_create_inferior): Adjust code to access the
3000 environment information via 'gdb_environ' class.
3002 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3004 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3005 usage of "register" keyword.
3007 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3009 * configure: Re-generate.
3011 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3013 * configure: Re-generate.
3015 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3017 * Makefile.in (COMPILE.pre): Add "-x c++".
3019 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3021 * fork-child.c: Conditionally include <signal.h>.
3023 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3025 * server.c (handle_general_set): Handle new packet
3026 "QStartupWithShell".
3027 (handle_query): Add "QStartupWithShell" to the list of supported
3029 (gdbserver_usage): Add help text explaining the
3030 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3032 (captured_main): Recognize and act upon the presence of the new
3035 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3036 Pedro Alves <palves@redhat.com>
3038 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3039 * configure: Regenerate.
3040 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3042 (i[34567]86-*-lynxos*): Likewise.
3043 (spu*-*-*): Likewise.
3044 * fork-child.c: New file.
3045 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3047 (linux_ptrace_fun): New function.
3048 (linux_create_inferior): Adjust function prototype to reflect
3049 change on "target.h". Adjust function code to use
3051 (linux_request_interrupt): Delete "signal_pid".
3052 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3053 (lynx_ptrace_fun): New function.
3054 (lynx_create_inferior): Adjust function prototype to reflect
3055 change on "target.h". Adjust function code to use
3057 * nto-low.c (nto_create_inferior): Adjust function prototype and
3058 code to reflect change on "target.h". Update comments.
3059 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3060 "common-terminal.h" and "environ.h".
3061 (terminal_fd): Moved to fork-child.c.
3062 (old_foreground_pgrp): Likewise.
3063 (restore_old_foreground_pgrp): Likewise.
3064 (last_status): Make it global.
3065 (last_ptid): Likewise.
3066 (our_environ): New variable.
3067 (startup_with_shell): Likewise.
3068 (program_name): Likewise.
3069 (program_argv): Rename to...
3070 (program_args): ...this.
3071 (wrapper_argv): New variable.
3072 (start_inferior): Delete function.
3073 (get_exec_wrapper): New function.
3074 (get_exec_file): Likewise.
3075 (get_environ): Likewise.
3076 (prefork_hook): Likewise.
3077 (post_fork_inferior): Likewise.
3078 (postfork_hook): Likewise.
3079 (postfork_child_hook): Likewise.
3080 (handle_v_run): Update code to deal with arguments coming from the
3081 remote host. Update calls from "start_inferior" to
3083 (captured_main): Likewise. Initialize environment variable. Call
3085 * server.h (post_fork_inferior): New prototype.
3086 (get_environ): Likewise.
3087 (last_status): Declare.
3088 (last_ptid): Likewise.
3089 (signal_pid): Likewise.
3090 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3091 (spu_ptrace_fun): New function.
3092 (spu_create_inferior): Adjust function prototype to reflect change
3093 on "target.h". Adjust function code to use "fork_inferior".
3094 * target.c (target_terminal_init): New function.
3095 (target_terminal_inferior): Likewise.
3096 (target_terminal_ours): Likewise.
3097 * target.h: Include <vector>.
3098 (struct target_ops) <create_inferior>: Update prototype.
3099 (create_inferior): Update macro.
3100 * utils.c (gdb_flush_out_err): New function.
3101 * win32-low.c (win32_create_inferior): Adjust function prototype
3102 and code to reflect change on "target.h".
3104 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3106 * inferiors.c (switch_to_thread): New function.
3108 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3110 * Makefile.in (SFILE): Add "common/job-control.c".
3111 (OBS): Add "job-control.o".
3113 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3115 * Makefile: Remove "@host_makefile_frag@".
3117 2017-05-05 Pedro Alves <palves@redhat.com>
3119 * configure: Regenerate.
3121 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3123 * configure: Regenerate.
3125 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3127 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3128 software_single_step change of return type to
3129 std::vector<CORE_ADDR>.
3130 * linux-low.c (install_software_single_step_breakpoints):
3132 * linux-low.h (install_software_single_step_breakpoints):
3135 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3137 * remote-utils.c: Include "gdb_termios.h" instead of
3139 * terminal.h: Delete file.
3141 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3143 * server.c: Include <vector>.
3144 <program_argv, wrapper_argv>: Convert to std::vector.
3145 (start_inferior): Rewrite function to use C++.
3146 (handle_v_run): Likewise. Update code that calculates the argv
3147 based on the vRun packet; use C++.
3148 (captured_main): Likewise.
3150 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3152 * server.c (handle_v_cont): Initialize thread_resume::thread
3155 2017-04-05 Pedro Alves <palves@redhat.com>
3157 * configure: Regenerate.
3159 2017-04-05 Pedro Alves <palves@redhat.com>
3161 * gdbreplay.c (sync_error): Constify.
3162 * linux-x86-low.c (push_opcode): Constify.
3164 2017-04-05 Pedro Alves <palves@redhat.com>
3166 * win32-low.c (get_child_debug_event)
3167 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3168 Report TARGET_WAITKIND_SPURIOUS instead.
3170 2017-04-05 Pedro Alves <palves@redhat.com>
3172 * remote-utils.c (remote_prepare, remote_open): Constify.
3173 * remote-utils.h (remote_prepare, remote_open): Constify.
3174 * server.c (captured_main): Constify 'port' handling.
3176 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3178 * Makefile.in (clean): Clear .deps.
3180 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3182 * .gitignore: Remove generated files, replace with wildcard.
3183 * (clean): Replace removal of generated files with wildcard.
3184 (version.c): Replace with...
3185 (version-generated.c): ...this.
3186 (xml-builtin.c): Replace with...
3187 (xml-builtin-generated.c): ...this.
3188 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3189 (%.c: *regformats*): Replace with...
3190 (%-generated.c: *regformats*): ...this.
3192 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3194 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3195 (xtensa_fill_gregset): Call collect_register_by_name for
3197 (xtensa_store_gregset): Call supply_register_by_name for
3200 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3202 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3203 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3204 (xtensa_store_gregset): Call supply_register for all registers in
3205 a0_regnum..a0_regnum + C0_NREGS range.
3207 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3209 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3210 (ax-ipa.o: ax.c): Remove.
3211 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3212 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3213 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3214 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3215 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3217 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3219 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3220 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3221 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3222 (errors-ipa.o: ../common/errors.c): Remove.
3223 (format-ipa.o: ../common/format.c): Remove.
3224 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3226 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3228 * Makefile.in (%-ipa.o: %.c): New rule.
3229 (tracepoint-ipa.o: tracepoint.c): Remove.
3230 (utils-ipa.o: utils.c): Remove.
3231 (remote-utils-ipa.o: remote-utils.c): Remove.
3232 (regcache-ipa.o: regcache.c): Remove.
3233 (i386-linux-ipa.o: i386-linux.c): Remove.
3234 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3235 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3236 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3237 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3238 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3239 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3240 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3241 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3242 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3243 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3244 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3245 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3246 (aarch64-ipa.o: aarch64.c): Remove.
3247 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3248 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3249 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3250 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3251 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3252 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3253 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3254 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3255 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3256 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3257 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3258 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3259 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3260 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3261 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3262 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3263 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3264 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3265 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3266 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3267 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3268 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3269 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3270 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3271 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3272 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3273 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3274 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3275 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3276 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3277 (tdesc-ipa.o: tdesc.c): Remove.
3278 (x32-linux-ipa.o: x32-linux.c): Remove.
3279 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3280 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3282 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3284 * Makefile.in (%.o: ../arch/%.c): New rule.
3285 (arm.o: ../arch/arm.c): Remove.
3286 (arm-linux.o: ../arch/arm-linux.c): Remove.
3287 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3288 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3290 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3292 * Makefile.in (%.o: ../nat/%.c): New rule.
3293 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3294 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3295 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3296 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3297 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3298 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3299 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3300 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3301 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3302 (linux-personality.o: ../nat/linux-personality.c): Remove.
3303 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3304 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3305 (x86-linux.o: ../nat/x86-linux.c): Remove.
3306 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3307 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3309 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3311 * Makefile.in (%.o: ../common/%.c): New rule.
3312 (signals.o: ../common/signals.c): Remove.
3313 (print-utils.o: ../common/print-utils.c): Remove.
3314 (rsp-low.o: ../common/rsp-low.c): Remove.
3315 (common-utils.o: ../common/common-utils.c): Remove.
3316 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3317 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3318 (vec.o: ../common/vec.c): Remove.
3319 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3320 (xml-utils.o: ../common/xml-utils.c): Remove.
3321 (ptid.o: ../common/ptid.c): Remove.
3322 (buffer.o: ../common/buffer.c): Remove.
3323 (format.o: ../common/format.c): Remove.
3324 (filestuff.o: ../common/filestuff.c): Remove.
3325 (agent.o: ../common/agent.c): Remove.
3326 (errors.o: ../common/errors.c): Remove.
3327 (environ.o: ../common/environ.c): Remove.
3328 (common-debug.o: ../common/common-debug.c): Remove.
3329 (cleanups.o: ../common/cleanups.c): Remove.
3330 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3331 (fileio.o: ../common/fileio.c): Remove.
3332 (common-regcache.o: ../common/common-regcache.c): Remove.
3333 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3334 (new-op.o: ../common/new-op.c): Remove.
3335 (btrace-common.o: ../common/btrace-common.c): Remove.
3337 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3339 * Makefile.in (%.o: ../target/%.c): New rule.
3340 (waitstatus.o: ../target/waitstatus.c): Remove.
3342 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3345 (%.c: ../regformats/%.dat,
3346 (%.c: ../regformats/arm/%.dat,
3347 (%.c: ../regformats/i386/%.dat,
3348 (%.c: ../regformats/rs6000/%.dat): New rules.
3349 (aarch64.c): Remove.
3350 (reg-arm.c): Remove.
3351 (arm-with-iwmmxt.c): Remove.
3352 (arm-with-vfpv2.c): Remove.
3353 (arm-with-vfpv3.c): Remove.
3354 (arm-with-neon.c): Remove.
3355 (reg-bfin.c): Remove.
3356 (reg-cris.c): Remove.
3357 (reg-crisv32.c): Remove.
3359 (i386-linux.c): Remove.
3360 (i386-avx.c): Remove.
3361 (i386-avx-linux.c): Remove.
3362 (i386-avx-avx512.c): Remove.
3363 (i386-avx-avx512-linux.c): Remove.
3364 (i386-mpx.c): Remove.
3365 (i386-mpx-linux.c): Remove.
3366 (i386-avx-mpx-avx512-pku.c): Remove.
3367 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3368 (i386-avx-mpx.c): Remove.
3369 (i386-avx-mpx-linux.c): Remove.
3370 (i386-mmx.c): Remove.
3371 (i386-mmx-linux.c): Remove.
3372 (reg-ia64.c): Remove.
3373 (reg-m32r.c): Remove.
3374 (reg-m68k.c): Remove.
3376 (mips-linux.c): Remove.
3377 (mips-dsp-linux.c): Remove.
3378 (mips64-linux.c): Remove.
3379 (mips64-dsp-linux.c): Remove.
3380 (nios2-linux.c): Remove.
3381 (powerpc-32.c): Remove.
3382 (powerpc-32l.c): Remove.
3383 (powerpc-altivec32l.c): Remove.
3384 (powerpc-cell32l.c): Remove.
3385 (powerpc-vsx32l.c): Remove.
3386 (powerpc-isa205-32l.c): Remove.
3387 (powerpc-isa205-altivec32l.c): Remove.
3388 (powerpc-isa205-vsx32l.c): Remove.
3389 (powerpc-e500l.c): Remove.
3390 (powerpc-64l.c): Remove.
3391 (powerpc-altivec64l.c): Remove.
3392 (powerpc-cell64l.c): Remove.
3393 (powerpc-vsx64l.c): Remove.
3394 (powerpc-isa205-64l.c): Remove.
3395 (powerpc-isa205-altivec64l.c): Remove.
3396 (powerpc-isa205-vsx64l.c): Remove.
3397 (s390-linux32.c): Remove.
3398 (s390-linux32v1.c): Remove.
3399 (s390-linux32v2.c): Remove.
3400 (s390-linux64.c): Remove.
3401 (s390-linux64v1.c): Remove.
3402 (s390-linux64v2.c): Remove.
3403 (s390-te-linux64.c): Remove.
3404 (s390-vx-linux64.c): Remove.
3405 (s390-tevx-linux64.c): Remove.
3406 (s390x-linux64.c): Remove.
3407 (s390x-linux64v1.c): Remove.
3408 (s390x-linux64v2.c): Remove.
3409 (s390x-te-linux64.c): Remove.
3410 (s390x-vx-linux64.c): Remove.
3411 (s390x-tevx-linux64.c): Remove.
3412 (tic6x-c64xp-linux.c): Remove.
3413 (tic6x-c64x-linux.c): Remove.
3414 (tic6x-c62x-linux.c): Remove.
3416 (reg-sparc64.c): Remove.
3417 (reg-spu.c): Remove.
3419 (amd64-linux.c): Remove.
3420 (amd64-avx.c): Remove.
3421 (amd64-avx-linux.c): Remove.
3422 (amd64-avx-avx512.c): Remove.
3423 (amd64-avx-avx512-linux.c): Remove.
3424 (amd64-mpx.c): Remove.
3425 (amd64-mpx-linux.c): Remove.
3426 (amd64-avx-mpx-avx512-pku.c): Remove.
3427 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3428 (amd64-avx-mpx.c): Remove.
3429 (amd64-avx-mpx-linux.c): Remove.
3431 (x32-linux.c): Remove.
3432 (x32-avx.c): Remove.
3433 (x32-avx-linux.c): Remove.
3434 (x32-avx-avx512.c): Remove.
3435 (x32-avx-avx512-linux.c): Remove.
3436 (reg-xtensa.c): Remove.
3437 (reg-tilegx.c): Remove.
3438 (reg-tilegx32.c): Remove.
3440 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3442 * Makefile.in (SFILES): Add "common/environ.c".
3443 (OBJS): Add "common/environ.h".
3445 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3447 * configure.ac: Check if the fs_base and gs_base members of
3448 `struct user_regs_struct' exist.
3449 * config.in: Regenerated.
3450 * configure: Likewise.
3452 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3454 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3456 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3457 (get_next_pcs_syscall_next_pc): Likewise.
3459 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3461 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3462 * nto-x86-low.c: Likewise.
3464 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3466 * Makefile.in: Include disable-implicit-rules.mk.
3468 2016-11-23 Pedro Alves <palves@redhat.com>
3470 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3471 (debug_vprintf): Use std::chrono::steady_clock instead of
3472 gettimeofday. Use '.' instead of ':'.
3473 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3474 (get_timestamp): Use std::chrono::steady_clock instead of
3477 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3479 * Makefile.in: Fix whitespace formatting.
3481 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3483 * Makefile.in (SFILES, OBS): Flatten list and order
3486 2016-11-23 Pedro Alves <palves@redhat.com>
3488 * event-loop.c (handle_file_event): Use warning.
3489 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3490 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3493 2016-11-23 Pedro Alves <palves@redhat.com>
3495 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3497 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3498 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3499 debug_printf and debug_flush for debug output.
3500 * server.c (handle_general_set): Likewise.
3501 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3504 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3506 * Makefile.in (.c.o): Replace rule with ...
3507 (%.o: %.c): ... this one.
3509 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3511 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3512 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3514 * configure.ac: Remove checks for the make program.
3515 * configure: Re-generate.
3517 2016-10-28 Pedro Alves <palves@redhat.com>
3519 * Makefile.in (CXX_DIALECT): Get from configure.
3520 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3521 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3522 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3523 * config.in: Regenerate.
3524 * configure: Regenerate.
3526 2016-10-27 Yao Qi <yao.qi@linaro.org>
3528 * linux-low.c (linux_supports_range_stepping): Return true if
3529 can_software_single_step return true.
3531 2016-10-27 Yao Qi <yao.qi@linaro.org>
3533 * inferiors.c (find_inferior_in_random): New function.
3534 * inferiors.h (find_inferior_in_random): Declare.
3535 * linux-low.c (linux_wait_for_event_filtered): Call
3536 find_inferior_in_random instead of find_inferior.
3538 2016-10-27 Yao Qi <yao.qi@linaro.org>
3540 * linux-low.c (linux_wait_1): If single-step breakpoints are
3541 inserted, remove them.
3543 2016-10-26 Pedro Alves <palves@redhat.com>
3545 * linux-low.c (handle_extended_wait): Link parent/child fork
3547 (linux_wait_1): Unlink them.
3548 (linux_set_resume_request): Ignore resume requests for
3549 already-resumed and unhandled fork child threads.
3550 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3551 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3553 (handle_v_requests) <vCont>: Don't call require_running.
3554 * server.h (in_queued_stop_replies): New declaration.
3556 2016-10-24 Yao Qi <yao.qi@linaro.org>
3559 * linux-aarch64-low.c (append_insns): Cast the return value to
3562 2016-10-10 Yao Qi <yao.qi@linaro.org>
3564 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3566 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3568 * target.c (target_supports_multi_process): New function, moved
3570 * target.h (target_supports_multi_process): ... here. Remove
3573 2016-10-05 Tom Tromey <tom@tromey.com>
3576 * tracepoint.c (handle_tracepoint_bkpts): Check
3577 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3579 2016-10-05 Yao Qi <yao.qi@linaro.org>
3581 * configure.srv: Update the path of arm-*.xml files.
3583 2016-10-05 Terry Guo <terry.guo@arm.com>
3584 Yao Qi <yao.qi@linaro.org>
3586 * Makefile.in: Adjust the path of rules.
3587 * configure.srv: Update the path of xml files.
3588 * regformats/arm-with-iwmmxt.dat: Regenerated.
3589 * regformats/arm-with-neon.dat: Likewise.
3590 * regformats/arm-with-vfpv2.dat: Likewise.
3591 * regformats/arm-with-vfpv3.dat Likewise.
3593 2016-09-30 Yao Qi <yao.qi@linaro.org>
3596 * target.c (target_stop_and_wait): Don't call
3597 target_continue_no_signal, use resume_stop instead.
3599 2016-09-26 Yao Qi <yao.qi@linaro.org>
3601 * linux-low.c (linux_wait_1): Call debug_exit.
3603 2016-09-23 Pedro Alves <palves@redhat.com>
3605 * Makefile.in (SFILES): Add common/new-op.c.
3606 (OBS): Add common/new-op.o.
3607 (new-op.o): New rule.
3609 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3611 * .gitinore: Ignore more files.
3613 2016-09-21 Yao Qi <yao.qi@linaro.org>
3615 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3618 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3620 * server.c (start_inferior): Call target_mourn_inferior instead of
3621 mourn_inferior; pass ptid_t argument to it.
3623 (handle_target_event): Likewise.
3624 * target.c (target_mourn_inferior): New function.
3625 * target.h (mourn_inferior): Delete macro.
3627 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3629 * linux-low.c (lwp_is_stepping): New function.
3631 2016-09-06 Carl Love <cel@us.ibm.com>
3633 * server.c (start_inferior): Fixed comment, requested comment change
3634 didn't get updated correctly. Removed reference to ptrace () call as
3635 it is only true on Linux systems.
3637 2016-09-06 Carl Love <cel@us.ibm.com>
3639 * server.c (start_inferior): Do not call
3640 function target_post_create_inferior () if the
3641 inferior process has already exited.
3643 2016-09-05 Pedro Alves <palves@redhat.com>
3645 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3646 (COMPILE.pre, CC_LD): Use CXX directly.
3647 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3648 * acinclude.m4: Don't include build-with-cxx.m4.
3649 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3650 * configure: Regenerate.
3652 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3655 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3656 call writing data to own_buf.
3658 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3660 * target.c (mywait): Call target_wait instead of
3662 (target_wait): New function.
3664 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3666 * server.c (start_inferior): New variable 'ptid'. Replace calls
3667 to the_target->resume by target_continue{,_no_signal}, depending
3669 * target.c (target_stop_and_wait): Call target_continue_no_signal
3670 instead of the_target->resume.
3671 (target_continue): New function.
3673 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3675 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3677 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3680 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3682 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3683 * linux-arm-low.c (ps_get_thread_area): Likewise.
3684 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3685 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3686 * linux-mips-low.c (ps_get_thread_area): Likewise.
3687 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3688 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3689 * linux-x86-low.c (ps_get_thread_area): Likewise.
3690 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3692 2016-08-19 Pedro Alves <palves@redhat.com>
3694 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3696 2016-08-19 Pedro Alves <palves@redhat.com>
3698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3699 comment. Use memcpy instead of casting through unsigned long.
3701 2016-08-19 Pedro Alves <palves@redhat.com>
3703 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3704 allocating around 0x80000000.
3706 2016-08-19 Pedro Alves <palves@redhat.com>
3709 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3710 (x32-avx512-linux-ipa.o): New rules.
3711 * configure.ac (x86_64-*-linux*): New x32 check.
3712 * configure.srv (ipa_x32_linux_regobj): New.
3713 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3714 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3716 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3718 * configure: Regenerate.
3720 2016-08-09 Pedro Alves <palves@redhat.com>
3723 * Makefile.in (OBS): Add signals-state-save-restore.o.
3724 (signals-state-save-restore.o): New rule.
3725 * config.in: Regenerate.
3726 * configure: Regenerate.
3727 * linux-low.c: Include "signals-state-save-restore.h".
3728 (linux_create_inferior): Call
3729 restore_original_signals_state.
3730 * server.c: Include "dispositions-save-restore.h".
3731 (captured_main): Call save_original_signals_state.
3733 2016-08-05 Pedro Alves <palves@redhat.com>
3735 * configure: Regenerate.
3737 2016-08-04 Yao Qi <yao.qi@linaro.org>
3739 * linux-low.c (regsets_fetch_inferior_registers): Check
3740 errno is ESRCH or not.
3742 2016-08-02 Yao Qi <yao.qi@linaro.org>
3744 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3745 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3746 (thread_db_load_search): Update.
3747 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3748 td_ta_set_event and td_ta_event_getmsg.
3750 2016-07-26 Pedro Alves <palves@redhat.com>
3753 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3754 of unsigned long for 64-bit registers and use uint32_t instead of
3755 unsigned int for 32-bit registers.
3757 2016-07-26 Pedro Alves <palves@redhat.com>
3759 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3762 2016-07-21 Tom Tromey <tom@tromey.com>
3764 * configure: Rebuild.
3766 2016-07-21 Yao Qi <yao.qi@linaro.org>
3768 * mem-break.c (find_gdb_breakpoint): Cast bp to
3769 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3771 2016-07-21 Yao Qi <yao.qi@linaro.org>
3773 * server.c (handle_v_requests): Support s and S actions
3774 if target_supports_software_single_step return true.
3776 2016-07-21 Yao Qi <yao.qi@linaro.org>
3778 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3779 is resume_step, call maybe_hw_step.
3780 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3782 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3784 (proceed_one_lwp): If resume request is resume_step, install
3785 reinsert breakpoints and call maybe_hw_step.
3787 2016-07-21 Yao Qi <yao.qi@linaro.org>
3789 * linux-low.c (proceed_one_lwp): Declare.
3790 (linux_resume_one_thread): Remove local variable 'step'.
3791 Lift code enqueue signal. Call proceed_one_lwp instead of
3792 linux_resume_one_lwp.
3794 2016-07-21 Yao Qi <yao.qi@linaro.org>
3796 * linux-low.c (linux_resume_one_thread): Call
3797 enqueue_pending_signal.
3799 2016-07-21 Yao Qi <yao.qi@linaro.org>
3801 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3802 * inferiors.c (do_restore_current_thread_cleanup): New function.
3803 (make_cleanup_restore_current_thread): Likewise.
3804 * linux-low.c (install_software_single_step_breakpoints): Call
3805 make_cleanup_restore_current_thread. Switch current_thread to
3808 2016-07-21 Yao Qi <yao.qi@linaro.org>
3810 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3811 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3812 (clone_one_breakpoint): Likewise.
3813 (delete_reinsert_breakpoints): Change parameter to thread.
3815 (has_reinsert_breakpoints): Likewise.
3816 (uninsert_reinsert_breakpoints): Likewise.
3817 (reinsert_reinsert_breakpoints): Likewise.
3818 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3819 (delete_reinsert_breakpoints): Likewise.
3820 (reinsert_reinsert_breakpoints): Likewise.
3821 (uninsert_reinsert_breakpoints): Likewise.
3822 (has_reinsert_breakpoints): Likewise.
3824 2016-07-21 Yao Qi <yao.qi@linaro.org>
3826 * inferiors.c (get_thread_process): Make parameter const.
3827 * inferiors.h (get_thread_process): Update declaration.
3828 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3829 Add new parameters child_thread and parent_thread. Callers
3831 * mem-break.h (clone_all_breakpoints): Update declaration.
3833 2016-07-21 Yao Qi <yao.qi@linaro.org>
3835 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3836 <command_list, handler>: Remove.
3837 (struct gdb_breakpoint): New.
3838 (struct other_breakpoint): New.
3839 (struct reinsert_breakpoint): New.
3840 (is_gdb_breakpoint): New function.
3841 (any_persistent_commands): Update command_list if
3842 is_gdb_breakpoint returns true.
3843 (set_breakpoint): Create breakpoints according to their types.
3844 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3845 (set_gdb_breakpoint_1): Likewise.
3846 (set_gdb_breakpoint): Likewise.
3847 (clear_breakpoint_conditions): Change parameter type to
3848 'struct gdb_breakpoint *'.
3849 (clear_breakpoint_commands): Likewise.
3850 (clear_breakpoint_conditions_and_commands): Likewise.
3851 (add_condition_to_breakpoint): Likewise.
3852 (add_breakpoint_condition): Likewise.
3853 (add_commands_to_breakpoint): Likewise.
3854 (check_breakpoints): Check other_breakpoint.
3855 (clone_one_breakpoint): Clone breakpopint according to its type.
3856 * mem-break.h (struct gdb_breakpoint): Declare.
3857 (set_gdb_breakpoint): Update declaration.
3858 (clear_breakpoint_conditions_and_commands): Likewise.
3859 (add_breakpoint_condition): Likewise.
3860 (add_breakpoint_commands): Likewise.
3861 * server.c (process_point_options): Change parameter type to
3862 'struct gdb_breakpoint *'.
3864 2016-07-21 Yao Qi <yao.qi@linaro.org>
3866 * mem-break.c (set_breakpoint_at): Rename it to ...
3867 (set_breakpoint_type_at): ... it.
3868 (set_breakpoint_at): Call set_breakpoint_type_at.
3869 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3870 * mem-break.h (set_breakpoint_at): Update comments.
3872 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3874 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3876 (nios2_store_gregset): Likewise.
3878 2016-07-01 Pedro Alves <palves@redhat.com>
3879 Antoine Tremblay <antoine.tremblay@ericsson.com>
3881 * linux-low.c: Change interface to take the target lwp_info
3882 pointer directly and return void. Handle detaching from a zombie
3884 (linux_detach_lwp_callback): New function.
3885 (linux_detach): Detach from the leader thread after detaching from
3888 2016-06-28 Yao Qi <yao.qi@linaro.org>
3890 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3891 for variable new_offset.
3892 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3893 (aarch64_ftrace_insn_reloc_cb): Likewise.
3894 (aarch64_ftrace_insn_reloc_tb): Likewise.
3895 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3896 PRIx64 instead of PRIx32.
3898 2016-06-28 Yao Qi <yao.qi@linaro.org>
3900 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3901 (the_low_target): Install arm_get_syscall_trapinfo.
3903 2016-06-28 Yao Qi <yao.qi@linaro.org>
3905 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3907 (the_low_target): Install aarch64_get_syscall_trapinfo.
3909 2016-06-28 Yao Qi <yao.qi@linaro.org>
3911 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3913 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3914 Remove parameter sysno.
3915 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3918 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3920 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3921 (s390_emit_ne_goto): Likewise.
3922 (s390_emit_lt_goto): Likewise.
3923 (s390_emit_le_goto): Likewise.
3924 (s390_emit_gt_goto): Likewise.
3925 (s390_emit_ge_goto): Likewise.
3926 (s390x_emit_eq_goto): Likewise.
3927 (s390x_emit_ne_goto): Likewise.
3928 (s390x_emit_lt_goto): Likewise.
3929 (s390x_emit_le_goto): Likewise.
3930 (s390x_emit_gt_goto): Likewise.
3931 (s390x_emit_ge_goto): Likewise.
3932 (s390_emit_ops_impl): Mark variable static.
3933 (s390x_emit_ops): Likewise.
3935 2016-06-17 Yao Qi <yao.qi@linaro.org>
3937 * linux-low.c (handle_extended_wait): Call
3938 uninsert_reinsert_breakpoints for the parent process. Remove
3939 reinsert breakpoints from the child process. Reinsert them to
3940 the parent process when vfork is done.
3941 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3942 (reinsert_reinsert_breakpoints): New function.
3943 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3944 (reinsert_reinsert_breakpoints): Declare.
3946 2016-06-17 Yao Qi <yao.qi@linaro.org>
3948 * linux-low.c (handle_extended_wait): If the parent is doing
3949 step-over, remove the reinsert breakpoints from the forked child.
3951 2016-06-17 Yao Qi <yao.qi@linaro.org>
3953 * linux-low.c (unsuspend_all_lwps): Declare.
3954 (linux_low_filter_event): If thread exited, call finish_step_over.
3955 If step-over is finished, unsuspend other threads.
3957 2016-06-17 Yao Qi <yao.qi@linaro.org>
3959 * linux-low.c (linux_resume_one_lwp_throw): Assert
3960 has_reinsert_breakpoints returns false.
3961 * mem-break.c (delete_disabled_breakpoints): Assert
3962 bp type isn't reinsert_breakpoint.
3964 2016-06-17 Yao Qi <yao.qi@linaro.org>
3966 * linux-low.c (maybe_hw_step): New function.
3967 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3968 (finish_step_over): Switch current_thread to lwp temporarily,
3969 and assert has_reinsert_breakpoints returns true.
3970 (proceed_one_lwp): Call maybe_hw_step.
3971 * mem-break.c (has_reinsert_breakpoints): New function.
3972 * mem-break.h (has_reinsert_breakpoints): Declare.
3974 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3976 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3978 2016-05-17 Yao Qi <yao.qi@linaro.org>
3980 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3981 instead of find_inferior.
3983 2016-05-05 Yao Qi <yao.qi@linaro.org>
3985 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3986 Initialize res to zero.
3988 2016-05-05 Yao Qi <yao.qi@linaro.org>
3990 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3993 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3995 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3996 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3997 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3999 2016-04-28 Par Olsson <par.olsson@windriver.com>
4000 Simon Marchi <simon.marchi@ericsson.com>
4002 * tracepoint.c (write_inferior_int8): New function.
4003 (cmd_qtenable_disable): Write enable flag using
4004 write_inferior_int8.
4006 2016-04-25 Yao Qi <yao.qi@linaro.org>
4008 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4009 (need_step_over_p): Return zero if the LWP has pending signals
4010 can be delivered on software single step target.
4012 2016-04-25 Yao Qi <yao.qi@linaro.org>
4014 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4015 return instead of error.
4017 2016-04-22 Yao Qi <yao.qi@linaro.org>
4019 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4022 2016-04-22 Yao Qi <yao.qi@linaro.org>
4024 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4025 signal when stepping over breakpoint with software single
4028 2016-04-21 Pedro Alves <palves@redhat.com>
4030 * linux-s390-low.c (s390_collect_ptrace_register)
4031 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4033 (s390_check_regset): Use void * instead of gdb_byte *.
4035 2016-04-20 Pedro Alves <palves@redhat.com>
4037 * configure: Renegerate.
4039 2016-04-20 Yao Qi <yao.qi@linaro.org>
4041 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4042 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4044 (arm_store_gregset): Likewise.
4046 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4048 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4049 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4050 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4051 (amd64-avx-mpx-linux.c): New rules.
4052 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4053 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4054 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4055 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4056 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4057 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4058 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4059 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4060 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4061 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4062 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4063 * linux-x86-low.c (x86_linux_read_description): Add case for
4064 X86_XSTATE_AVX_MPX_MASK.
4065 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4066 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4067 init_registers_i386_avx_mpx_linux.
4068 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4069 (initialize_low_tracepoint): Call
4070 init_registers_i386_avx_mpx_linux.
4071 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4072 (initialize_low_tracepoint): Call
4073 init_registers_amd64_avx_mpx_linux.
4074 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4075 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4076 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4079 2016-04-18 Pedro Alves <palves@redhat.com>
4081 * configure: Regenerate.
4083 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4085 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4086 (aarch64_emit_sub): Likewise.
4088 2016-04-12 Pedro Alves <palves@redhat.com>
4090 * utils.c (prepare_to_throw_exception): Delete.
4092 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4094 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4096 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4098 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4100 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4102 * linux-aarch64-ipa.c: Add <elf.h> include.
4103 * linux-ppc-ipa.c: Add <elf.h> include.
4104 * linux-s390-ipa.c: Add <elf.h> include.
4106 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4108 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4109 (get_raw_reg_ptr): Likewise.
4110 (get_trace_state_variable_value_ptr): Likewise.
4111 (set_trace_state_variable_value_ptr): Likewise.
4112 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4115 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4116 Marcin Kościelnicki <koriakin@0x04.net>
4119 * linux-ppc-low.c (emit_insns): New function.
4120 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4121 (ppc_emit_prologue): New function.
4122 (ppc_emit_epilogue): New function.
4123 (ppc_emit_add): New function.
4124 (ppc_emit_sub): New function.
4125 (ppc_emit_mul): New function.
4126 (ppc_emit_lsh): New function.
4127 (ppc_emit_rsh_signed): New function.
4128 (ppc_emit_rsh_unsigned): New function.
4129 (ppc_emit_ext): New function.
4130 (ppc_emit_zero_ext): New function.
4131 (ppc_emit_log_not): New function.
4132 (ppc_emit_bit_and): New function.
4133 (ppc_emit_bit_or): New function.
4134 (ppc_emit_bit_xor): New function.
4135 (ppc_emit_bit_not): New function.
4136 (ppc_emit_equal): New function.
4137 (ppc_emit_less_signed): New function.
4138 (ppc_emit_less_unsigned): New function.
4139 (ppc_emit_ref): New function.
4140 (ppc_emit_const): New function.
4141 (ppc_emit_reg): New function.
4142 (ppc_emit_pop): New function.
4143 (ppc_emit_stack_flush): New function.
4144 (ppc_emit_swap): New function.
4145 (ppc_emit_stack_adjust): New function.
4146 (ppc_emit_call): New function.
4147 (ppc_emit_int_call_1): New function.
4148 (ppc_emit_void_call_2): New function.
4149 (ppc_emit_if_goto): New function.
4150 (ppc_emit_goto): New function.
4151 (ppc_emit_eq_goto): New function.
4152 (ppc_emit_ne_goto): New function.
4153 (ppc_emit_lt_goto): New function.
4154 (ppc_emit_le_goto): New function.
4155 (ppc_emit_gt_goto): New function.
4156 (ppc_emit_ge_goto): New function.
4157 (ppc_write_goto_address): New function.
4158 (ppc_emit_ops_impl): New static variable.
4159 (ppc64v1_emit_prologue): New function.
4160 (ppc64v2_emit_prologue): New function.
4161 (ppc64_emit_epilogue): New function.
4162 (ppc64_emit_add): New function.
4163 (ppc64_emit_sub): New function.
4164 (ppc64_emit_mul): New function.
4165 (ppc64_emit_lsh): New function.
4166 (ppc64_emit_rsh_signed): New function.
4167 (ppc64_emit_rsh_unsigned): New function.
4168 (ppc64_emit_ext): New function.
4169 (ppc64_emit_zero_ext): New function.
4170 (ppc64_emit_log_not): New function.
4171 (ppc64_emit_bit_and): New function.
4172 (ppc64_emit_bit_or): New function.
4173 (ppc64_emit_bit_xor): New function.
4174 (ppc64_emit_bit_not): New function.
4175 (ppc64_emit_equal): New function.
4176 (ppc64_emit_less_signed): New function.
4177 (ppc64_emit_less_unsigned): New function.
4178 (ppc64_emit_ref): New function.
4179 (ppc64_emit_const): New function.
4180 (ppc64v1_emit_reg): New function.
4181 (ppc64v2_emit_reg): New function.
4182 (ppc64_emit_pop): New function.
4183 (ppc64_emit_stack_flush): New function.
4184 (ppc64_emit_swap): New function.
4185 (ppc64v1_emit_call): New function.
4186 (ppc64v2_emit_call): New function.
4187 (ppc64v1_emit_int_call_1): New function.
4188 (ppc64v2_emit_int_call_1): New function.
4189 (ppc64v1_emit_void_call_2): New function.
4190 (ppc64v2_emit_void_call_2): New function.
4191 (ppc64_emit_if_goto): New function.
4192 (ppc64_emit_eq_goto): New function.
4193 (ppc64_emit_ne_goto): New function.
4194 (ppc64_emit_lt_goto): New function.
4195 (ppc64_emit_le_goto): New function.
4196 (ppc64_emit_gt_goto): New function.
4197 (ppc64_emit_ge_goto): New function.
4198 (ppc64v1_emit_ops_impl): New static variable.
4199 (ppc64v2_emit_ops_impl): New static variable.
4200 (ppc_emit_ops): New function.
4201 (linux_low_target): Wire in ppc_emit_ops.
4203 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4204 Marcin Kościelnicki <koriakin@0x04.net>
4207 * Makefile.in: Add powerpc-*-ipa.o
4208 * configure.srv: Add ipa_obj for powerpc*-linux.
4209 * linux-ppc-ipa.c: New file.
4210 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4212 (PPC_FIELD): New macro.
4213 (PPC_SEXT): New macro.
4214 (PPC_OP6): New macro.
4215 (PPC_BO): New macro.
4216 (PPC_LI): New macro.
4217 (PPC_BD): New macro.
4218 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4219 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4220 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4221 (ppc_get_thread_area): New function.
4222 (is_elfv2_inferior): New function.
4223 (gen_ds_form): New function.
4224 (GEN_STD): New macro.
4225 (GEN_STDU): New macro.
4226 (GEN_LD): New macro.
4227 (GEN_LDU): New macro.
4228 (gen_d_form): New function.
4229 (GEN_ADDI): New macro.
4230 (GEN_ADDIS): New macro.
4231 (GEN_LI): New macro.
4232 (GEN_LIS): New macro.
4233 (GEN_ORI): New macro.
4234 (GEN_ORIS): New macro.
4235 (GEN_LWZ): New macro.
4236 (GEN_STW): New macro.
4237 (GEN_STWU): New macro.
4238 (gen_xfx_form): New function.
4239 (GEN_MFSPR): New macro.
4240 (GEN_MTSPR): New macro.
4241 (GEN_MFCR): New macro.
4242 (GEN_MTCR): New macro.
4243 (GEN_SYNC): New macro.
4244 (GEN_LWSYNC): New macro.
4245 (gen_x_form): New function.
4246 (GEN_OR): New macro.
4247 (GEN_MR): New macro.
4248 (GEN_LWARX): New macro.
4249 (GEN_STWCX): New macro.
4250 (GEN_CMPW): New macro.
4251 (gen_md_form): New function.
4252 (GEN_RLDICL): New macro.
4253 (GEN_RLDICR): New macro.
4254 (gen_i_form): New function.
4256 (GEN_BL): New macro.
4257 (gen_b_form): New function.
4258 (GEN_BNE): New macro.
4259 (GEN_LOAD): New macro.
4260 (GEN_STORE): New macro.
4261 (gen_limm): New function.
4262 (gen_atomic_xchg): New function.
4263 (gen_call): New function.
4264 (ppc_relocate_instruction): New function.
4265 (ppc_install_fast_tracepoint_jump_pad): New function.
4266 (ppc_get_min_fast_tracepoint_insn_len): New function.
4267 (ppc_get_ipa_tdesc_idx): New function.
4268 (the_low_target): Wire in the new functions.
4269 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4271 * linux-ppc-tdesc.h: New file.
4273 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4275 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4276 (alloc_jump_pad_buffer): New function.
4277 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4278 (alloc_jump_pad_buffer): New function.
4279 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4280 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4281 (alloc_jump_pad_buffer): New function.
4282 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4283 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4284 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4285 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4287 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4289 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4290 * linux-amd64-ipa.c: Likewise.
4291 * linux-i386-ipa.c: Likewise.
4292 * linux-s390-ipa.c: Likewise.
4293 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4294 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4295 set_trace_state_variable_value_ptr.
4296 (struct ipa_sym_addresses): Likewise.
4297 (symbol_list): Likewise.
4298 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4299 accessing gdb_collect directly.
4300 (gdb_collect_ptr_type): New typedef.
4301 (get_raw_reg_ptr_type): New typedef.
4302 (get_trace_state_variable_value_ptr_type): New typedef.
4303 (set_trace_state_variable_value_ptr_type): New typedef.
4304 (gdb_collect_ptr): New global.
4305 (get_raw_reg_ptr): New global.
4306 (get_trace_state_variable_value_ptr): New global.
4307 (set_trace_state_variable_value_ptr): New global.
4308 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4309 accessing get_raw_reg directly.
4310 (get_get_tsv_func_addr): Likewise for
4311 get_trace_state_variable_value_ptr.
4312 (get_set_tsv_func_addr): Likewise for
4313 set_trace_state_variable_value_ptr.
4314 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4316 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4318 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4320 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4322 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4324 (relocate_instruction): Remove own_buf.
4325 * server.c (own_buf): Make global.
4326 (handle_v_requests): Make global.
4327 * server.h (own_buf): New declaration.
4328 (handle_v_requests): New prototype.
4330 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4333 * linux-s390-low.c (add_insns): New function.
4334 (s390_emit_prologue): New function.
4335 (s390_emit_epilogue): New function.
4336 (s390_emit_add): New function.
4337 (s390_emit_sub): New function.
4338 (s390_emit_mul): New function.
4339 (s390_emit_lsh): New function.
4340 (s390_emit_rsh_signed): New function.
4341 (s390_emit_rsh_unsigned): New function.
4342 (s390_emit_ext): New function.
4343 (s390_emit_log_not): New function.
4344 (s390_emit_bit_and): New function.
4345 (s390_emit_bit_or): New function.
4346 (s390_emit_bit_xor): New function.
4347 (s390_emit_bit_not): New function.
4348 (s390_emit_equal): New function.
4349 (s390_emit_less_signed): New function.
4350 (s390_emit_less_unsigned): New function.
4351 (s390_emit_ref): New function.
4352 (s390_emit_if_goto): New function.
4353 (s390_emit_goto): New function.
4354 (s390_write_goto_address): New function.
4355 (s390_emit_litpool): New function.
4356 (s390_emit_const): New function.
4357 (s390_emit_call): New function.
4358 (s390_emit_reg): New function.
4359 (s390_emit_pop): New function.
4360 (s390_emit_stack_flush): New function.
4361 (s390_emit_zero_ext): New function.
4362 (s390_emit_swap): New function.
4363 (s390_emit_stack_adjust): New function.
4364 (s390_emit_set_r2): New function.
4365 (s390_emit_int_call_1): New function.
4366 (s390_emit_void_call_2): New function.
4367 (s390_emit_eq_goto): New function.
4368 (s390_emit_ne_goto): New function.
4369 (s390_emit_lt_goto): New function.
4370 (s390_emit_le_goto): New function.
4371 (s390_emit_gt_goto): New function.
4372 (s390_emit_ge_goto): New function.
4373 (s390x_emit_prologue): New function.
4374 (s390x_emit_epilogue): New function.
4375 (s390x_emit_add): New function.
4376 (s390x_emit_sub): New function.
4377 (s390x_emit_mul): New function.
4378 (s390x_emit_lsh): New function.
4379 (s390x_emit_rsh_signed): New function.
4380 (s390x_emit_rsh_unsigned): New function.
4381 (s390x_emit_ext): New function.
4382 (s390x_emit_log_not): New function.
4383 (s390x_emit_bit_and): New function.
4384 (s390x_emit_bit_or): New function.
4385 (s390x_emit_bit_xor): New function.
4386 (s390x_emit_bit_not): New function.
4387 (s390x_emit_equal): New function.
4388 (s390x_emit_less_signed): New function.
4389 (s390x_emit_less_unsigned): New function.
4390 (s390x_emit_ref): New function.
4391 (s390x_emit_if_goto): New function.
4392 (s390x_emit_const): New function.
4393 (s390x_emit_call): New function.
4394 (s390x_emit_reg): New function.
4395 (s390x_emit_pop): New function.
4396 (s390x_emit_stack_flush): New function.
4397 (s390x_emit_zero_ext): New function.
4398 (s390x_emit_swap): New function.
4399 (s390x_emit_stack_adjust): New function.
4400 (s390x_emit_int_call_1): New function.
4401 (s390x_emit_void_call_2): New function.
4402 (s390x_emit_eq_goto): New function.
4403 (s390x_emit_ne_goto): New function.
4404 (s390x_emit_lt_goto): New function.
4405 (s390x_emit_le_goto): New function.
4406 (s390x_emit_gt_goto): New function.
4407 (s390x_emit_ge_goto): New function.
4408 (s390_emit_ops): New function.
4409 (struct linux_target_ops): Fill in emit_ops hook.
4411 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4414 * Makefile.in: Add s390 IPA files.
4415 * configure.srv: Build IPA for s390.
4416 * linux-s390-ipa.c: New file.
4417 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4418 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4419 (tdesc_s390_linux32): Likewise.
4420 (init_registers_s390_linux32v1): Likewise.
4421 (tdesc_s390_linux32v1): Likewise.
4422 (init_registers_s390_linux32v2): Likewise.
4423 (tdesc_s390_linux32v2): Likewise.
4424 (init_registers_s390_linux64): Likewise.
4425 (tdesc_s390_linux64): Likewise.
4426 (init_registers_s390_linux64v1): Likewise.
4427 (tdesc_s390_linux64v1): Likewise.
4428 (init_registers_s390_linux64v2): Likewise.
4429 (tdesc_s390_linux64v2): Likewise.
4430 (init_registers_s390_te_linux64): Likewise.
4431 (tdesc_s390_te_linux64): Likewise.
4432 (init_registers_s390_vx_linux64): Likewise.
4433 (tdesc_s390_vx_linux64): Likewise.
4434 (init_registers_s390_tevx_linux64): Likewise.
4435 (tdesc_s390_tevx_linux64): Likewise.
4436 (init_registers_s390x_linux64): Likewise.
4437 (tdesc_s390x_linux64): Likewise.
4438 (init_registers_s390x_linux64v1): Likewise.
4439 (tdesc_s390x_linux64v1): Likewise.
4440 (init_registers_s390x_linux64v2): Likewise.
4441 (tdesc_s390x_linux64v2): Likewise.
4442 (init_registers_s390x_te_linux64): Likewise.
4443 (tdesc_s390x_te_linux64): Likewise.
4444 (init_registers_s390x_vx_linux64): Likewise.
4445 (tdesc_s390x_vx_linux64): Likewise.
4446 (init_registers_s390x_tevx_linux64): Likewise.
4447 (tdesc_s390x_tevx_linux64): Likewise.
4448 (have_hwcap_s390_vx): New static variable.
4449 (s390_arch_setup): Fill have_hwcap_s390_vx.
4450 (s390_get_thread_area): New function.
4451 (s390_ft_entry_gpr_esa): New const.
4452 (s390_ft_entry_gpr_zarch): New const.
4453 (s390_ft_entry_misc): New const.
4454 (s390_ft_entry_fr): New const.
4455 (s390_ft_entry_vr): New const.
4456 (s390_ft_main_31): New const.
4457 (s390_ft_main_64): New const.
4458 (s390_ft_exit_fr): New const.
4459 (s390_ft_exit_vr): New const.
4460 (s390_ft_exit_misc): New const.
4461 (s390_ft_exit_gpr_esa): New const.
4462 (s390_ft_exit_gpr_zarch): New const.
4463 (append_insns): New function.
4464 (s390_relocate_instruction): New function.
4465 (s390_install_fast_tracepoint_jump_pad): New function.
4466 (s390_get_min_fast_tracepoint_insn_len): New function.
4467 (s390_get_ipa_tdesc_idx): New function.
4468 (struct linux_target_ops): Wire in the above functions.
4469 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4470 * linux-s390-tdesc.h: New file.
4472 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4474 * linux-s390-low.c (s390_supports_tracepoints): New function.
4475 (struct linux_target_ops): Fill supports_tracepoints hook.
4477 2016-03-18 Yao Qi <yao.qi@linaro.org>
4479 * linux-low.c (lwp_signal_can_be_delivered): New function.
4480 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4482 2016-03-18 Yao Qi <yao.qi@linaro.org>
4484 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4485 0 if signal is enqueued. Remove 'signal' from one debugging
4486 message. Move one debugging message to some lines below.
4487 Remove code setting 'signal' to 0.
4489 2016-03-18 Yao Qi <yao.qi@linaro.org>
4491 * linux-low.c (linux_low_filter_event): Remove redundant
4492 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4494 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4496 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4497 (struct linux_target_ops): Wire in the above.
4499 2016-03-03 Yao Qi <yao.qi@linaro.org>
4501 * linux-low.c: Update comments to start_step_over.
4503 2016-03-03 Yao Qi <yao.qi@linaro.org>
4506 * linux-low.c (handle_extended_wait): Set child suspended
4507 if event_lwp->bp_reinsert isn't zero.
4509 2016-03-02 Yao Qi <yao.qi@linaro.org>
4511 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4512 enqueue_pending_signal.
4514 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4516 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4519 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4521 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4522 (s390_regmap_3264) [!__s390x__]: New global.
4523 (s390_collect_ptrace_register): Skip map entries containing -1.
4524 (s390_supply_ptrace_register): Ditto.
4525 (s390_fill_gprs_high): New function.
4526 (s390_store_gprs_high): New function.
4527 (s390_regsets): Add NT_S390_HIGH_GPRS.
4528 (s390_get_hwcap): Enable on 31-bit.
4529 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4530 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4531 Detect NT_S390_HIGH_GPRS.
4532 (s390_usrregs_info_3264): Enable on 31-bit.
4533 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4534 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4536 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4539 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4540 * configure.srv: Ditto.
4541 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4542 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4543 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4544 (init_registers_amd64_linux): Remove prototype.
4545 (tdesc_amd64_linux): Remove declaration.
4546 (get_ipa_tdesc): New function.
4547 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4548 initialize remaining tdescs.
4549 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4550 (init_registers_i386_linux): Remove prototype.
4551 (tdesc_i386_linux): Remove declaration.
4552 (get_ipa_tdesc): New function.
4553 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4554 initialize remaining tdescs.
4555 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4556 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4557 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4558 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4559 (x86_get_ipa_tdesc_idx): New function.
4560 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4561 * linux-x86-tdesc.h: New file.
4562 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4563 (target_get_ipa_tdesc_idx): New macro.
4564 * tracepoint.c (ipa_tdesc_idx): New macro.
4565 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4566 (symbol_list): Add ipa_tdesc_idx.
4567 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4568 (ipa_tdesc): Remove.
4569 (ipa_tdesc_idx): New variable.
4570 (get_context_regcache): Use get_ipa_tdesc.
4571 (gdb_collect): Ditto.
4573 * tracepoint.h (get_ipa_tdesc): New prototype.
4574 (ipa_tdesc): Remove.
4576 2016-02-24 Pedro Alves <palves@redhat.com>
4578 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4579 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4580 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4581 Factor out common code between the USE_SIGTRAP_SIGINFO and
4582 !USE_SIGTRAP_SIGINFO blocks.
4583 (linux_low_filter_event): Call save_stop_reason instead of
4584 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4586 (linux_wait_1): Update comments.
4588 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4590 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4591 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4592 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4593 ppc_insert_point, ppc_remove_point.
4595 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4597 * linux-s390-low.c (s390_supports_z_point_type): New function.
4598 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4600 2016-02-16 Yao Qi <yao.qi@linaro.org>
4602 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4603 PC. Get pc from regcache_read_pc.
4605 2016-02-12 Yao Qi <yao.qi@linaro.org>
4607 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4608 or linux_get_pc_32bit.
4609 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4611 2016-02-12 Yao Qi <yao.qi@linaro.org>
4613 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4614 arm_linux_get_next_pcs_fixup.
4616 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4618 * tracepoint.c (x_tracepoint_action_download): Change
4619 write_inferior_data_ptr to write_inferior_data_pointer.
4620 (cmd_qtstart): Likewise.
4621 (write_inferior_data_ptr): Remove.
4622 (download_agent_expr): Change write_inferior_data_ptr to
4623 write_inferior_data_pointer.
4624 (download_tracepoint_1): Likewise.
4625 (download_tracepoint): Likewise.
4626 (download_trace_state_variables): Likewise.
4628 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4629 Marcin Kościelnicki <koriakin@0x04.net>
4631 * tracepoint.c (struct tracepoint_action_ops): Remove.
4632 (struct tracepoint_action): Remove ops.
4633 (m_tracepoint_action_download, r_tracepoint_action_download)
4634 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4635 size and offset accordingly.
4636 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4637 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4638 (tracepoint_action_send, tracepoint_action_download): New functions.
4639 Helpers for trace action handlers.
4640 (add_tracepoint_action): Remove setup actions ops.
4641 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4643 2016-02-10 Yao Qi <yao.qi@linaro.org>
4645 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4647 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4649 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4651 * configure: Regenerate.
4653 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4655 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4656 void * to gdb_byte *.
4657 * linux-low.c (siginfo_fixup): Likewise.
4658 (linux_xfer_siginfo): Likewise.
4659 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4661 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4663 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4665 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4667 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4669 * linux-x86-low.c [__x86_64__]: Include
4670 "nat/amd64-linux-siginfo.h".
4671 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4672 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4673 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4674 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4675 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4676 (cpt_si_fd, si_timerid, si_overrun): Move from
4677 nat/amd64-linux-siginfo.c.
4678 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4680 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4682 * server.c (skip_to_semicolon): Remove.
4683 (process_point_options): Use strchrnul instead of
4686 2016-01-26 Yao Qi <yao.qi@linaro.org>
4688 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4689 * linux-low.c (install_software_single_step_breakpoints): Don't
4690 call regcache_read_pc.
4691 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4694 2016-01-26 Yao Qi <yao.qi@linaro.org>
4696 * linux-low.c (install_software_single_step_breakpoints): Call
4697 regcache_read_pc instead of get_pc.
4699 2016-01-26 Yao Qi <yao.qi@linaro.org>
4701 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4702 (unblock_async_io): Rename to ...
4703 (block_unblock_async_io): ... it. New function.
4704 (enable_async_io): Don't install SIGIO handler. Unblock it
4706 (disable_async_io): Don't ignore SIGIO. Block it instead.
4707 (initialize_async_io): Install SIGIO handler. Don't call
4710 2016-01-26 Yao Qi <yao.qi@linaro.org>
4712 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4713 first character is '\003', call *the_target->request_interrupt.
4715 2016-01-25 Yao Qi <yao.qi@linaro.org>
4717 * remote-utils.c (new_thread_notify): Remove.
4718 (dead_thread_notify): Likewise.
4719 * remote-utils.h (new_thread_notify): Remove declaration.
4720 (dead_thread_notify): Likewise.
4722 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4724 * gdb.trace/pending.exp: Fix expected message on continue.
4726 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4728 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4729 it works properly on big-endian machines where sizeof (CORE_ADDR)
4732 2016-01-21 Pedro Alves <palves@redhat.com>
4734 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4735 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4736 * configure: Regenerate.
4738 2016-01-21 Yao Qi <yao.qi@linaro.org>
4740 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4741 is_thumb and set it according to CPSR saved on the stack.
4742 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4743 arm_sigreturn_next_pc.
4745 2016-01-18 Yao Qi <yao.qi@linaro.org>
4747 * linux-low.c (linux_set_pc_64bit): New function.
4748 (linux_get_pc_64bit): New function.
4749 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4751 * linux-sparc-low.c (debug_threads): Remove declaration.
4752 (sparc_get_pc): Remove.
4753 (the_low_target): Use linux_get_pc_64bit instead of
4755 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4756 (the_low_target): Use linux_get_pc_64bit and
4759 2016-01-18 Yao Qi <yao.qi@linaro.org>
4761 * linux-arm-low.c (debug_threads): Remove declaration.
4762 (arm_get_pc, arm_set_pc): Remove.
4763 (the_low_target): Use linux_get_pc_32bit and
4765 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4766 (the_low_target): Use linux_get_pc_32bit and
4768 * linux-cris-low.c (debug_threads): Remove declaration.
4769 (cris_get_pc, cris_set_pc,): Remove.
4770 (the_low_target): Use linux_get_pc_32bit and
4772 * linux-crisv32-low.c (debug_threads): Remove declaration.
4773 (cris_get_pc, cris_set_pc): Remove.
4774 (the_low_target): Use linux_get_pc_32bit and
4776 * linux-low.c: Include inttypes.h.
4777 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4778 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4779 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4780 (the_low_target): Use linux_get_pc_32bit and
4782 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4783 (the_low_target): Use linux_get_pc_32bit and
4785 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4786 (the_low_target): Use linux_get_pc_32bit and
4788 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4789 (the_low_target): Use linux_get_pc_32bit and
4791 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4792 (the_low_target): Use linux_get_pc_32bit and
4795 2016-01-18 Gary Benson <gbenson@redhat.com>
4797 * configure.ac (AC_FUNC_FORK): New check.
4798 * config.in: Regenerate.
4799 * configure: Likewise.
4801 2016-01-14 Yao Qi <yao.qi@linaro.org>
4803 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4804 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4805 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4806 arm_get_next_pcs_ctor.
4808 2016-01-12 Josh Stone <jistone@redhat.com>
4809 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4811 * inferiors.h: Include "gdb_vecs.h".
4812 (struct process_info): Add syscalls_to_catch.
4813 * inferiors.c (remove_process): Free syscalls_to_catch.
4814 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4815 syscall_return stops.
4816 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4817 * server.c (handle_general_set): Handle QCatchSyscalls.
4818 (handle_query): Report support for QCatchSyscalls.
4819 * target.h (struct target_ops): Add supports_catch_syscall.
4820 (target_supports_catch_syscall): New macro.
4821 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4822 (struct lwp_info): Add syscall_state.
4823 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4824 Maintain syscall_state and syscalls_to_catch across exec.
4825 (get_syscall_trapinfo): New function, proxy to the_low_target.
4826 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4827 (linux_low_filter_event): Toggle syscall_state entry/return for
4828 syscall traps, and set it ignored for all others.
4829 (gdb_catching_syscalls_p): New function.
4830 (gdb_catch_this_syscall_p): New function.
4831 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4832 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4833 (linux_supports_catch_syscall): New function.
4834 (linux_target_ops): Install it.
4835 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4836 (the_low_target): Install it.
4838 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4840 * acinclude.m4: Include new ../warning.m4 file.
4841 * configure: Regenerated.
4842 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4844 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4846 * ax.c (is_goto_target): Mark static.
4847 * linux-low.c (register_addr): Likewise.
4848 (linux_fetch_registers, linux_store_registers): Likewise.
4849 * mem-break.c (any_persistent_commands): Fix old prototype.
4850 (add_commands_to_breakpoint): Mark static.
4851 * regcache.c (find_register_by_name): Delete unused func.
4852 * remote-utils.c (hex_or_minus_one): Mark static.
4853 * server.c (monitor_show_help): Mark static.
4854 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4855 handle_v_requests): Likewise.
4857 2016-01-12 Pedro Alves <palves@redhat.com>
4859 Remove use of the registered trademark symbol throughout.
4861 2016-01-08 Yao Qi <yao.qi@linaro.org>
4863 * remote-utils.c (getpkt): If c is '\003', call target hook
4866 2016-01-06 Yao Qi <yao.qi@linaro.org>
4868 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4869 linux-aarch32-low.c.
4870 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4871 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4872 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4873 (thumb2_breakpoint): Declare.
4874 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4875 linux-aarch32-low.h.
4876 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4877 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4878 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4880 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4882 * gdbreplay.c (gdbreplay_version): Change copyright year in
4884 * server.c (gdbserver_version): Likewise.
4886 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4888 * server.c (crc32_table): Delete.
4889 (crc32): Use libiberty's xcrc32 function.
4891 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4893 * lynx-low.c (lynx_delete_thread_callback): New function.
4894 (lynx_mourn): Properly delete our process and all of its
4895 threads. Remove call to clear_inferiors.
4897 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4899 * target.c (thread_search_callback): Add check that
4900 the thread_stopped target callback is not NULL before
4903 2015-12-21 Yao Qi <yao.qi@linaro.org>
4905 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4908 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4910 * server.c (handle_query): Call target_supports_software_single_step.
4912 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4914 * linux-low.c (single_step): New function.
4915 (linux_resume_one_lwp_throw): Call single_step.
4916 (start_step_over): Likewise.
4918 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4920 * Makefile.in (SFILES): Append arch/arm-linux.c,
4921 arch/arm-get-next-pcs.c.
4922 (arm-linux.o): New rule.
4923 (arm-get-next-pcs.o): New rule.
4924 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4926 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4927 to linux-aarch32-low.c.
4928 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4929 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4930 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4931 (thumb2_breakpoint_len): Likewise.
4932 (arm_is_thumb_mode): Make non-static.
4933 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4934 from linux-aarch32-low.c.
4935 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4936 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4937 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4938 (thumb2_breakpoint_len): Likewise.
4939 (arm_is_thumb_mode): New declaration.
4940 * linux-arm-low.c: Include arch/arm-linux.h
4941 aarch/arm-get-next-pcs.h, sys/syscall.h.
4942 (get_next_pcs_ops): New struct.
4943 (get_next_pcs_addr_bits_remove): New function.
4944 (get_next_pcs_is_thumb): New function.
4945 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4946 (arm_sigreturn_next_pc): Likewise.
4947 (get_next_pcs_syscall_next_pc): Likewise.
4948 (arm_gdbserver_get_next_pcs): Likewise.
4949 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4951 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4952 * server.h: Include gdb_vecs.h.
4954 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4956 * Makefile.in (SFILES): Append common/common-regcache.c.
4957 (OBS): Append common-regcache.o.
4958 (common-regcache.o): New rule.
4959 * regcache.c (init_register_cache): Initialize cache to
4961 (regcache_raw_read_unsigned): New function.
4962 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4963 register_status enum.
4965 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4967 * linux-aarch64-low.c (the_low_targets): Rename
4968 breakpoint_reinsert_addr to get_next_pcs.
4969 * linux-arm-low.c (the_low_targets): Likewise.
4970 * linux-bfin-low.c (the_low_targets): Likewise.
4971 * linux-cris-low.c (the_low_targets): Likewise.
4972 * linux-crisv32-low.c (the_low_targets): Likewise.
4973 * linux-low.c (can_software_single_step): Likewise.
4974 (install_software_single_step_breakpoints): New function.
4975 (start_step_over): Use install_software_single_step_breakpoints.
4976 * linux-low.h: New CORE_ADDR vector.
4977 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4979 * linux-mips-low.c (the_low_targets): Likewise.
4980 * linux-nios2-low.c (the_low_targets): Likewise.
4981 * linux-sparc-low.c (the_low_targets): Likewise.
4983 2015-12-17 Pedro Alves <palves@redhat.com>
4985 * linux-low.c (linux_kill_one_lwp): Remove references to
4987 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4989 (linux_init_signals): Delete.
4990 (initialize_low): Adjust.
4991 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4993 2015-12-16 Pedro Alves <palves@redhat.com>
4995 * configure.ac (compiler warning flags): When testing a
4996 -Wno-foo option, check whether -Wfoo works instead.
4997 * configure: Regenerate.
4999 2015-12-11 Don Breazeal <donb@codesourcery.com>
5001 * server.c (process_serial_event): Don't exit from gdbserver
5002 in remote mode if there are still active inferiors.
5004 2015-12-11 Yao Qi <yao.qi@linaro.org>
5006 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5007 arm_breakpoint_at if the process is 32-bit.
5009 2015-12-11 Yao Qi <yao.qi@linaro.org>
5011 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5014 2015-12-07 Yao Qi <yao.qi@linaro.org>
5016 * configure.srv: Append arm.o to srv_tgtobj for
5017 aarch64*-*-linux* target.
5018 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5019 from linux-arm-low.c.
5020 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5021 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5022 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5023 (thumb2_breakpoint_len): Likewise.
5024 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5025 (arm_breakpoint_kinds): Likewise.
5026 (arm_breakpoint_kind_from_pc): Likewise.
5027 (arm_sw_breakpoint_from_kind): Likewise.
5028 (arm_breakpoint_kind_from_current_state): Likewise.
5029 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5030 (arm_sw_breakpoint_from_kind): Declare.
5031 (arm_breakpoint_kind_from_current_state): Declare.
5032 (arm_breakpoint_at): Declare.
5033 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5034 arm_sw_breakpoint_from_kind if process is 32-bit.
5035 (aarch64_breakpoint_kind_from_pc): New function.
5036 (aarch64_breakpoint_kind_from_current_state): New function.
5037 (the_low_target): Initialize fields breakpoint_kind_from_pc
5038 and breakpoint_kind_from_current_state.
5039 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5040 linux-aarch32-low.c.
5041 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5042 (arm_breakpoint, arm_breakpoint_len): Likewise.
5043 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5044 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5045 (arm_is_thumb_mode): Likewise.
5046 (arm_breakpoint_at): Likewise.
5047 (arm_breakpoint_kind_from_pc): Likewise.
5048 (arm_sw_breakpoint_from_kind): Likewise.
5049 (arm_breakpoint_kind_from_current_state): Likewise.
5052 2015-08-04 Yao Qi <yao.qi@linaro.org>
5054 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5055 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5056 * server.c (extended_protocol): Remove "static".
5057 * server.h (extended_protocol): Declare it.
5059 2015-12-04 Josh Stone <jistone@redhat.com>
5061 * target.h (struct target_ops) <arch_setup>: Rename to ...
5062 (struct target_ops) <post_create_inferior>: ... this.
5063 (target_arch_setup): Rename to ...
5064 (target_post_create_inferior): ... this, calling post_create_inferior.
5065 * server.c (start_inferior): Update target_arch_setup calls to
5066 target_post_create_inferior.
5067 * linux-low.c (linux_low_ptrace_options): Forward declare.
5068 (linux_arch_setup): Update its comment for general use.
5069 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5070 (struct linux_target_ops): Use linux_post_create_inferior.
5071 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5072 to post_create_inferior.
5073 * nto-low.c (struct nto_target_ops): Likewise.
5074 * spu-low.c (struct spu_target_ops): Likewise.
5075 * win32-low.c (struct win32_target_ops): Likewise.
5077 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5079 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5081 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5083 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5084 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5085 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5086 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5087 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5088 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5089 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5090 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5091 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5092 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5093 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5094 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5096 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5098 * linux-low.c (linux_look_up_symbols): Don't call
5099 linux_supports_traceclone.
5100 * linux-low.h (thread_db_init): Remove use_events argument.
5101 * thread-db.c (thread_db_use_event): Remove global variable.
5102 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5103 (struct thread_db) <td_create_bp>: Remove field.
5104 (thread_db_create_event): Remove function.
5105 (thread_db_enable_reporting): Likewise.
5106 (find_one_thread): Don't check for thread_db_use_events.
5107 (attach_thread): Likewise.
5108 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5109 (try_thread_db_load_1): Don't check for thread_db_use_events.
5110 (thread_db_init): Remove use_events argument and thread events
5112 (remove_thread_event_breakpoints): Remove function.
5113 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5115 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5117 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5120 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5121 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5122 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5123 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5125 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5128 * linux-low.c (can_hardware_single_step): Use
5129 supports_hardware_single_step.
5130 (can_software_single_step): New function.
5131 (start_step_over): Call can_software_single_step.
5132 (linux_supports_hardware_single_step): New function.
5133 (struct target_ops) <supports_software_single_step>: Initialize.
5134 * linux-low.h (struct linux_target_ops)
5135 <supports_hardware_single_step>: Initialize.
5136 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5138 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5139 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5140 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5142 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5144 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5145 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5147 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5148 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5150 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5151 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5152 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5154 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5155 * target.h (struct target_ops): <supports_software_single_step>:
5157 (target_supports_software_single_step): New macro.
5159 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5161 * linux-low.c (linux_wait_1): Fix pc advance condition.
5162 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5163 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5165 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5167 * linux-arm-low.c (arm_is_thumb_mode): New function.
5168 (arm_breakpoint_at): Use arm_is_thumb_mode.
5169 (arm_breakpoint_kind_from_current_state): New function.
5170 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5172 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5173 (linux_breakpoint_kind_from_current_state): New function.
5174 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5175 * linux-low.h (struct linux_target_ops)
5176 <breakpoint_kind_from_current_state>: New field.
5177 * target.h (struct target_ops): Likewise.
5178 (target_breakpoint_kind_from_current_state): New macro.
5180 2015-11-30 Pedro Alves <palves@redhat.com>
5182 * linux-low.c (linux_resume): Wake up the event loop before
5185 2015-11-30 Pedro Alves <palves@redhat.com>
5187 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5189 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5191 * target.c (struct thread_search): New structure.
5192 (thread_search_callback): New function.
5193 (prev_general_thread): New global.
5194 (prepare_to_access_memory, done_accessing_memory): New functions.
5195 * target.h (prepare_to_access_memory, done_accessing_memory):
5196 Replace macros with function declarations.
5198 2015-11-30 Pedro Alves <palves@redhat.com>
5201 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5202 report TARGET_WAITKIND_NO_RESUMED.
5203 * remote-utils.c (prepare_resume_reply): Handle
5204 TARGET_WAITKIND_NO_RESUMED.
5205 * server.c (report_no_resumed): New global.
5206 (handle_query) <qSupported>: Handle "no-resumed+". Report
5207 "no-resumed+" support.
5208 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5209 return error if the client doesn't support no-resumed events.
5210 (push_stop_notification): New function.
5211 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5212 events if the client supports them.
5214 2015-11-30 Pedro Alves <palves@redhat.com>
5216 * linux-low.c (thread_still_has_status_pending_p): Don't check
5218 (lwp_resumed): New function.
5219 (status_pending_p_callback): Return early if the LWP is not
5220 supposed to be resumed.
5222 2015-11-30 Pedro Alves <palves@redhat.com>
5224 * linux-low.c (handle_extended_wait): Assert that the LWP's
5225 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5226 thread create events, leave the new child's status pending.
5227 (linux_low_filter_event): If GDB wants to hear about thread exit
5228 events, leave the LWP marked dead and don't delete it.
5229 (linux_wait_for_event_filtered): Don't check for thread exit.
5230 (filter_exit_event): New function.
5231 (linux_wait_1): Use it, when returning an exit event.
5232 (linux_resume_one_lwp_throw): Assert that the LWP's
5233 waitstatus is TARGET_WAITKIND_IGNORE.
5234 * remote-utils.c (prepare_resume_reply): Handle
5235 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5236 * server.c (report_thread_events): New global.
5237 (handle_general_set): Handle QThreadEvents.
5238 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5239 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5240 TARGET_WAITKIND_THREAD_EXITED.
5241 * server.h (report_thread_events): Declare.
5243 2015-11-30 Pedro Alves <palves@redhat.com>
5245 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5246 the thread's last_resume_kind was resume_stop.
5248 2015-11-30 Pedro Alves <palves@redhat.com>
5250 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5253 2015-11-30 Pedro Alves <palves@redhat.com>
5255 * server.c (handle_v_requests): Handle vCtrlC.
5257 2015-11-30 Pedro Alves <palves@redhat.com>
5259 * gdbthread.h (find_any_thread_of_pid): Declare.
5260 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5262 * server.c (handle_query): If current_thread is NULL, look for
5263 another thread of the selected process.
5265 2015-11-26 Daniel Colascione <dancol@dancol.org>
5266 Simon Marchi <simon.marchi@ericsson.com>
5268 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5269 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5271 * target.h (struct target_ops) <thread_name>: New field.
5272 (target_thread_name): New macro.
5274 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5276 * regcache.h (regcache_invalidate_pid): Add declaration.
5277 * regcache.c (regcache_invalidate_pid): New function, extracted
5278 from regcache_invalidate.
5279 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5280 Add trivial documentation comment.
5281 * lynx-low.c: Use regcache_invalidate_pid instead of
5282 regcache_invalidate.
5284 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5286 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5287 and Elf64_auxv_t if the target is Android.
5289 2015-11-22 Doug Evans <xdje42@gmail.com>
5291 * target.h: #include <sys/types.h>.
5293 2015-11-19 Pedro Alves <palves@redhat.com>
5295 * linux-low.c (linux_process_qsupported): Change prototype.
5297 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5299 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5300 and adjust to loop over all features.
5301 * server.c (handle_query) <qSupported>: Adjust to call
5302 target_process_qsupported once, passing it a vector of unprocessed
5304 * target.h (struct target_ops) <process_qsupported>: Change
5306 (target_process_qsupported): Adjust.
5308 2015-11-19 Pedro Alves <palves@redhat.com>
5310 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5312 * configure: Regenerate.
5314 2015-11-19 Pedro Alves <palves@redhat.com>
5316 * configure: Regenerate.
5318 2015-11-19 Yao Qi <yao.qi@linaro.org>
5320 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5323 2015-11-19 Yao Qi <yao.qi@linaro.org>
5325 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5326 (struct aarch64_operand): Move enum out.
5328 2015-11-19 Yao Qi <yao.qi@linaro.org>
5330 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5331 struct user_fpsimd_state *.
5332 (aarch64_store_fpregset): Likewise.
5334 2015-11-19 Yao Qi <yao.qi@linaro.org>
5336 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5337 struct user_pt_regs *.
5338 (aarch64_store_gregset): Likewise.
5340 2015-11-18 Pedro Alves <palves@redhat.com>
5342 * Makefile.in (all_object_files): Add $IPA_OBJS.
5344 2015-11-17 Pedro Alves <palves@redhat.com>
5346 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5347 GDB_SIGNAL_0 and gdb_signal_to_string.
5349 2015-11-17 Pedro Alves <palves@redhat.com>
5351 * win32-low.c (handle_output_debug_string): Remove parameter.
5352 (win32_kill): Remove our_status local and adjust call to
5353 handle_output_debug_string.
5354 (get_child_debug_event): Adjust call to
5355 handle_output_debug_string.
5357 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5359 * linux-mips-low.c (mips_fill_gregset): Add cast.
5360 (mips_store_gregset): Likewise.
5361 (mips_fill_fpregset): Likewise.
5362 (mips_store_fpregset): Likewise.
5364 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5366 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5369 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5371 * linux-mips-low.c (mips_linux_new_thread): Change type of
5372 watch_type to enum target_hw_bp_type.
5374 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5376 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5377 Change return type to arm_hwbp_type.
5379 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5381 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5382 (arm_store_gregset): Likewise.
5383 * linux-arm-low.c (arm_get_hwcap): Likewise.
5384 (arm_read_description): Likewise.
5386 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5388 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5390 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5392 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5393 (ppc_fill_vsxregset): Likewise.
5394 (ppc_store_vsxregset): Likewise.
5395 (ppc_fill_vrregset): Likewise.
5396 (ppc_store_vrregset): Likewise.
5397 (ppc_fill_evrregset): Likewise.
5398 (ppc_store_evrregset): Likewise.
5400 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5402 * linux-ppc-low.c (ppc_usrregs_info): Remove
5403 forward-declaration.
5404 (ppc_arch_setup): Move lower in file.
5406 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5408 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5409 (ps_pdwrite): Likewise.
5411 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5413 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5414 to after assert checks.
5416 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5418 * proc-service.c (ps_pdread): Add/adjust casts.
5419 (ps_pdwrite): Add/adjust casts.
5421 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5423 * server.c (handle_search_memory_1): Cast return value of
5426 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5428 * server.c (write_qxfer_response): Change type of data to
5431 2015-10-29 Pedro Alves <palves@redhat.com>
5433 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5435 2015-10-29 Pedro Alves <palves@redhat.com>
5437 * tracepoint.c (clear_installed_tracepoints): Add casts.
5439 2015-10-29 Pedro Alves <palves@redhat.com>
5441 * server.c (handle_v_cont, process_serial_event): Add enum
5442 gdb_signal casts to signal parsing code.
5444 2015-10-29 Pedro Alves <palves@redhat.com>
5446 * linux-low.h (NULL_REGSET): Define.
5447 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5448 * linux-arm-low.c (arm_regsets): Likewise.
5449 * linux-crisv32-low.c (cris_regsets): Likewise.
5450 * linux-m68k-low.c (m68k_regsets): Likewise.
5451 * linux-mips-low.c (mips_regsets): Likewise.
5452 * linux-nios2-low.c (nios2_regsets): Likewise.
5453 * linux-ppc-low.c (ppc_regsets): Likewise.
5454 * linux-s390-low.c (s390_regsets): Likewise.
5455 * linux-sh-low.c (sh_regsets): Likewise.
5456 * linux-sparc-low.c (sparc_regsets): Likewise.
5457 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5458 * linux-tile-low.c (tile_regsets): Likewise.
5459 * linux-x86-low.c (x86_regsets): Likewise.
5460 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5462 2015-10-29 Pedro Alves <palves@redhat.com>
5464 * linux-low.h (NULL_REGSET): Define.
5465 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5466 * linux-arm-low.c (arm_regsets): Likewise.
5467 * linux-crisv32-low.c (cris_regsets): Likewise.
5468 * linux-m68k-low.c (m68k_regsets): Likewise.
5469 * linux-mips-low.c (mips_regsets): Likewise.
5470 * linux-nios2-low.c (nios2_regsets): Likewise.
5471 * linux-ppc-low.c (ppc_regsets): Likewise.
5472 * linux-s390-low.c (s390_regsets): Likewise.
5473 * linux-sh-low.c (sh_regsets): Likewise.
5474 * linux-sparc-low.c (sparc_regsets): Likewise.
5475 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5476 * linux-tile-low.c (tile_regsets): Likewise.
5477 * linux-x86-low.c (x86_regsets): Likewise.
5478 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5480 2015-10-26 Doug Evans <dje@google.com>
5482 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5484 2015-10-26 Doug Evans <dje@google.com>
5486 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5488 2015-10-26 Doug Evans <dje@google.com>
5490 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5492 (attach_thread, find_new_threads_callback): Ditto.
5494 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5496 * mem-break.h (set_breakpoint_data): Remove.
5498 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5500 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5501 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5502 (initialize_low): Remove set_breakpoint_data call.
5503 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5504 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5505 (initialize_low): Remove set_breakpoint_data call.
5506 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5507 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5508 (initialize_low): Remove set_breakpoint_data call.
5510 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5512 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5513 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5514 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5515 * target.h (target_breakpoint_kind_from_pc): New macro.
5517 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5519 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5520 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5521 the default breakpoint kind.
5523 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5525 * linux-arm-low.c (arm_supports_z_point_type): Add software
5528 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5530 * linux-arm-low.c: Refactor breakpoint definitions.
5531 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5532 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5534 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5536 * Makefile.in: Add arm.c/o.
5537 * configure.srv: Likewise.
5538 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5539 (arm_breakpoint_kind_from_pc): New function.
5540 (arm_sw_breakpoint_from_kind): Return proper kind.
5541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5543 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5545 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5547 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5548 (struct raw_breakpoint) <size>: Remove.
5549 (struct raw_breakpoint) <kind>: Add.
5550 (bp_size): New function.
5551 (bp_opcode): Likewise.
5552 (find_raw_breakpoint_at): Adjust for kind.
5553 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5554 (remove_memory_breakpoint): Adjust for kind call bp_size.
5555 (set_raw_breakpoint_at): Adjust for kind.
5556 (set_breakpoint): Likewise.
5557 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5558 (delete_raw_breakpoint): Adjust for kind.
5559 (delete_breakpoint): Likewise.
5560 (find_gdb_breakpoint): Likewise.
5561 (set_gdb_breakpoint_1): Likewise.
5562 (set_gdb_breakpoint): Likewise.
5563 (delete_gdb_breakpoint_1): Likewise.
5564 (delete_gdb_breakpoint): Likewise.
5565 (uninsert_raw_breakpoint): Likewise.
5566 (reinsert_raw_breakpoint): Likewise.
5567 (set_breakpoint_data): Remove.
5568 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5569 (check_mem_read): Adjust for kind call bp_size.
5570 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5571 (clone_one_breakpoint): Adjust for kind.
5572 * mem-break.h (set_gdb_breakpoint): Likewise.
5573 (delete_gdb_breakpoint): Likewise.
5574 * server.c (process_serial_event): Likewise.
5576 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5578 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5579 (struct linux_target_ops) <breakpoint>: Remove.
5580 (struct linux_target_ops) <breakpoint_len>: Remove.
5581 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5582 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5583 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5584 (arm_sw_breakpoint_from_kind): New function.
5585 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5586 (struct linux_target_ops) <breakpoint>: Remove.
5587 (struct linux_target_ops) <breakpoint_len>: Remove.
5588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5590 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5591 (struct linux_target_ops) <breakpoint>: Remove.
5592 (struct linux_target_ops) <breakpoint_len>: Remove.
5593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5595 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5596 (struct linux_target_ops) <breakpoint>: Remove.
5597 (struct linux_target_ops) <breakpoint_len>: Remove.
5598 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5599 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5600 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5601 and sw_breakpoint_from_kind to increment the pc.
5602 (linux_breakpoint_kind_from_pc): New function.
5603 (linux_sw_breakpoint_from_kind): New function.
5604 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5605 (initialize_low): Call breakpoint_kind_from_pc and
5606 sw_breakpoint_from_kind to replace breakpoint_data/len.
5607 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5610 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5611 (struct linux_target_ops) <breakpoint>: Remove.
5612 (struct linux_target_ops) <breakpoint_len>: Remove.
5613 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5614 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5615 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5616 (struct linux_target_ops) <breakpoint>: Remove.
5617 (struct linux_target_ops) <breakpoint_len>: Remove.
5618 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5619 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5620 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5621 (struct linux_target_ops) <breakpoint>: Remove.
5622 (struct linux_target_ops) <breakpoint_len>: Remove.
5623 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5624 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5625 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5626 (struct linux_target_ops) <breakpoint>: Remove.
5627 (struct linux_target_ops) <breakpoint_len>: Remove.
5628 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5629 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5630 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5631 (struct linux_target_ops) <breakpoint>: Remove.
5632 (struct linux_target_ops) <breakpoint_len>: Remove.
5633 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5634 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5635 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5636 (struct linux_target_ops) <breakpoint>: Remove.
5637 (struct linux_target_ops) <breakpoint_len>: Remove.
5638 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5639 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5640 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5641 (struct linux_target_ops) <breakpoint>: Remove.
5642 (struct linux_target_ops) <breakpoint_len>: Remove.
5643 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5644 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5645 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5646 (struct linux_target_ops) <breakpoint>: Remove.
5647 (struct linux_target_ops) <breakpoint_len>: Remove.
5648 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5649 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5650 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5651 (struct linux_target_ops) <breakpoint>: Remove.
5652 (struct linux_target_ops) <breakpoint_len>: Remove.
5653 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5654 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5655 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5656 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5657 (struct linux_target_ops) <breakpoint>: Remove.
5658 (struct linux_target_ops) <breakpoint_len>: Remove.
5659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5661 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5662 (struct linux_target_ops) <breakpoint>: Remove.
5663 (struct linux_target_ops) <breakpoint_len>: Remove.
5664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5667 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5669 * linux-cris-low.c (cris_get_pc): Remove void arg.
5671 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5673 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5676 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5678 * inferiors.c (thread_pid_matches_callback): New function.
5679 (find_thread_process): New function.
5680 (remove_thread): Reset current_thread.
5681 (remove_process): Assert threads have been removed first.
5683 2015-10-15 Yao Qi <yao.qi@linaro.org>
5685 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5687 (aarch64_remove_point): Likewise.
5688 * regcache.c (regcache_register_size): New function.
5690 2015-10-12 Yao Qi <yao.qi@linaro.org>
5692 * linux-aarch64-low.c: Update all callers as emit_load_store
5693 is renamed to aarch64_emit_load_store.
5695 2015-10-12 Yao Qi <yao.qi@linaro.org>
5697 * linux-aarch64-low.c: Update all callers of function renaming
5698 from emit_insn to aarch64_emit_insn.
5700 2015-10-12 Yao Qi <yao.qi@linaro.org>
5702 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5703 arch/aarch64-insn.h.
5704 (struct aarch64_memory_operand): Likewise.
5706 (emit_insn): Move to arch/aarch64-insn.c.
5707 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5708 (emit_load_store): Move to arch/aarch64-insn.c.
5709 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5710 (can_encode_int32): Remove.
5712 2015-10-12 Yao Qi <yao.qi@linaro.org>
5714 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5715 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5716 (aarch64_relocate_instruction): Likewise.
5717 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5718 (struct aarch64_insn_visitor): Likewise.
5720 2015-10-12 Yao Qi <yao.qi@linaro.org>
5722 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5723 (struct aarch64_insn_visitor): New.
5724 (struct aarch64_insn_relocation_data): New.
5725 (aarch64_ftrace_insn_reloc_b): New function.
5726 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5727 (aarch64_ftrace_insn_reloc_cb): Likewise.
5728 (aarch64_ftrace_insn_reloc_tb): Likewise.
5729 (aarch64_ftrace_insn_reloc_adr): Likewise.
5730 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5731 (aarch64_ftrace_insn_reloc_others): Likewise.
5733 (aarch64_relocate_instruction): Use visitor.
5735 2015-10-12 Yao Qi <yao.qi@linaro.org>
5737 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5738 int. Add argument buf.
5739 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5740 aarch64_relocate_instruction.
5742 2015-10-12 Yao Qi <yao.qi@linaro.org>
5744 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5745 argument insn. Remove local variable insn. Don't call
5747 (aarch64_install_fast_tracepoint_jump_pad): Call
5750 2015-09-30 Yao Qi <yao.qi@linaro.org>
5752 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5753 (emit_load_store_pair): Likewise.
5755 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5757 * dll.c (match_dll): Add cast(s).
5758 (unloaded_dll): Likewise.
5759 * linux-low.c (second_thread_of_pid_p): Likewise.
5760 (delete_lwp_callback): Likewise.
5761 (count_events_callback): Likewise.
5762 (select_event_lwp_callback): Likewise.
5763 (linux_set_resume_request): Likewise.
5764 * server.c (accumulate_file_name_length): Likewise.
5765 (emit_dll_description): Likewise.
5766 (handle_qxfer_threads_worker): Likewise.
5767 (visit_actioned_threads): Likewise.
5768 * thread-db.c (any_thread_of): Likewise.
5769 * tracepoint.c (same_process_p): Likewise.
5770 (match_blocktype): Likewise.
5771 (build_traceframe_info_xml): Likewise.
5773 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5775 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5777 (gdb_unparse_agent_expr): Likewise.
5778 * hostio.c (require_data): Likewise.
5779 (handle_pread): Likewise.
5780 * linux-low.c (disable_regset): Likewise.
5781 (fetch_register): Likewise.
5782 (store_register): Likewise.
5783 (get_dynamic): Likewise.
5784 (linux_qxfer_libraries_svr4): Likewise.
5785 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5786 (set_fast_tracepoint_jump): Likewise.
5787 (uninsert_fast_tracepoint_jumps_at): Likewise.
5788 (reinsert_fast_tracepoint_jumps_at): Likewise.
5789 (validate_inserted_breakpoint): Likewise.
5790 (clone_agent_expr): Likewise.
5791 * regcache.c (init_register_cache): Likewise.
5792 * remote-utils.c (putpkt_binary_1): Likewise.
5793 (decode_M_packet): Likewise.
5794 (decode_X_packet): Likewise.
5795 (look_up_one_symbol): Likewise.
5796 (relocate_instruction): Likewise.
5797 (monitor_output): Likewise.
5798 * server.c (handle_search_memory): Likewise.
5799 (handle_qxfer_exec_file): Likewise.
5800 (handle_qxfer_libraries): Likewise.
5801 (handle_qxfer): Likewise.
5802 (handle_query): Likewise.
5803 (handle_v_cont): Likewise.
5804 (handle_v_run): Likewise.
5805 (captured_main): Likewise.
5806 * target.c (write_inferior_memory): Likewise.
5807 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5808 * tracepoint.c (init_trace_buffer): Likewise.
5809 (add_tracepoint_action): Likewise.
5810 (add_traceframe): Likewise.
5811 (add_traceframe_block): Likewise.
5812 (cmd_qtdpsrc): Likewise.
5813 (cmd_qtdv): Likewise.
5814 (cmd_qtstatus): Likewise.
5815 (response_source): Likewise.
5816 (response_tsv): Likewise.
5817 (cmd_qtnotes): Likewise.
5818 (gdb_collect): Likewise.
5819 (initialize_tracepoint): Likewise.
5821 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5823 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5824 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5825 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5827 (enum aarch64_condition_codes): New enum.
5828 (w0): New static global.
5831 (struct aarch64_memory_operand) <type>: New
5832 MEMORY_OPERAND_POSTINDEX type.
5833 (postindex_memory_operand): New helper function.
5834 (emit_ret): New function.
5835 (emit_load_store_pair): New function, factored out of emit_stp
5836 with support for MEMORY_OPERAND_POSTINDEX.
5837 (emit_stp): Rewrite using emit_load_store_pair.
5838 (emit_ldp): New function.
5839 (emit_load_store): Likewise.
5840 (emit_ldr): Mention post-index instruction in comment.
5841 (emit_ldrh): New function.
5842 (emit_ldrb): New function.
5843 (emit_ldrsw): Mention post-index instruction in comment.
5844 (emit_str): Likewise.
5845 (emit_subs): New function.
5846 (emit_cmp): Likewise.
5847 (emit_and): Likewise.
5848 (emit_orr): Likewise.
5849 (emit_orn): Likewise.
5850 (emit_eor): Likewise.
5851 (emit_mvn): Likewise.
5852 (emit_lslv): Likewise.
5853 (emit_lsrv): Likewise.
5854 (emit_asrv): Likewise.
5855 (emit_mul): Likewise.
5856 (emit_sbfm): Likewise.
5857 (emit_sbfx): Likewise.
5858 (emit_ubfm): Likewise.
5859 (emit_ubfx): Likewise.
5860 (emit_csinc): Likewise.
5861 (emit_cset): Likewise.
5862 (emit_nop): Likewise.
5863 (emit_ops_insns): New helper function.
5864 (emit_pop): Likewise.
5865 (emit_push): Likewise.
5866 (aarch64_emit_prologue): New function.
5867 (aarch64_emit_epilogue): Likewise.
5868 (aarch64_emit_add): Likewise.
5869 (aarch64_emit_sub): Likewise.
5870 (aarch64_emit_mul): Likewise.
5871 (aarch64_emit_lsh): Likewise.
5872 (aarch64_emit_rsh_signed): Likewise.
5873 (aarch64_emit_rsh_unsigned): Likewise.
5874 (aarch64_emit_ext): Likewise.
5875 (aarch64_emit_log_not): Likewise.
5876 (aarch64_emit_bit_and): Likewise.
5877 (aarch64_emit_bit_or): Likewise.
5878 (aarch64_emit_bit_xor): Likewise.
5879 (aarch64_emit_bit_not): Likewise.
5880 (aarch64_emit_equal): Likewise.
5881 (aarch64_emit_less_signed): Likewise.
5882 (aarch64_emit_less_unsigned): Likewise.
5883 (aarch64_emit_ref): Likewise.
5884 (aarch64_emit_if_goto): Likewise.
5885 (aarch64_emit_goto): Likewise.
5886 (aarch64_write_goto_address): Likewise.
5887 (aarch64_emit_const): Likewise.
5888 (aarch64_emit_call): Likewise.
5889 (aarch64_emit_reg): Likewise.
5890 (aarch64_emit_pop): Likewise.
5891 (aarch64_emit_stack_flush): Likewise.
5892 (aarch64_emit_zero_ext): Likewise.
5893 (aarch64_emit_swap): Likewise.
5894 (aarch64_emit_stack_adjust): Likewise.
5895 (aarch64_emit_int_call_1): Likewise.
5896 (aarch64_emit_void_call_2): Likewise.
5897 (aarch64_emit_eq_goto): Likewise.
5898 (aarch64_emit_ne_goto): Likewise.
5899 (aarch64_emit_lt_goto): Likewise.
5900 (aarch64_emit_le_goto): Likewise.
5901 (aarch64_emit_gt_goto): Likewise.
5902 (aarch64_emit_ge_got): Likewise.
5903 (aarch64_emit_ops_impl): New static global variable.
5904 (aarch64_emit_ops): New target function, return
5905 &aarch64_emit_ops_impl.
5906 (struct linux_target_ops): Install it.
5908 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5910 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5911 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5913 * linux-aarch64-ipa.c: New file.
5914 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5916 (aarch64_get_thread_area): New target method.
5917 (extract_signed_bitfield): New helper function.
5918 (aarch64_decode_ldr_literal): New function.
5919 (enum aarch64_opcodes): New enum.
5920 (struct aarch64_register): New struct.
5921 (struct aarch64_operand): New struct.
5922 (x0): New static global.
5931 (aarch64_register): New helper function.
5932 (register_operand): Likewise.
5933 (immediate_operand): Likewise.
5934 (struct aarch64_memory_operand): New struct.
5935 (offset_memory_operand): New helper function.
5936 (preindex_memory_operand): Likewise.
5937 (enum aarch64_system_control_registers): New enum.
5938 (ENCODE): New macro.
5939 (emit_insn): New helper function.
5940 (emit_b): New function.
5941 (emit_bcond): Likewise.
5942 (emit_cb): Likewise.
5943 (emit_tb): Likewise.
5944 (emit_blr): Likewise.
5945 (emit_stp): Likewise.
5946 (emit_ldp_q_offset): Likewise.
5947 (emit_stp_q_offset): Likewise.
5948 (emit_load_store): Likewise.
5949 (emit_ldr): Likewise.
5950 (emit_ldrsw): Likewise.
5951 (emit_str): Likewise.
5952 (emit_ldaxr): Likewise.
5953 (emit_stxr): Likewise.
5954 (emit_stlr): Likewise.
5955 (emit_data_processing_reg): Likewise.
5956 (emit_data_processing): Likewise.
5957 (emit_add): Likewise.
5958 (emit_sub): Likewise.
5959 (emit_mov): Likewise.
5960 (emit_movk): Likewise.
5961 (emit_mov_addr): Likewise.
5962 (emit_mrs): Likewise.
5963 (emit_msr): Likewise.
5964 (emit_sevl): Likewise.
5965 (emit_wfe): Likewise.
5966 (append_insns): Likewise.
5967 (can_encode_int32_in): New helper function.
5968 (aarch64_relocate_instruction): New function.
5969 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5970 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5971 (struct linux_target_ops): Install aarch64_get_thread_area,
5972 aarch64_install_fast_tracepoint_jump_pad and
5973 aarch64_get_min_fast_tracepoint_insn_len.
5975 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5977 * Makefile.in (aarch64-insn.o): New rule.
5978 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5980 2015-09-21 Yao Qi <yao.qi@linaro.org>
5982 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5984 2015-09-21 Yao Qi <yao.qi@linaro.org>
5986 * tracepoint.c (max_jump_pad_size): Remove.
5988 2015-09-18 Yao Qi <yao.qi@linaro.org>
5990 * linux-aarch64-low.c: Don't include sys/uio.h.
5991 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5993 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5995 * tracepoint.c (eval_result_type): Change prototype.
5996 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5998 2015-09-15 Pedro Alves <palves@redhat.com>
6000 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6001 Check whether to report exec events instead of checking whether
6002 multiprocess is enabled.
6004 2015-09-15 Pedro Alves <palves@redhat.com>
6007 * remote-utils.c (prepare_resume_reply): Merge
6008 TARGET_WAITKIND_VFORK_DONE switch case with the
6009 TARGET_WAITKIND_FORKED case.
6011 2015-09-15 Yao Qi <yao.qi@linaro.org>
6013 * server.c (handle_query): Check string comparison using
6014 "else if" instead of "if".
6016 2015-09-15 Yao Qi <yao.qi@linaro.org>
6018 * server.c (vCont_supported): New global variable.
6019 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6020 matches. Append ";vContSupported+" to own_buf.
6021 (handle_v_requests): Append ";s;S" to own_buf if target supports
6022 hardware single step or vCont_supported is false.
6023 (capture_main): Set vCont_supported to zero.
6025 2015-09-15 Yao Qi <yao.qi@linaro.org>
6027 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6029 (linux_supports_hardware_single_step): ... New function.
6030 (linux_target_ops): Update.
6031 * lynx-low.c (lynx_target_ops): Set field
6032 supports_hardware_single_step to target_can_do_hardware_single_step.
6033 * nto-low.c (nto_target_ops): Likewise.
6034 * spu-low.c (spu_target_ops): Likewise.
6035 * win32-low.c (win32_target_ops): Likewise.
6036 * target.c (target_can_do_hardware_single_step): New function.
6037 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6038 Remove. <supports_hardware_single_step>: New field.
6039 (target_supports_conditional_breakpoints): Remove.
6040 (target_supports_hardware_single_step): New macro.
6041 (target_can_do_hardware_single_step): Declare.
6042 * server.c (handle_query): Use target_supports_hardware_single_step
6043 instead of target_supports_conditional_breakpoints.
6045 2015-09-15 Yao Qi <yao.qi@linaro.org>
6047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6049 (struct linux_target_ops the_low_target): Install
6050 aarch64_linux_siginfo_fixup.
6052 2015-09-11 Don Breazeal <donb@codesourcery.com>
6053 Luis Machado <lgustavo@codesourcery.com>
6055 * linux-low.c (linux_mourn): Static declaration.
6056 (linux_arch_setup): Move in front of
6057 handle_extended_wait.
6058 (linux_arch_setup_thread): New function.
6059 (handle_extended_wait): Handle exec events. Call
6060 linux_arch_setup_thread. Make event_lwp argument a
6061 pointer-to-a-pointer.
6062 (check_zombie_leaders): Do not check stopped threads.
6063 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6064 (linux_low_filter_event): Add lwp and thread for exec'ing
6065 non-leader thread if leader thread has been deleted.
6066 Refactor code into linux_arch_setup_thread and call it.
6067 Pass child lwp pointer by reference to handle_extended_wait.
6068 (linux_wait_for_event_filtered): Update comment.
6069 (linux_wait_1): Prevent clobbering exec event status.
6070 (linux_supports_exec_events): New function.
6071 (linux_target_ops) <supports_exec_events>: Initialize new member.
6072 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6074 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6075 * server.c (report_exec_events): New global variable.
6076 (handle_query): Handle qSupported query for exec-events feature.
6077 (captured_main): Initialize report_exec_events.
6078 * server.h (report_exec_events): Declare new global variable.
6079 * target.h (struct target_ops) <supports_exec_events>: New
6081 (target_supports_exec_events): New macro.
6082 * win32-low.c (win32_target_ops) <supports_exec_events>:
6083 Initialize new member.
6085 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6087 * linux-low.c (linux_low_enable_btrace): Remove.
6088 (linux_target_ops): Replace linux_low_enable_btrace with
6089 linux_enable_btrace.
6091 2015-09-03 Yao Qi <yao.qi@linaro.org>
6093 * linux-aarch64-low.c (aarch64_insert_point): Call
6094 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6097 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6099 * linux-low.c (check_stopped_by_breakpoint): Use
6100 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6102 2015-08-27 Pedro Alves <palves@redhat.com>
6104 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6106 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6108 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6109 the XNEW-family equivalent.
6110 (compile_bytecodes): Likewise.
6111 * dll.c (loaded_dll): Likewise.
6112 * event-loop.c (append_callback_event): Likewise.
6113 (create_file_handler): Likewise.
6114 (create_file_event): Likewise.
6115 * hostio.c (handle_open): Likewise.
6116 * inferiors.c (add_thread): Likewise.
6117 (add_process): Likewise.
6118 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6119 * linux-arm-low.c (arm_new_process): Likewise.
6120 (arm_new_thread): Likewise.
6121 * linux-low.c (add_to_pid_list): Likewise.
6122 (linux_add_process): Likewise.
6123 (handle_extended_wait): Likewise.
6124 (add_lwp): Likewise.
6125 (enqueue_one_deferred_signal): Likewise.
6126 (enqueue_pending_signal): Likewise.
6127 (linux_resume_one_lwp_throw): Likewise.
6128 (linux_resume_one_thread): Likewise.
6129 (linux_read_memory): Likewise.
6130 (linux_write_memory): Likewise.
6131 * linux-mips-low.c (mips_linux_new_process): Likewise.
6132 (mips_linux_new_thread): Likewise.
6133 (mips_add_watchpoint): Likewise.
6134 * linux-x86-low.c (initialize_low_arch): Likewise.
6135 * lynx-low.c (lynx_add_process): Likewise.
6136 * mem-break.c (set_raw_breakpoint_at): Likewise.
6137 (set_breakpoint): Likewise.
6138 (add_condition_to_breakpoint): Likewise.
6139 (add_commands_to_breakpoint): Likewise.
6140 (clone_agent_expr): Likewise.
6141 (clone_one_breakpoint): Likewise.
6142 * regcache.c (new_register_cache): Likewise.
6143 * remote-utils.c (look_up_one_symbol): Likewise.
6144 * server.c (queue_stop_reply): Likewise.
6145 (start_inferior): Likewise.
6146 (queue_stop_reply_callback): Likewise.
6147 (handle_target_event): Likewise.
6148 * spu-low.c (fetch_ppc_memory): Likewise.
6149 (store_ppc_memory): Likewise.
6150 * target.c (set_target_ops): Likewise.
6151 * thread-db.c (thread_db_load_search): Likewise.
6152 (try_thread_db_load_1): Likewise.
6153 * tracepoint.c (add_tracepoint): Likewise.
6154 (add_tracepoint_action): Likewise.
6155 (create_trace_state_variable): Likewise.
6156 (cmd_qtdpsrc): Likewise.
6157 (cmd_qtro): Likewise.
6158 (add_while_stepping_state): Likewise.
6159 * win32-low.c (child_add_thread): Likewise.
6160 (get_image_name): Likewise.
6162 2015-08-25 Yao Qi <yao.qi@linaro.org>
6164 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6166 2015-08-25 Yao Qi <yao.qi@linaro.org>
6168 * Makefile.in (aarch64-linux.o): New rule.
6169 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6171 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6172 (aarch64_init_debug_reg_state): Make it extern.
6173 (aarch64_linux_prepare_to_resume): Remove.
6175 2015-08-25 Yao Qi <yao.qi@linaro.org>
6177 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6178 lwp_arch_private_info and ptid_of_lwp.
6180 2015-08-25 Yao Qi <yao.qi@linaro.org>
6182 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6183 Find proc_info by find_process_pid. All callers updated.
6185 2015-08-25 Yao Qi <yao.qi@linaro.org>
6187 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6189 (debug_reg_change_callback): Remove.
6190 (aarch64_notify_debug_reg_change): Remove.
6192 2015-08-25 Yao Qi <yao.qi@linaro.org>
6194 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6195 Call current_lwp_ptid.
6197 2015-08-25 Yao Qi <yao.qi@linaro.org>
6199 * linux-aarch64-low.c (debug_reg_change_callback): Use
6202 2015-08-25 Yao Qi <yao.qi@linaro.org>
6204 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6206 2015-08-25 Yao Qi <yao.qi@linaro.org>
6208 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6210 2015-08-25 Yao Qi <yao.qi@linaro.org>
6212 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6215 2015-08-25 Yao Qi <yao.qi@linaro.org>
6217 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6219 (debug_reg_change_callback): Remove argument entry and add argument
6220 lwp. Remove local variable thread. Don't print thread id in the
6221 debugging output. Don't check whether pid of thread equals to pid.
6222 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6223 iterate_over_lwps instead find_inferior.
6225 2015-08-24 Pedro Alves <palves@redhat.com>
6227 * inferiors.c (get_first_process): New function.
6228 * inferiors.h (get_first_process): New declaration.
6229 * remote-utils.c (read_ptid): Default to the first process in the
6230 list, instead of to the current thread's process.
6232 2015-08-24 Pedro Alves <palves@redhat.com>
6234 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6235 * event-loop.c: Likewise.
6236 * remote-utils.c: Likewise.
6237 * tracepoint.c: Likewise.
6239 2015-08-24 Pedro Alves <palves@redhat.com>
6241 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6244 2015-08-21 Pedro Alves <palves@redhat.com>
6246 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6247 instead of literal 1.
6249 2015-08-21 Pedro Alves <palves@redhat.com>
6251 * tdesc.c (default_description): Explicitly zero-initialize.
6253 2015-08-21 Pedro Alves <palves@redhat.com>
6256 * inferiors.c (remove_thread): Discard any pending stop reply for
6258 * server.c (remove_all_on_match_pid): Rename to ...
6259 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6261 (discard_queued_stop_replies): Change parameter to a ptid. Now
6263 (handle_v_kill, kill_inferior_callback, captured_main)
6264 (process_serial_event): Adjust.
6265 * server.h (discard_queued_stop_replies): Declare.
6267 2015-08-21 Pedro Alves <palves@redhat.com>
6269 * linux-low.c (wait_for_sigstop): Always switch to no thread
6270 selected if the previously current thread dies.
6271 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6272 process instead of the current thread's.
6273 * remote-utils.c (input_interrupt): Don't check if there's no
6275 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6276 current thread to the general thread fails, error out.
6277 (handle_qxfer_auxv, handle_qxfer_libraries)
6278 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6279 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6280 (handle_query): Check if there's a thread selected instead of
6281 checking whether there's any thread in the thread list.
6282 (handle_qxfer_threads, handle_qxfer_btrace)
6283 (handle_qxfer_btrace_conf): Don't error out early if there's no
6284 thread in the thread list.
6285 (handle_v_cont, myresume): Don't set the current thread to the
6287 (process_serial_event) <Hg handling>: Also set thread_id if the
6288 previous general thread is still alive.
6289 (process_serial_event) <g/G handling>: If setting the current
6290 thread to the general thread fails, error out.
6291 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6292 thread's lwp instead of the current thread's.
6293 * target.c (set_desired_thread): If the desired thread was not
6294 found, leave the current thread pointing to NULL. Return an int
6295 (boolean) indicating success.
6296 * target.h (set_desired_thread): Change return type to int.
6298 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6300 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6301 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6303 (ps_get_thread_area): New function.
6305 2015-08-19 Gary Benson <gbenson@redhat.com>
6307 * hostio.c (handle_pread): Do not attempt to read more data
6308 than hostio_reply_with_data can fit in a packet.
6310 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6312 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6314 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6316 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6318 2015-08-06 Pedro Alves <palves@redhat.com>
6320 * tracepoint.c (expr_eval_result): Now an int.
6322 2015-08-06 Pedro Alves <palves@redhat.com>
6324 * gdbthread.h (struct regcache): Forward declare.
6325 (struct thread_info) <regcache_data>: Now a struct regcache
6327 * inferiors.c (inferior_regcache_data)
6328 (set_inferior_regcache_data): Now work with struct regcache
6330 * inferiors.h (struct regcache): Forward declare.
6331 (inferior_regcache_data, set_inferior_regcache_data): Now work
6332 with struct regcache pointers.
6333 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6334 (free_register_cache_thread): Remove struct regcache pointer
6337 2015-08-06 Pedro Alves <palves@redhat.com>
6339 * server.c (captured_main): On error, print the exception message
6340 to stderr, and if run_once is set, throw a quit.
6342 2015-08-06 Pedro Alves <palves@redhat.com>
6344 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6347 2015-08-06 Pedro Alves <palves@redhat.com>
6349 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6350 reading beyond the passed in buffer length.
6352 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6354 * tracepoint.c (symbol_list) <required>: Remove.
6356 2015-08-06 Pedro Alves <palves@redhat.com>
6358 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6359 count if stopping and suspending threads.
6360 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6361 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6362 (linux_detach): Complete an ongoing step-over.
6363 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6365 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6366 (linux_wait_1): If passing a signal to the inferior after
6367 finishing a step-over, unsuspend and re-resume all lwps. If we
6368 see a single-step event but the thread should be continuing, don't
6369 pass the trap to gdb.
6370 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6371 internal_error instead of gdb_assert.
6372 (enqueue_pending_signal): New function.
6373 (check_ptrace_stopped_lwp_gone): Add debug output.
6374 (start_step_over): Use internal_error instead of gdb_assert.
6375 (complete_ongoing_step_over): New function.
6376 (linux_resume_one_thread): Don't resume a suspended thread.
6377 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6380 2015-08-06 Pedro Alves <palves@redhat.com>
6382 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6383 (linux_thread_alive): Use lwp_is_marked_dead.
6384 (extended_event_reported): Delete.
6385 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6386 instead of extended_event_reported.
6387 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6389 (lwp_is_marked_dead): New function.
6390 (lwp_running): Use lwp_is_marked_dead.
6391 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6394 2015-08-06 Pedro Alves <palves@redhat.com>
6396 * linux-low.c (linux_wait_1): Move fork event output out of the
6397 !report_to_gdb check. Pass event_child->waitstatus to
6398 target_waitstatus_to_string instead of ourstatus.
6400 2015-08-04 Yao Qi <yao.qi@linaro.org>
6402 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6403 if current_thread is 32 bit.
6405 2015-08-04 Yao Qi <yao.qi@linaro.org>
6407 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6408 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6409 * server.c (extended_protocol): Remove "static".
6410 * server.h (extended_protocol): Declare it.
6412 2015-08-04 Yao Qi <yao.qi@linaro.org>
6414 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6415 both aarch64 and aarch32.
6416 (aarch64_set_pc): Likewise.
6418 2015-08-04 Yao Qi <yao.qi@linaro.org>
6420 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6421 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6422 arm-with-neon.xml to srv_xmlfiles.
6423 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6424 (is_64bit_tdesc): New function.
6425 (aarch64_linux_read_description): New function.
6426 (aarch64_arch_setup): Call aarch64_linux_read_description.
6427 (regs_info): Rename to regs_info_aarch64.
6428 (aarch64_regs_info): Return right regs_info.
6429 (initialize_low_arch): Call initialize_low_arch_aarch32.
6431 2015-08-04 Yao Qi <yao.qi@linaro.org>
6433 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6434 * linux-aarch32-low.c: New file.
6435 * linux-aarch32-low.h: New file.
6436 * linux-arm-low.c (arm_fill_gregset): Move it to
6437 linux-aarch32-low.c.
6438 (arm_store_gregset): Likewise.
6439 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6440 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6441 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6442 (regs_info): Rename to regs_info_arm.
6443 (arm_regs_info): Return regs_info_aarch32 if
6444 have_ptrace_getregset is 1 and target description is
6445 arm_with_neon or arm_with_vfpv3.
6446 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6447 Call initialize_low_arch_aarch32 instead.
6449 2015-08-04 Yao Qi <yao.qi@linaro.org>
6451 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6452 * linux-low.c: ... here.
6453 * linux-low.h (have_ptrace_getregset): Declare it.
6455 2015-08-04 Pedro Alves <palves@redhat.com>
6457 * thread-db.c (struct thread_db): Use new typedefs.
6458 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6460 (disable_thread_event_reporting): Cast result of dlsym to
6461 destination function pointer type.
6462 (thread_db_mourn): Use td_ta_delete_ftype.
6464 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6466 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6468 (CDX_BREAKPOINT): Define for R2.
6469 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6470 (the_low_target): Add comments.
6472 2015-07-30 Yao Qi <yao.qi@linaro.org>
6474 * linux-arm-low.c (arm_hwcap): Remove it.
6475 (arm_read_description): New local variable arm_hwcap. Don't
6476 set arm_hwcap to zero.
6478 2015-07-30 Yao Qi <yao.qi@linaro.org>
6480 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6481 Use regcache->tdesc instead.
6482 (arm_store_wmmxregset): Likewise.
6483 (arm_fill_vfpregset): Likewise.
6484 (arm_store_vfpregset): Likewise.
6486 2015-07-30 Yao Qi <yao.qi@linaro.org>
6488 * linux-arm-low.c: Include arch/arm.h.
6489 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6490 (arm_store_gregset): Likewise.
6492 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6494 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6495 ptrace's 4th parameter.
6497 2015-07-27 Yao Qi <yao.qi@linaro.org>
6499 * configure.srv (case aarch64*-*-linux*): Don't set
6502 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6504 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6506 * linux-arm-low.c: Likewise.
6507 * linux-cris-low.c: Likewise.
6508 * linux-crisv32-low.c: Likewise.
6509 * linux-low.c: Likewise.
6510 * linux-m68k-low.c: Likewise.
6511 * linux-mips-low.c: Likewise.
6512 * linux-nios2-low.c: Likewise.
6513 * linux-s390-low.c: Likewise.
6514 * linux-sparc-low.c: Likewise.
6515 * linux-tic6x-low.c: Likewise.
6516 * linux-tile-low.c: Likewise.
6517 * linux-x86-low.c: Likewise.
6519 2015-07-24 Pedro Alves <palves@redhat.com>
6521 * config.in: Regenerate.
6522 * configure: Regenerate.
6524 2015-07-24 Pedro Alves <palves@redhat.com>
6526 * acinclude.m4: Include ../ptrace.m4.
6527 * configure.ac: Call GDB_AC_PTRACE.
6528 * config.in, configure: Regenerate.
6530 2015-07-24 Yao Qi <yao.qi@linaro.org>
6532 * linux-low.c (linux_create_inferior): Remove setting to
6533 proc->priv->new_inferior.
6534 (linux_attach): Likewise.
6535 (linux_low_filter_event): Likewise.
6536 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6538 2015-07-24 Yao Qi <yao.qi@linaro.org>
6540 * linux-low.c (linux_arch_setup): New function.
6541 (linux_low_filter_event): If proc->tdesc is NULL and
6542 proc->attached is true, call the_low_target.arch_setup.
6543 Otherwise, keep status pending, and return.
6544 (linux_resume_one_lwp_throw): Don't call get_pc if
6545 thread->while_stepping isn't NULL. Don't call
6546 get_thread_regcache if proc->tdesc is NULL.
6547 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6548 (linux_target_ops): Install arch_setup.
6549 * server.c (start_inferior): Call the_target->arch_setup.
6550 * target.h (struct target_ops) <arch_setup>: New field.
6551 (target_arch_setup): New marco.
6552 * lynx-low.c (lynx_target_ops): Update.
6553 * nto-low.c (nto_target_ops): Update.
6554 * spu-low.c (spu_target_ops): Update.
6555 * win32-low.c (win32_target_ops): Update.
6557 2015-07-24 Yao Qi <yao.qi@linaro.org>
6559 * linux-low.c (linux_add_process): Don't set
6560 proc->priv->new_inferior.
6561 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6562 (linux_attach): Likewise.
6564 2015-07-24 Yao Qi <yao.qi@linaro.org>
6566 * server.c (start_inferior): Code refactor.
6568 2015-07-24 Yao Qi <yao.qi@linaro.org>
6570 * server.c (process_serial_event): Set general_thread.
6572 2015-07-21 Yao Qi <yao.qi@linaro.org>
6574 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6575 aarch64_linux_get_debug_reg_capacity.
6577 2015-07-17 Yao Qi <yao.qi@linaro.org>
6579 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6580 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6581 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6582 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6583 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6584 (AARCH64_HWP_ALIGNMENT): Likewise.
6585 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6586 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6587 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6588 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6589 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6590 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6591 (struct aarch64_debug_reg_state): Likewise.
6592 (struct arch_lwp_info): Likewise.
6593 (aarch64_align_watchpoint): Likewise.
6594 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6595 (aarch64_watchpoint_length): Likewise.
6596 (aarch64_point_encode_ctrl_reg): Likewise
6597 (aarch64_point_is_aligned): Likewise.
6598 (aarch64_align_watchpoint): Likewise.
6599 (aarch64_linux_set_debug_regs):
6600 (aarch64_dr_state_insert_one_point): Likewise.
6601 (aarch64_dr_state_remove_one_point): Likewise.
6602 (aarch64_handle_breakpoint): Likewise.
6603 (aarch64_handle_aligned_watchpoint): Likewise.
6604 (aarch64_handle_unaligned_watchpoint): Likewise.
6605 (aarch64_handle_watchpoint): Likewise.
6607 2015-07-17 Yao Qi <yao.qi@linaro.org>
6609 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6610 and don't aarch64_get_debug_reg_state. All callers update.
6611 (aarch64_handle_aligned_watchpoint): Likewise.
6612 (aarch64_handle_unaligned_watchpoint): Likewise.
6613 (aarch64_handle_watchpoint): Likewise.
6614 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6615 (aarch64_remove_point): Likewise.
6617 2015-07-17 Yao Qi <yao.qi@linaro.org>
6619 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6621 (aarch64_handle_unaligned_watchpoint): Likewise.
6623 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6625 Revert the previous 3 commits:
6626 Move gdb_regex* to common/
6627 Move linux_find_memory_regions_full & co.
6628 gdbserver build-id attribute generator
6630 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6631 Jan Kratochvil <jan.kratochvil@redhat.com>
6633 gdbserver build-id attribute generator.
6634 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6635 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6636 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6638 (get_dynamic): Use find_pdhr to traverse program headers.
6639 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6640 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6641 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6642 (get_hex_build_id): New.
6643 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6644 to reply XML document.
6646 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6647 Jan Kratochvil <jan.kratochvil@redhat.com>
6649 * target.c: Include target/target-utils.h and fcntl.h.
6650 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6651 (target_fileio_read_stralloc): New functions.
6653 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6655 * Makefile.in (OBS): Add gdb_regex.o.
6657 * config.in: Rebuilt.
6658 * configure: Rebuilt.
6660 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6661 Jan Kratochvil <jan.kratochvil@redhat.com>
6663 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6664 * Makefile.in (OBS): Add target-utils.o.
6665 (linux-maps.o, target-utils.o): New.
6666 * configure.srv (srv_linux_obj): Add linux-maps.o.
6668 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6670 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6672 (the_low_target): Install it.
6674 2015-07-14 Pedro Alves <palves@redhat.com>
6676 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6677 Instead, ignore ECHILD, and throw an error for other errnos.
6679 2015-07-10 Pedro Alves <palves@redhat.com>
6681 * event-loop.c (struct callback_event) <data>: Change type to
6682 gdb_client_data instance instead of gdb_client_data pointer.
6683 (append_callback_event): Adjust.
6685 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6687 * linux-aarch64-low.c: Add comments for each linux_target_ops
6688 method. Remove comments already covered in target_ops and
6689 linux_target_ops definitions.
6690 (the_low_target): Add comments for each unimplemented method.
6692 2015-07-09 Yao Qi <yao.qi@linaro.org>
6694 * linux-aarch64-low.c (aarch64_regmap): Remove.
6695 (aarch64_usrregs_info): Remove.
6696 (regs_info): Set field usrregs to NULL.
6698 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6700 * linux-low.c: Include "rsp-low.h"
6701 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6702 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6703 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6704 (handle_btrace_enable_pt): New.
6705 (handle_btrace_general_set): Support "pt".
6706 (handle_btrace_conf_general_set): Support "pt:size".
6708 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6710 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6713 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6715 * linux-aarch64-low.c: Remove comment about endianness.
6716 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6717 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6720 2015-06-24 Gary Benson <gbenson@redhat.com>
6722 * linux-i386-ipa.c (stdint.h): Do not include.
6723 * lynx-i386-low.c (stdint.h): Likewise.
6724 * lynx-ppc-low.c (stdint.h): Likewise.
6725 * mem-break.c (stdint.h): Likewise.
6726 * thread-db.c (stdint.h): Likewise.
6727 * tracepoint.c (stdint.h): Likewise.
6728 * win32-low.c (stdint.h): Likewise.
6730 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6732 * server.c (write_qxfer_response): Update call to
6733 remote_escape_output.
6735 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6736 Jan Kratochvil <jan.kratochvil@redhat.com>
6738 Merge multiple hex conversions.
6739 * gdbreplay.c (tohex): Rename to 'fromhex'.
6740 (logchar): Use fromhex.
6742 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6744 * server.c (handle_qxfer_libraries): Set `version' attribute for
6747 2015-06-10 Gary Benson <gbenson@redhat.com>
6749 * target.h (struct target_ops) <multifs_open>: New field.
6750 <multifs_unlink>: Likewise.
6751 <multifs_readlink>: Likewise.
6752 * linux-low.c (nat/linux-namespaces.h): New include.
6753 (linux_target_ops): Initialize the_target->multifs_open,
6754 the_target->multifs_unlink and the_target->multifs_readlink.
6755 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6756 * hostio.c (hostio_fs_pid): New static variable.
6757 (hostio_handle_new_gdb_connection): New function.
6758 (handle_setfs): Likewise.
6759 (handle_open): Use the_target->multifs_open as appropriate.
6760 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6761 (handle_readlink): Use the_target->multifs_readlink as
6763 (handle_vFile): Handle vFile:setfs packets.
6764 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6765 after target_handle_new_gdb_connection.
6767 2015-06-10 Gary Benson <gbenson@redhat.com>
6769 * configure.ac (AC_CHECK_FUNCS): Add setns.
6770 * config.in: Regenerate.
6771 * configure: Likewise.
6772 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6773 (linux-namespaces.o): New rule.
6774 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6776 2015-06-09 Gary Benson <gbenson@redhat.com>
6778 * hostio.c (handle_open): Process mode argument with
6779 fileio_to_host_mode.
6781 2015-06-01 Yao Qi <yao.qi@linaro.org>
6783 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6784 * linux-x86-low.c: Likewise.
6786 2015-05-28 Don Breazeal <donb@codesourcery.com>
6788 * linux-low.c (handle_extended_wait): Initialize
6789 thread_info.last_resume_kind for new fork children.
6791 2015-05-15 Pedro Alves <palves@redhat.com>
6793 * target.h (target_handle_new_gdb_connection): Rewrite using if
6794 wrapped in do/while.
6796 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6798 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6799 * configure, config.in: Regenerate.
6800 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6803 2015-05-12 Don Breazeal <donb@codesourcery.com>
6805 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6806 PTRACE_EVENT_VFORK_DONE.
6807 (linux_low_ptrace_options, extended_event_reported): Add vfork
6809 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6810 and "vforkdone" for RSP 'T' Stop Reply Packet.
6811 * server.h (report_vfork_events): Declare
6814 2015-05-12 Don Breazeal <donb@codesourcery.com>
6816 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6817 (the_low_target) <new_fork>: Initialize new member.
6818 * linux-arm-low.c (arm_new_fork): New function.
6819 (the_low_target) <new_fork>: Initialize new member.
6820 * linux-low.c (handle_extended_wait): Call new target function
6822 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6823 * linux-mips-low.c (mips_add_watchpoint): New function
6824 extracted from mips_insert_point.
6825 (the_low_target) <new_fork>: Initialize new member.
6826 (mips_linux_new_fork): New function.
6827 (mips_insert_point): Call mips_add_watchpoint.
6828 * linux-x86-low.c (x86_linux_new_fork): New function.
6829 (the_low_target) <new_fork>: Initialize new member.
6831 2015-05-12 Don Breazeal <donb@codesourcery.com>
6833 * linux-low.c (handle_extended_wait): Implement return value,
6834 rename argument 'event_child' to 'event_lwp', handle
6835 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6836 (linux_low_ptrace_options): New function.
6837 (linux_low_filter_event): Call linux_low_ptrace_options,
6838 use different argument fo linux_enable_event_reporting,
6839 use return value from handle_extended_wait.
6840 (extended_event_reported): New function.
6841 (linux_wait_1): Call extended_event_reported and set
6842 status to report fork events.
6843 (linux_write_memory): Add pid to debug message.
6844 (reset_lwp_ptrace_options_callback): New function.
6845 (linux_handle_new_gdb_connection): New function.
6846 (linux_target_ops): Initialize new structure member.
6847 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6848 * lynx-low.c: Initialize new structure member.
6849 * remote-utils.c (prepare_resume_reply): Implement stop reason
6850 "fork" for "T" stop message.
6851 * server.c (handle_query): Call handle_new_gdb_connection.
6852 * server.h (report_fork_events): Declare global flag.
6853 * target.h (struct target_ops) <handle_new_gdb_connection>:
6855 (target_handle_new_gdb_connection): New macro.
6856 * win32-low.c: Initialize new structure member.
6858 2015-05-12 Don Breazeal <donb@codesourcery.com>
6860 * mem-break.c (APPEND_TO_LIST): Define macro.
6861 (clone_agent_expr): New function.
6862 (clone_one_breakpoint): New function.
6863 (clone_all_breakpoints): New function.
6864 * mem-break.h: Declare new functions.
6866 2015-05-12 Don Breazeal <donb@codesourcery.com>
6868 * linux-low.c (linux_supports_fork_events): New function.
6869 (linux_supports_vfork_events): New function.
6870 (linux_target_ops): Initialize new structure members.
6871 (initialize_low): Call linux_check_ptrace_features.
6872 * lynx-low.c (lynx_target_ops): Initialize new structure
6874 * server.c (report_fork_events, report_vfork_events):
6876 (handle_query): Add new features to qSupported packet and
6878 (captured_main): Initialize new global variables.
6879 * target.h (struct target_ops) <supports_fork_events>:
6881 <supports_vfork_events>: New member.
6882 (target_supports_fork_events): New macro.
6883 (target_supports_vfork_events): New macro.
6884 * win32-low.c (win32_target_ops): Initialize new structure
6887 2015-05-12 Gary Benson <gbenson@redhat.com>
6889 * server.c (handle_qxfer_exec_file): Use current process
6892 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6894 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6895 Remove HAVE_PTRACE_GETREGS conditionals.
6896 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6897 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6899 2015-05-08 Yao Qi <yao.qi@linaro.org>
6901 * linux-low.c (linux_supports_conditional_breakpoints): New
6903 (linux_target_ops): Install new target method.
6904 * lynx-low.c (lynx_target_ops): Install NULL hook for
6905 supports_conditional_breakpoints.
6906 * nto-low.c (nto_target_ops): Likewise.
6907 * spu-low.c (spu_target_ops): Likewise.
6908 * win32-low.c (win32_target_ops): Likewise.
6909 * server.c (handle_query): Check
6910 target_supports_conditional_breakpoints.
6911 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6913 (target_supports_conditional_breakpoints): New macro.
6915 2015-05-06 Pedro Alves <palves@redhat.com>
6918 * server.c (start_inferior): If the process exits, mourn it.
6920 2015-04-21 Gary Benson <gbenson@redhat.com>
6922 * hostio.c (fileio_open_flags_to_host): Factored out to
6923 fileio_to_host_openflags in common/fileio.c. Single use
6926 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6928 * linux-xtensa-low.c (xtensa_fill_gregset)
6929 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6932 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6934 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6935 (regs_info): Replace usrregs pointer with NULL.
6937 2015-04-17 Gary Benson <gbenson@redhat.com>
6939 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6940 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6941 * server.c (handle_qxfer_exec_file): New function.
6942 (qxfer_packets): Add exec-file entry.
6943 (handle_query): Report qXfer:exec-file:read as supported packet.
6945 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6947 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6949 2015-04-09 Gary Benson <gbenson@redhat.com>
6951 * hostio-errno.c (errno_to_fileio_error): Remove function.
6952 Update caller to use remote_fileio_to_fio_error.
6954 2015-04-09 Yao Qi <yao.qi@linaro.org>
6956 * linux-low.c (linux_insert_point): Call
6957 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6958 (linux_remove_point): Call remove_memory_breakpoint if type is
6960 * linux-x86-low.c (x86_insert_point): Don't call
6961 insert_memory_breakpoint.
6962 (x86_remove_point): Don't call remove_memory_breakpoint.
6964 2015-04-01 Pedro Alves <palves@redhat.com>
6965 Cleber Rosa <crosa@redhat.com>
6967 * server.c (gdbserver_usage): Reorganize and extend the usage
6970 2015-03-24 Pedro Alves <palves@redhat.com>
6972 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6973 output. Also dump TRAP_TRACE.
6974 (linux_low_filter_event): In debug output, distinguish a
6975 resume_stop SIGSTOP from a delayed SIGSTOP.
6977 2015-03-24 Gary Benson <gbenson@redhat.com>
6979 * linux-x86-low.c (x86_linux_new_thread): Moved to
6981 (x86_linux_prepare_to_resume): Likewise.
6983 2015-03-24 Gary Benson <gbenson@redhat.com>
6985 * Makefile.in (x86-linux-dregs.o): New rule.
6986 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6987 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6988 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6989 (x86_linux_dr_get): Likewise.
6990 (x86_linux_dr_set): Likewise.
6991 (update_debug_registers_callback): Likewise.
6992 (x86_linux_dr_set_addr): Likewise.
6993 (x86_linux_dr_get_addr): Likewise.
6994 (x86_linux_dr_set_control): Likewise.
6995 (x86_linux_dr_get_control): Likewise.
6996 (x86_linux_dr_get_status): Likewise.
6997 (x86_linux_update_debug_registers): Likewise.
6999 2015-03-24 Gary Benson <gbenson@redhat.com>
7001 * linux-x86-low.c (x86_linux_update_debug_registers):
7002 New function, factored out from...
7003 (x86_linux_prepare_to_resume): ...this.
7005 2015-03-24 Gary Benson <gbenson@redhat.com>
7007 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7008 (x86_linux_dr_set): Likewise.
7009 (update_debug_registers_callback): Likewise.
7010 (x86_linux_dr_set_addr): Likewise.
7011 (x86_linux_dr_get_addr): Likewise.
7012 (x86_linux_dr_set_control): Likewise.
7013 (x86_linux_dr_get_control): Likewise.
7014 (x86_linux_dr_get_status): Likewise.
7015 (x86_linux_prepare_to_resume): Likewise.
7017 2015-03-24 Gary Benson <gbenson@redhat.com>
7019 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7020 Use perror_with_name. Pass string through gettext.
7021 (x86_linux_dr_set): Likewise.
7023 2015-03-24 Gary Benson <gbenson@redhat.com>
7025 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7026 (x86_linux_dr_set_addr): ...this.
7027 (x86_dr_low_get_addr): Rename to...
7028 (x86_linux_dr_get_addr): ...this.
7029 (x86_dr_low_set_control): Rename to...
7030 (x86_linux_dr_set_control): ...this.
7031 (x86_dr_low_get_control): Rename to...
7032 (x86_linux_dr_get_control): ...this.
7033 (x86_dr_low_get_status): Rename to...
7034 (x86_linux_dr_get_status): ...this.
7035 (x86_dr_low): Update with new function names.
7037 2015-03-24 Gary Benson <gbenson@redhat.com>
7039 * Makefile.in (x86-linux.o): New rule.
7040 * configure.srv: Add x86-linux.o to relevant targets.
7041 * linux-low.c (lwp_set_arch_private_info): New function.
7042 (lwp_arch_private_info): Likewise.
7043 * linux-x86-low.c: Include nat/x86-linux.h.
7044 (arch_lwp_info): Removed structure.
7045 (update_debug_registers_callback):
7046 Use lwp_set_debug_registers_changed.
7047 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7048 and lwp_set_debug_registers_changed.
7049 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7051 2015-03-24 Gary Benson <gbenson@redhat.com>
7053 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7054 * linux-arm-low.c (arm_new_thread): Likewise.
7055 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7056 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7057 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7058 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7060 2015-03-24 Gary Benson <gbenson@redhat.com>
7062 * linux-low.c (ptid_of_lwp): New function.
7063 (lwp_is_stopped): Likewise.
7064 (lwp_stop_reason): Likewise.
7065 * linux-x86-low.c (update_debug_registers_callback):
7067 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7070 2015-03-24 Gary Benson <gbenson@redhat.com>
7072 * linux-low.h (linux_stop_lwp): Remove declaration.
7074 2015-03-24 Gary Benson <gbenson@redhat.com>
7076 * linux-low.h: Include nat/linux-nat.h.
7077 * linux-low.c (iterate_over_lwps_args): New structure.
7078 (iterate_over_lwps_filter): New function.
7079 (iterate_over_lwps): Likewise.
7080 * linux-x86-low.c (update_debug_registers_callback):
7081 Update signature to what iterate_over_lwps expects.
7082 Remove PID check that iterate_over_lwps now performs.
7083 (x86_dr_low_set_addr): Use iterate_over_lwps.
7084 (x86_dr_low_set_control): Likewise.
7086 2015-03-24 Gary Benson <gbenson@redhat.com>
7088 * linux-x86-low.c (x86_debug_reg_state): New function.
7089 (x86_linux_prepare_to_resume): Use the above.
7091 2015-03-24 Gary Benson <gbenson@redhat.com>
7093 * linux-low.c (current_lwp_ptid): New function.
7094 * linux-x86-low.c: Include nat/linux-nat.h.
7095 (x86_dr_low_get_addr): Use current_lwp_ptid.
7096 (x86_dr_low_get_control): Likewise.
7097 (x86_dr_low_get_status): Likewise.
7099 2015-03-20 Pedro Alves <palves@redhat.com>
7101 * tracepoint.c (cmd_qtstatus): Make "str" const.
7103 2015-03-20 Pedro Alves <palves@redhat.com>
7105 * server.c (handle_general_set): Make "req_str" const.
7107 2015-03-19 Pedro Alves <palves@redhat.com>
7109 * linux-low.c (linux_resume_one_lwp): Rename to ...
7110 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7111 instead call perror_with_name.
7112 (check_ptrace_stopped_lwp_gone): New function.
7113 (linux_resume_one_lwp): Reimplement as wrapper around
7114 linux_resume_one_lwp_throw that swallows errors if the LWP is
7117 2015-03-19 Pedro Alves <palves@redhat.com>
7119 * linux-low.c (count_events_callback, select_event_lwp_callback):
7120 No longer check whether the thread has resume_stop as last resume
7123 2015-03-19 Pedro Alves <palves@redhat.com>
7125 * linux-low.c (count_events_callback, select_event_lwp_callback):
7126 Use the lwp's status_pending_p field, not the thread's.
7128 2015-03-19 Pedro Alves <palves@redhat.com>
7130 * linux-low.c (select_event_lwp_callback): Update comments to
7131 no longer mention SIGTRAP.
7133 2015-03-18 Gary Benson <gbenson@redhat.com>
7135 * server.c (handle_query): Do not report vFile:fstat as supported.
7137 2015-03-11 Gary Benson <gbenson@redhat.com>
7139 * hostio.c (sys/types.h): New include.
7140 (sys/stat.h): Likewise.
7141 (common-remote-fileio.h): Likewise.
7142 (handle_fstat): New function.
7143 (handle_vFile): Handle vFile:fstat packets.
7145 2015-03-11 Gary Benson <gbenson@redhat.com>
7147 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7148 struct stat.st_blocks and struct stat.st_blksize.
7149 * configure: Regenerate.
7150 * config.in: Likewise.
7151 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7152 (OBS): Add common-remote-fileio.o.
7153 (common-remote-fileio.o): New rule.
7155 2015-03-09 Pedro Alves <palves@redhat.com>
7157 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7158 'struct sockaddr' pointer in 'accept' call.
7160 2015-03-09 Pedro Alves <palves@redhat.com>
7163 2015-03-07 Pedro Alves <palves@redhat.com>
7164 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7165 or <winsock2.h> here. Instead include "gdb_socket.h".
7166 (remote_open): Use union gdb_sockaddr_u.
7167 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7168 or <winsock2.h> here. Instead include "gdb_socket.h".
7169 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7170 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7172 (init_named_socket, gdb_agent_helper_thread): Use union
7175 2015-03-07 Pedro Alves <palves@redhat.com>
7177 * configure.ac (build_warnings): Move
7178 -Wdeclaration-after-statement to the C-specific set.
7179 * configure: Regenerate.
7181 2015-03-07 Pedro Alves <palves@redhat.com>
7183 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7184 or <winsock2.h> here. Instead include "gdb_socket.h".
7185 (remote_open): Use union gdb_sockaddr_u.
7186 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7187 or <winsock2.h> here. Instead include "gdb_socket.h".
7188 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7189 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7191 (init_named_socket, gdb_agent_helper_thread): Use union
7194 2015-03-07 Pedro Alves <palves@redhat.com>
7196 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7199 2015-03-06 Yao Qi <yao.qi@linaro.org>
7201 * linux-aarch64-low.c (aarch64_insert_point): Use
7202 show_debug_regs as a boolean.
7203 (aarch64_remove_point): Likewise.
7205 2015-03-05 Pedro Alves <palves@redhat.com>
7207 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7208 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7209 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7210 * nto-low.c (nto_target_ops): Likewise.
7211 * spu-low.c (spu_target_ops): Likewise.
7212 * win32-low.c (win32_target_ops): Likewise.
7214 2015-03-04 Pedro Alves <palves@redhat.com>
7216 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7217 Decide whether a breakpoint triggered based on the SIGTRAP's
7219 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7220 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7221 (linux_low_filter_event): Check for breakpoints before checking
7223 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7225 (linux_stopped_by_sw_breakpoint)
7226 (linux_supports_stopped_by_sw_breakpoint)
7227 (linux_stopped_by_hw_breakpoint)
7228 (linux_supports_stopped_by_hw_breakpoint): New functions.
7229 (linux_target_ops): Install new target methods.
7231 2015-03-04 Pedro Alves <palves@redhat.com>
7233 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7234 * server.c (swbreak_feature, hwbreak_feature): New globals.
7235 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7236 (captured_main): Clear swbreak_feature and hwbreak_feature.
7237 * server.h (swbreak_feature, hwbreak_feature): Declare.
7238 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7239 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7240 supports_stopped_by_hw_breakpoint>: New fields.
7241 (target_supports_stopped_by_sw_breakpoint)
7242 (target_stopped_by_sw_breakpoint)
7243 (target_supports_stopped_by_hw_breakpoint)
7244 (target_stopped_by_hw_breakpoint): Declare.
7246 2015-03-04 Pedro Alves <palves@redhat.com>
7248 enum lwp_stop_reason -> enum target_stop_reason
7249 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7250 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7251 (linux_wait_1, stuck_in_jump_pad_callback)
7252 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7253 (linux_stopped_by_watchpoint):
7254 * linux-low.h (enum lwp_stop_reason): Delete.
7255 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7256 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7258 2015-03-04 Yao Qi <yao.qi@linaro.org>
7260 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7262 2015-03-03 Gary Benson <gbenson@redhat.com>
7264 * hostio.c (handle_vFile): Fix prefix lengths.
7266 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7268 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7271 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7273 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7274 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7275 (clean): Add "rm -f" for above C files.
7276 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7277 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7278 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7279 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7280 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7281 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7282 (init_registers_s390x_vx_linux64)
7283 (init_registers_s390x_tevx_linux64)
7284 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7285 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7287 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7288 (s390_store_vxrs_high): New functions.
7289 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7291 (s390_arch_setup): Add logic for selecting one of the new target
7292 descriptions. Activate the new vector regsets if applicable.
7293 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7294 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7295 and init_registers_s390x_tevx_linux64.
7297 2015-03-01 Pedro Alves <palves@redhat.com>
7299 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7302 2015-02-27 Pedro Alves <palves@redhat.com>
7304 * linux-x86-low.c (u_debugreg_offset): New function.
7305 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7307 2015-02-27 Pedro Alves <palves@redhat.com>
7309 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7310 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7311 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7312 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7313 (ps_lsetfpregs, ps_getpid)
7314 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7315 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7316 (ps_lsetxregs, ps_plog): Declare.
7318 2015-02-27 Pedro Alves <palves@redhat.com>
7320 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7321 IP_AGENT_EXPORT_FUNC.
7322 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7323 IP_AGENT_EXPORT_FUNC.
7324 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7325 (IP_AGENT_EXPORT): Delete.
7326 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7327 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7328 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7329 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7330 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7331 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7332 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7333 (traceframe_read_count, traceframe_write_count)
7334 (traceframes_created, trace_state_variables, get_raw_reg)
7335 (get_trace_state_variable_value, set_trace_state_variable_value)
7336 (ust_loaded, helper_thread_id, cmd_buf): Use
7337 IPA_SYM_EXPORTED_NAME.
7338 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7339 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7340 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7341 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7342 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7343 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7344 EXTERN_C_PUSH/EXTERN_C_POP.
7345 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7346 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7347 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7348 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7349 (traceframe_write_count, traceframe_read_count)
7350 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7351 (about_to_request_buffer_space, get_trace_state_variable_value)
7352 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7353 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7354 EXTERN_C_PUSH/EXTERN_C_POP.
7355 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7356 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7357 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7358 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7359 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7360 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7361 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7362 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7364 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7365 (IP_AGENT_EXPORT_VAR_DECL): Define.
7367 (gdb_agent_get_raw_reg): Declare.
7369 2015-02-27 Tom Tromey <tromey@redhat.com>
7370 Pedro Alves <palves@redhat.com>
7372 Rename symbols whose names are reserved C++ keywords throughout.
7374 2015-02-27 Pedro Alves <palves@redhat.com>
7376 * Makefile.in (COMPILER): New, get it from autoconf.
7377 (CXX): Get from autoconf instead.
7378 (COMPILE.pre): Use COMPILER.
7379 (CC-LD): Rename to ...
7380 (CC_LD): ... this. Use COMPILER.
7381 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7382 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7383 * acinclude.m4: Include build-with-cxx.m4.
7384 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7385 Disable -Werror by default if building in C++ mode.
7386 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7387 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7388 the C++ compiler. Save/restore CXXFLAGS too.
7389 * configure: Regenerate.
7391 2015-02-27 Pedro Alves <palves@redhat.com>
7393 * acinclude.m4: Include libiberty.m4.
7394 * configure.ac: Call libiberty_INIT.
7395 * config.in, configure: Regenerate.
7397 2015-02-26 Pedro Alves <palves@redhat.com>
7399 * linux-low.c (linux_wait_1): When incrementing the PC past a
7400 program breakpoint always use the_low_target.breakpoint_len as
7401 increment, rather than the maximum between that and
7402 the_low_target.decr_pc_after_break.
7404 2015-02-23 Pedro Alves <palves@redhat.com>
7406 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7407 thread was doing a step-over; always adjust the PC if
7408 we stepped over a permanent breakpoint.
7409 (linux_wait_1): If we stepped over breakpoint that was on top of a
7410 permanent breakpoint, manually advance the PC past it.
7412 2015-02-23 Pedro Alves <palves@redhat.com>
7414 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7416 (x86_fill_gregset, x86_store_gregset): Use it when handling
7419 2015-02-20 Pedro Alves <palves@redhat.com>
7421 * thread-db.c: Include "nat/linux-procfs.h".
7422 (thread_db_init): Skip listing new threads if the kernel supports
7423 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7425 2015-02-20 Pedro Alves <palves@redhat.com>
7427 * linux-low.c (status_pending_p_callback): Use ptid_match.
7429 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7431 PR breakpoints/16812
7432 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7433 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7434 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7436 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7438 PR breakpoints/15956
7439 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7441 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7443 * linux-low.c (linux_low_btrace_conf): Print size.
7444 * server.c (handle_btrace_conf_general_set): New.
7445 (hanle_general_set): Call handle_btrace_conf_general_set.
7446 (handle_query): Report Qbtrace-conf:bts:size as supported.
7448 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7450 * linux-low.c (linux_low_enable_btrace): Update parameters.
7451 (linux_low_btrace_conf): New.
7452 (linux_target_ops)<to_btrace_conf>: Initialize.
7453 * server.c (current_btrace_conf): New.
7454 (handle_btrace_enable): Rename to ...
7455 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7456 to target_enable_btrace. Update comment. Update users.
7457 (handle_qxfer_btrace_conf): New.
7458 (qxfer_packets): Add btrace-conf entry.
7459 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7460 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7461 (target_ops)<read_btrace_conf>: New.
7462 (target_enable_btrace): Update parameters.
7463 (target_read_btrace_conf): New.
7465 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7467 * server.c (handle_btrace_general_set): Remove call to
7468 target_supports_btrace.
7469 (supported_btrace_packets): New.
7470 (handle_query): Call supported_btrace_packets.
7471 * target.h: include btrace-common.h.
7472 (btrace_target_info): Removed.
7473 (supports_btrace, target_supports_btrace): Update parameters.
7475 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7477 * Makefile.in (SFILES): Add common/btrace-common.c.
7478 (OBS): Add common/btrace-common.o.
7479 (btrace-common.o): Add build rules.
7480 * linux-low: Include btrace-common.h.
7481 (linux_low_read_btrace): Use struct btrace_data. Call
7482 btrace_data_init and btrace_data_fini.
7484 2015-02-06 Pedro Alves <palves@redhat.com>
7486 * thread-db.c (find_new_threads_callback): Add debug output.
7488 2015-02-04 Pedro Alves <palves@redhat.com>
7490 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7491 (resume_stopped_resumed_lwps): New function.
7492 (linux_wait_for_event_filtered): Use it.
7494 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7496 * Makefile.in (SFILES): Add linux-personality.c.
7497 (linux-personality.o): New rule.
7498 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7499 list of objects to be built.
7500 * linux-low.c: Include nat/linux-personality.h.
7501 (linux_create_inferior): Remove code to disable address space
7502 randomization (moved to ../nat/linux-personality.c). Create
7503 cleanup to disable address space randomization.
7505 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7507 * Makefile.in (posix-strerror.o): New rule.
7508 (mingw-strerror.o): Likewise.
7509 * configure: Regenerated.
7510 * configure.ac: Source file ../common/common.host. Initialize new
7511 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7513 2015-01-14 Yao Qi <yao@codesourcery.com>
7515 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7516 (ppc-linux.o): New rule.
7517 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7518 * configure.ac: AC_CHECK_FUNCS(getauxval).
7519 * config.in: Re-generated.
7520 * configure: Re-generated.
7521 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7522 ppc64_64bit_inferior_p
7524 2015-01-14 Yao Qi <yao@codesourcery.com>
7526 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7527 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7528 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7529 (PT_ORIG_R3, PT_TRAP): Likewise.
7530 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7531 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7532 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7534 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7536 * i387-fp.c (i387_cache_to_xsave): In look over
7537 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7538 zmmh_low_space field by use of zmmh_high_space.
7540 2015-01-09 Pedro Alves <palves@redhat.com>
7542 * linux-low.c (step_over_bkpt): Move higher up in the file.
7543 (handle_extended_wait): Don't store the stop_pc here.
7544 (get_stop_pc): Adjust comments and rename to ...
7545 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7546 stopped for a software breakpoint or hardware breakpoint.
7547 (thread_still_has_status_pending_p): New function.
7548 (status_pending_p_callback): Use
7549 thread_still_has_status_pending_p. If the event is no longer
7550 interesting, resume the LWP.
7551 (handle_tracepoints): Add assert.
7552 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7553 (wstatus_maybe_breakpoint): New function.
7554 (cancel_breakpoint): Delete function.
7555 (check_stopped_by_watchpoint): New function, factored out from
7556 linux_low_filter_event.
7557 (lp_status_maybe_breakpoint): Delete function.
7558 (linux_low_filter_event): Remove filter_ptid argument.
7559 Leave thread group exits pending here. Store the LWP's stop PC.
7560 Always leave events pending.
7561 (linux_wait_for_event_filtered): Pull all events out of the
7562 kernel, and leave them all pending.
7563 (count_events_callback, select_event_lwp_callback): Consider all
7565 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7566 (select_event_lwp): Only give preference to the stepping LWP in
7567 all-stop mode. Adjust comments.
7568 (ignore_event): New function.
7569 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7570 references to cancel_breakpoints. Adjust to renames. Also give
7571 equal priority to all LWPs that have had events in non-stop mode.
7572 If reporting a software breakpoint event, unadjust the LWP's PC.
7573 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7574 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7576 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7577 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7578 (linux_stopped_by_watchpoint): Adjust.
7579 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7580 * linux-low.h (enum lwp_stop_reason): New.
7581 (struct lwp_info) <stop_pc>: Adjust comment.
7582 <stopped_by_watchpoint>: Delete field.
7583 <stop_reason>: New field.
7584 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7585 * mem-break.c (software_breakpoint_inserted_here)
7586 (hardware_breakpoint_inserted_here): New function.
7587 * mem-break.h (software_breakpoint_inserted_here)
7588 (hardware_breakpoint_inserted_here): Declare.
7589 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7590 (cancel_breakpoints): Delete.
7591 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7592 (upload_fast_traceframes): Remove references to
7595 2015-01-09 Pedro Alves <palves@redhat.com>
7597 * thread-db.c (find_new_threads_callback): Ignore thread if the
7598 kernel thread ID is -1.
7600 2015-01-09 Pedro Alves <palves@redhat.com>
7602 * linux-low.c (linux_attach_fail_reason_string): Move to
7603 nat/linux-ptrace.c, and rename.
7604 (linux_attach_lwp): Update comment.
7605 (attach_proc_task_lwp_callback): New function.
7606 (linux_attach): Adjust to rename and use
7607 linux_proc_attach_tgid_threads.
7608 (linux_attach_fail_reason_string): Delete declaration.
7610 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7612 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7613 * server.c (gdbserver_version): Likewise.
7615 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7617 * remote-utils.c: Include ctype.h.
7618 (input_interrupt): Explicitly handle the case when the char
7619 received is the NUL byte. Improve the printing of non-ASCII
7622 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7624 * linux-low.c (linux_low_filter_event): Update call to
7625 linux_enable_event_reporting following the addition of
7626 a new parameter to that function.
7628 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7631 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7632 (AARCH64_FPCR_REGNO): Likewise.
7633 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7634 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7635 (aarch64_store_fpregset): Likewise.
7637 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7639 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7640 Remove FIXME comment about assumption about N.
7642 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7644 * configure.ac: If large-file support is disabled in GDBserver,
7645 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7646 * configure: Regenerate.
7648 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7650 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7651 warning upon ENODATA from ptrace.
7652 * linux-s390-low.c (s390_store_tdb): New.
7653 (s390_regsets): Add regset for NT_S390_TDB.
7655 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7657 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7658 without a fill_function.
7659 * linux-s390-low.c (s390_fill_last_break): Remove.
7660 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7661 (s390_arch_setup): Use regset's size instead of fill_function for
7664 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7666 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7667 the regset's store function when ptrace returned an error.
7668 * regcache.c (get_thread_regcache): Invalidate register cache
7669 before fetching inferior's registers.
7671 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7673 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7674 while-loop as for-loop.
7675 (regsets_store_inferior_registers): Likewise.
7677 2014-11-28 Yao Qi <yao@codesourcery.com>
7679 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7680 * config.in, configure: Re-generate.
7681 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7684 2014-11-21 Yao Qi <yao@codesourcery.com>
7686 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7687 (AC_CHECK_HEADERS): Remove malloc.h.
7688 * configure: Re-generated.
7689 * config.in: Re-generated.
7690 * server.h: Don't include alloca.h and malloc.h.
7691 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7692 Don't include malloc.h.
7694 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7696 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7697 corresponding ERRNO check in same block.
7699 2014-11-12 Pedro Alves <palves@redhat.com>
7701 * server.c (cont_thread): Update comment.
7702 (start_inferior, attach_inferior): No longer clear cont_thread.
7703 (handle_v_cont): No longer set cont_thread.
7704 (captured_main): Clear cont_thread each time a GDB connects.
7706 2014-11-12 Pedro Alves <palves@redhat.com>
7708 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7709 thread, and don't resume all threads if the Hc thread has exited.
7711 2014-11-12 Pedro Alves <palves@redhat.com>
7713 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7714 the process group instead of to a specific LWP.
7716 2014-10-15 Pedro Alves <palves@redhat.com>
7719 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7721 (arm_set_thread_context): Delete.
7722 (the_low_target): Adjust.
7723 * win32-i386-low.c (debug_registers_changed)
7724 (debug_registers_used): Delete.
7725 (update_debug_registers_callback): New function.
7726 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7727 needing to update their debug registers.
7728 (win32_get_current_dr): New function.
7729 (x86_dr_low_get_addr, x86_dr_low_get_control)
7730 (x86_dr_low_get_status): Fetch the debug register from the thread
7732 (i386_initial_stuff): Adjust.
7733 (i386_get_thread_context): Remove current_event parameter. Don't
7734 clear debug_registers_changed nor copy DR values to
7736 (i386_set_thread_context): Delete.
7737 (i386_prepare_to_resume): New function.
7738 (i386_thread_added): Mark the thread as needing to update irs
7740 (the_low_target): Remove i386_set_thread_context and install
7741 i386_prepare_to_resume.
7742 * win32-low.c (win32_get_thread_context): Adjust.
7743 (win32_set_thread_context): Use SetThreadContext
7745 (win32_prepare_to_resume): New function.
7746 (win32_require_context): New function, factored out from ...
7747 (thread_rec): ... this.
7748 (continue_one_thread): Call win32_prepare_to_resume on each thread
7749 we're about to continue.
7750 (win32_resume): Call win32_prepare_to_resume on the event thread.
7751 * win32-low.h (struct win32_thread_info)
7752 <debug_registers_changed>: New field.
7753 (struct win32_target_ops): Change prototype of set_thread_context,
7754 delete set_thread_context and add prepare_to_resume.
7755 (win32_require_context): New declaration.
7757 2014-10-08 Gary Benson <gbenson@redhat.com>
7759 * server.h: Do not include common-exceptions.h.
7761 2014-10-08 Gary Benson <gbenson@redhat.com>
7763 * server.h: Do not include cleanups.h.
7765 2014-09-30 James Hogan <james.hogan@imgtec.com>
7767 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7770 2014-09-23 Yao Qi <yao@codesourcery.com>
7772 * linux-low.c (lp_status_maybe_breakpoint): New function.
7773 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7774 (count_events_callback): Likewise.
7775 (select_event_lwp_callback): Likewise.
7776 (cancel_breakpoints_callback): Likewise.
7778 2014-09-19 Don Breazeal <donb@codesourcery.com>
7780 * linux-low.c (handle_extended_wait): Call
7781 linux_ptrace_get_extended_event.
7782 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7783 linux_is_extended_waitstatus.
7785 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7787 * Makefile.in (CPPFLAGS): Define.
7788 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7789 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7791 2014-09-16 Gary Benson <gbenson@redhat.com>
7793 * inferiors.h (current_inferior): Renamed as...
7794 (current_thread): New variable. All uses updated.
7795 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7796 (maybe_move_out_of_jump_pad): Likewise.
7797 (cancel_breakpoint): Likewise.
7798 (linux_low_filter_event): Likewise.
7799 (wait_for_sigstop): Likewise.
7800 (linux_resume_one_lwp): Likewise.
7801 (need_step_over_p): Likewise.
7802 (start_step_over): Likewise.
7803 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7804 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7805 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7806 and save_inferior as saved_thread.
7807 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7809 (regcache_invalidate_thread): Likewise.
7810 * remote-utils.c (prepare_resume_reply): Likewise.
7811 * thread-db.c (thread_db_get_tls_address): Likewise.
7812 (disable_thread_event_reporting): Likewise.
7813 (remove_thread_event_breakpoints): Likewise.
7814 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7816 * target.h (set_desired_inferior): Renamed as...
7817 (set_desired_thread): New declaration. All uses updated.
7818 * server.c (myresume): Updated comment to reference thread instead
7820 (handle_serial_event): Likewise.
7821 (handle_target_event): Likewise.
7823 2014-09-12 Tom Tromey <tromey@redhat.com>
7824 Gary Benson <gbenson@redhat.com>
7826 * regcache.h: Include common-regcache.h.
7827 (regcache_read_pc): Don't declare.
7828 * regcache.c (get_thread_regcache_for_ptid): New function.
7830 2014-09-11 Tom Tromey <tromey@redhat.com>
7831 Gary Benson <gbenson@redhat.com>
7833 * symbol.c: New file.
7834 * Makefile.in (SFILES): Add symbol.c.
7835 (OBS): Add symbol.o.
7837 2014-09-11 Gary Benson <gbenson@redhat.com>
7839 * target.c (target_stop_ptid, target_continue_ptid): New
7842 2014-09-11 Tom Tromey <tromey@redhat.com>
7843 Gary Benson <gbenson@redhat.com>
7845 * target.h: Include target/target.h.
7846 * target.c (target_read_memory, target_read_uint32)
7847 (target_write_memory): New functions.
7849 2014-09-11 Gary Benson <gbenson@redhat.com>
7851 * server.h (debug_hw_points): Don't declare.
7852 * server.c (debug_hw_points): Don't define. Replace all uses
7853 with show_debug_regs.
7854 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7855 all uses with show_debug_regs.
7857 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7859 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7860 endianness into account.
7861 (ppc_supply_ptrace_register): Likewise.
7863 2014-09-03 James Hogan <james.hogan@imgtec.com>
7865 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7866 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7868 2014-09-03 Gary Benson <gbenson@redhat.com>
7870 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7871 ALL_DEBUG_ADDRESS_REGISTERS.
7873 2014-09-02 Gary Benson <gbenson@redhat.com>
7875 * i386-low.h: Renamed as...
7876 * x86-low.h: New file. All type, function and variable name
7877 prefixes changed from "i386_" to "x86_". All references updated.
7878 * i386-low.c: Renamed as...
7879 * x86-low.c: New file. All type, function and variable name
7880 prefixes changed from "i386_" to "x86_". All references updated.
7882 2014-09-02 Gary Benson <gbenson@redhat.com>
7884 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7885 (x86_linux_new_thread): Likewise.
7887 2014-08-29 Gary Benson <gbenson@redhat.com>
7889 * server.h (setjmp.h): Do not include.
7890 (toplevel): Do not declare.
7891 (common-exceptions.h): Include.
7892 (cleanups.h): Likewise.
7893 * server.c (toplevel): Do not define.
7894 (exit_code): New static global.
7895 (detach_or_kill_for_exit_cleanup): New function.
7896 (main): New function. Original main renamed to...
7897 (captured_main): New function.
7898 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7900 2014-08-29 Gary Benson <gbenson@redhat.com>
7902 * Makefile.in (SFILES): Add common/common-exceptions.c.
7903 (OBS): Add common-exceptions.o.
7904 (common-exceptions.o): New rule.
7905 * utils.c (prepare_to_throw_exception): New function.
7907 2014-08-29 Gary Benson <gbenson@redhat.com>
7909 * config.in: Regenerate.
7910 * configure: Likewise.
7912 2014-08-29 Gary Benson <gbenson@redhat.com>
7914 * Makefile.in (SFILES): Add common/cleanups.c.
7916 (cleanups.o): New rule.
7918 2014-08-29 Gary Benson <gbenson@redhat.com>
7920 * utils.c (internal_vwarning): New function.
7922 2014-08-28 Gary Benson <gbenson@redhat.com>
7924 * utils.h (fatal): Remove declaration.
7925 * utils.c (fatal): Remove function.
7927 2014-08-28 Gary Benson <gbenson@redhat.com>
7929 * tracepoint.c (gdb_agent_init): Replace fatal with
7931 (initialize_tracepoint): Likewise.
7933 2014-08-28 Gary Benson <gbenson@redhat.com>
7935 * remote-utils.c (remote_prepare): Replace fatal with error.
7937 2014-08-28 Gary Benson <gbenson@redhat.com>
7939 * linux-low.c (linux_async): Replace fatal with warning.
7941 (linux_start_non_stop): Return -1 if linux_async failed.
7943 2014-08-28 Gary Benson <gbenson@redhat.com>
7945 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7947 (i386_dr_low_get_addr): Remove vague comment.
7948 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7951 2014-08-28 Gary Benson <gbenson@redhat.com>
7953 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7954 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7956 (linux_resume_one_lwp): Likewise.
7957 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7959 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7960 with internal_error.
7961 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7962 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7963 (find_register_by_name): Replace fatal with internal_error.
7964 (find_regno): Likewise.
7965 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7966 * thread-db.c (thread_db_create_event): Likewise.
7967 (thread_db_load_search): Likewise.
7968 (try_thread_db_load_1): Likewise.
7969 * tracepoint.c (get_jump_space_head): Replace fatal with
7971 (claim_trampoline_space): Likewise.
7972 (have_fast_tracepoint_trampoline_buffer): Likewise.
7973 (cmd_qtstart): Likewise.
7974 (stop_tracing): Likewise.
7975 (fast_tracepoint_collecting): Likewise.
7976 (target_malloc): Likewise.
7977 (download_tracepoint): Likewise.
7978 (download_trace_state_variables): Replace check with gdb_assert.
7979 (upload_fast_traceframes): Replace fatal with internal_error.
7981 2014-08-19 Tom Tromey <tromey@redhat.com>
7982 Gary Benson <gbenson@redhat.com>
7984 * Makefile.in (SFILES): Add common/common-debug.c.
7985 (OBS): Add common-debug.o.
7986 (common-debug.o): New rule.
7987 * debug.h (debug_printf): Don't declare.
7988 * debug.c (debug_printf): Renamed and rewritten as...
7989 (debug_vprintf): New function.
7991 2014-08-19 Gary Benson <gbenson@redhat.com>
7993 * utils.h: Do not include print-utils.h.
7995 2014-08-19 Tom Tromey <tromey@redhat.com>
7996 Gary Benson <gbenson@redhat.com>
7998 * server.h: Add static assertion.
7999 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8001 2014-08-19 Tom Tromey <tromey@redhat.com>
8002 Gary Benson <gbenson@redhat.com>
8004 * Makefile.in (SFILES): Add common/errors.c.
8005 (OBS): Add errors.o.
8006 (IPA_OBS): Add errors-ipa.o.
8007 (errors.o): New rule.
8008 (errors-ipa.o): Likewise.
8009 * utils.h (perror_with_name, error, warning): Don't declare.
8010 * utils.c (warning): Renamed and rewritten as...
8011 (vwarning): New function.
8012 (error): Renamed and rewritten as...
8013 (verror): New function.
8014 (internal_error): Renamed and rewritten as...
8015 (internal_verror): New function.
8017 2014-08-07 Gary Benson <gbenson@redhat.com>
8019 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8020 * configure: Regenerate.
8021 * config.in: Likewise.
8022 * server.h: Do not include errno.h.
8023 * event-loop.c: Likewise.
8024 * hostio-errno.c: Likewise.
8025 * linux-low.c: Likewise.
8026 * remote-utils.c: Likewise.
8027 * spu-low.c: Likewise.
8028 * utils.c: Likewise.
8029 * gdbreplay.c: Unconditionally include errno.h.
8031 2014-08-07 Gary Benson <gbenson@redhat.com>
8033 * server.h: Do not include string.h.
8034 * event-loop.c: Likewise.
8035 * linux-low.c: Likewise.
8036 * regcache.c: Likewise.
8037 * remote-utils.c: Likewise.
8038 * spu-low.c: Likewise.
8039 * utils.c: Likewise.
8041 2014-08-07 Gary Benson <gbenson@redhat.com>
8043 * server.h: Do not include gdb_assert.h.
8045 2014-08-07 Gary Benson <gbenson@redhat.com>
8047 * server.h: Do not include common-utils.h.
8049 2014-08-07 Gary Benson <gbenson@redhat.com>
8051 * server.h: Do not include ptid.h.
8052 * notif.h: Likewise.
8054 2014-08-07 Gary Benson <gbenson@redhat.com>
8056 * server.h: Do not include gdb_locale.h.
8058 2014-08-07 Gary Benson <gbenson@redhat.com>
8060 * server.h: Do not include gdb/signals.h.
8061 * win32-low.c: Likewise.
8063 2014-08-07 Gary Benson <gbenson@redhat.com>
8065 * server.h: Do not include pathmax.h.
8067 2014-08-07 Gary Benson <gbenson@redhat.com>
8069 * server.h: Do not include libiberty.h.
8070 * linux-bfin-low.c: Likewise.
8072 2014-08-07 Gary Benson <gbenson@redhat.com>
8074 * server.h: Do not include ansidecl.h.
8076 2014-08-07 Gary Benson <gbenson@redhat.com>
8078 * linux-x86-low.c: Do not include stddef.h.
8079 * lynx-ppc-low.c: Likewise.
8080 * tracepoint.c: Likewise.
8082 2014-08-07 Gary Benson <gbenson@redhat.com>
8084 * server.h: Do not include stdarg.h.
8085 * nto-low.c: Likewise.
8087 2014-08-07 Gary Benson <gbenson@redhat.com>
8089 * server.h: Do not include stdlib.h.
8090 * inferiors.c: Likewise.
8091 * linux-low.c: Likewise.
8092 * regcache.c: Likewise.
8093 * spu-low.c: Likewise.
8094 * tracepoint.c: Likewise.
8095 * utils.c: Likewise.
8097 2014-08-07 Gary Benson <gbenson@redhat.com>
8099 * server.h: Do not include stdio.h.
8100 * linux-low.c: Likewise.
8101 * remote-utils.c: Likewise.
8102 * spu-low.c: Likewise.
8103 * utils.c: Likewise.
8104 * wincecompat.c: Likewise.
8106 2014-08-06 Gary Benson <gbenson@redhat.com>
8108 * regcache.c (init_register_cache): Move conditionals inside if.
8110 2014-08-06 Gary Benson <gbenson@redhat.com>
8112 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8114 2014-07-31 Gary Benson <gbenson@redhat.com>
8116 * ax.h: Do not include server.h.
8117 * gdbthread.h: Likewise.
8118 * lynx-low.h: Likewise.
8119 * notif.h: Likewise.
8121 2014-07-30 Gary Benson <gbenson@redhat.com>
8123 * server.h: Include common-defs.h.
8124 Do not include config.h or build-gnulib-gdbserver/config.h.
8126 2014-07-30 Gary Benson <gbenson@redhat.com>
8128 * hostio-errno.c: Move server.h to top of includes list.
8129 * inferiors.c: Likewise.
8130 * linux-x86-low.c: Likewise.
8131 * notif.c: Include server.h.
8133 2014-07-24 Tom Tromey <tromey@redhat.com>
8134 Gary Benson <gbenson@redhat.com>
8136 * server.h (CORE_ADDR): Now unsigned.
8138 2014-07-16 Pedro Alves <palves@redhat.com>
8140 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8142 2014-07-15 Pedro Alves <palves@redhat.com>
8144 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8147 2014-07-11 Pedro Alves <palves@redhat.com>
8149 * linux-low.c (kill_wait_lwp): New function, based on
8150 kill_one_lwp_callback, but use my_waitpid directly.
8151 (kill_one_lwp_callback, linux_kill): Use it.
8153 2014-06-23 Pedro Alves <palves@redhat.com>
8155 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8156 before setting DR0..DR3.
8158 2014-06-20 Gary Benson <gbenson@redhat.com>
8160 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8161 * configure: Regenerated.
8162 * config.in: Likewise.
8164 2014-06-20 Gary Benson <gbenson@redhat.com>
8166 * Makefile.in (SFILES): Update locations for files moved
8168 (object file files): Reordered.
8170 2014-06-20 Gary Benson <gbenson@redhat.com>
8172 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8173 (i386_dr_low_set_addr): Likewise.
8174 (i386_dr_low_get_addr): Likewise.
8175 (i386_dr_low_can_set_control): Likewise.
8176 (i386_dr_low_set_control): Likewise.
8177 (i386_dr_low_get_control): Likewise.
8178 (i386_dr_low_get_status): Likewise.
8179 (i386_get_debug_register_length): Likewise.
8180 * linux-x86-low.c (i386_dr_low_set_addr):
8181 Changed signature. Made static.
8182 (i386_dr_low_get_addr): Likewise.
8183 (i386_dr_low_set_control): Likewise.
8184 (i386_dr_low_get_control): Likewise.
8185 (i386_dr_low_get_status): Likewise.
8186 (i386_dr_low): New global variable.
8187 * win32-i386-low.c (i386_dr_low_set_addr):
8188 Changed signature. Made static.
8189 (i386_dr_low_get_addr): Likewise.
8190 (i386_dr_low_set_control): Likewise.
8191 (i386_dr_low_get_control): Likewise.
8192 (i386_dr_low_get_status): Likewise.
8193 (i386_dr_low): New global variable.
8195 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8197 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8198 * Makefile.in (AR, AR_FLAGS): Define.
8199 * configure: Regenerate.
8201 2014-06-19 Gary Benson <gbenson@redhat.com>
8203 * Makefile.in (i386-dregs.o): New rule.
8204 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8205 * i386-low.c (target.h): Remove include.
8206 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8207 (DR_CONTROL_SHIFT): Likewise.
8208 (DR_CONTROL_SIZE): Likewise.
8209 (DR_RW_EXECUTE): Likewise.
8210 (DR_RW_WRITE): Likewise.
8211 (DR_RW_READ): Likewise.
8212 (DR_RW_IORW): Likewise.
8213 (DR_LEN_1): Likewise.
8214 (DR_LEN_2): Likewise.
8215 (DR_LEN_4): Likewise.
8216 (DR_LEN_8): Likewise.
8217 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8218 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8219 (DR_ENABLE_SIZE): Likewise.
8220 (DR_LOCAL_SLOWDOWN): Likewise.
8221 (DR_GLOBAL_SLOWDOWN): Likewise.
8222 (DR_CONTROL_RESERVED): Likewise.
8223 (I386_DR_CONTROL_MASK): Likewise.
8224 (I386_DR_VACANT): Likewise.
8225 (I386_DR_LOCAL_ENABLE): Likewise.
8226 (I386_DR_GLOBAL_ENABLE): Likewise.
8227 (I386_DR_DISABLE): Likewise.
8228 (I386_DR_SET_RW_LEN): Likewise.
8229 (I386_DR_GET_RW_LEN): Likewise.
8230 (I386_DR_WATCH_HIT): Likewise.
8231 (i386_wp_op_t): Likewise.
8232 (i386_show_dr): Likewise.
8233 (i386_length_and_rw_bits): Likewise.
8234 (i386_insert_aligned_watchpoint): Likewise.
8235 (i386_remove_aligned_watchpoint): Likewise.
8236 (i386_handle_nonaligned_watchpoint): Likewise.
8237 i386_update_inferior_debug_regs(): Likewise.
8238 (i386_dr_insert_watchpoint): Likewise.
8239 (i386_dr_remove_watchpoint): Likewise.
8240 (i386_dr_region_ok_for_watchpoint): Likewise.
8241 (i386_dr_stopped_data_address): Likewise.
8242 (i386_dr_stopped_by_watchpoint): Likewise.
8244 2014-06-19 Gary Benson <gbenson@redhat.com>
8246 * i386-low.c (i386_dr_show): Renamed to
8247 i386_show_dr and made static. All uses updated.
8248 (i386_dr_length_and_rw_bits): Renamed to
8249 i386_length_and_rw_bits and made static.
8251 (i386_dr_insert_aligned_watchpoint): Renamed to
8252 i386_insert_aligned_watchpoint and made static.
8254 (i386_dr_remove_aligned_watchpoint): Renamed to
8255 i386_remove_aligned_watchpoint and made static.
8257 (i386_dr_update_inferior_debug_regs): Renamed to
8258 i386_update_inferior_debug_regs and made static.
8261 2014-06-18 Gary Benson <gbenson@redhat.com>
8263 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8264 (i386_dr_low_can_set_control): Likewise.
8265 (i386_get_debug_register_length): Likewise.
8266 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8267 (i386_dr_low_can_set_control): Likewise.
8268 (i386_get_debug_register_length): Likewise.
8270 2014-06-17 Gary Benson <gbenson@redhat.com>
8272 * i386-low.h (i386-dregs.h): New include.
8273 (DR_FIRSTADDR): Now in i386-dregs.h.
8274 (DR_LASTADDR): Likewise.
8275 (DR_NADDR): Likewise.
8276 (DR_STATUS): Likewise.
8277 (DR_CONTROL): Likewise.
8278 (i386_debug_reg_state): Likewise.
8279 (i386_dr_insert_watchpoint): Likewise.
8280 (i386_dr_remove_watchpoint): Likewise.
8281 (i386_dr_region_ok_for_watchpoint): Likewise.
8282 (i386_dr_stopped_data_address): Likewise.
8283 (i386_dr_stopped_by_watchpoint): Likewise.
8284 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8286 2014-06-18 Gary Benson <gbenson@redhat.com>
8288 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8289 i386_dr_insert_watchpoint.
8290 (i386_low_remove_watchpoint): Renamed to
8291 i386_dr_remove_watchpoint.
8292 (i386_low_region_ok_for_watchpoint): Renamed to
8293 i386_dr_region_ok_for_watchpoint.
8294 (i386_low_stopped_data_address): Renamed to
8295 i386_dr_stopped_data_address.
8296 (i386_low_stopped_by_watchpoint): Renamed to
8297 i386_dr_stopped_by_watchpoint.
8298 * i386-low.c (i386_show_dr): Renamed to
8299 i386_dr_show and made nonstatic. All uses updated.
8300 (i386_length_and_rw_bits): Renamed to
8301 i386_dr_length_and_rw_bits and made nonstatic.
8303 (i386_insert_aligned_watchpoint): Renamed to
8304 i386_dr_insert_aligned_watchpoint and made nonstatic.
8306 (i386_remove_aligned_watchpoint): Renamed to
8307 i386_dr_remove_aligned_watchpoint and made nonstatic.
8309 (i386_update_inferior_debug_regs): Renamed to
8310 i386_dr_update_inferior_debug_regs and made nonstatic.
8312 (i386_low_insert_watchpoint): Renamed to
8313 i386_dr_insert_watchpoint. All uses updated.
8314 (i386_low_remove_watchpoint): Renamed to
8315 i386_dr_remove_watchpoint. All uses updated.
8316 (i386_low_region_ok_for_watchpoint): Renamed to
8317 i386_dr_region_ok_for_watchpoint. All uses updated.
8318 (i386_low_stopped_data_address): Renamed to
8319 i386_dr_stopped_data_address. All uses updated.
8320 (i386_low_stopped_by_watchpoint): Renamed to
8321 i386_dr_stopped_by_watchpoint. All uses updated.
8323 2014-06-18 Gary Benson <gbenson@redhat.com>
8325 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8326 (i386_dr_low_can_set_control): Likewise.
8327 (i386_insert_aligned_watchpoint): New check.
8329 2014-06-18 Gary Benson <gbenson@redhat.com>
8331 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8334 2014-06-18 Gary Benson <gbenson@redhat.com>
8336 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8337 instead of fatal and error.
8338 (i386_handle_nonaligned_watchpoint): Likewise.
8340 2014-06-18 Gary Benson <gbenson@redhat.com>
8342 * i386-low.c (i386_get_debug_register_length): New macro.
8343 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8344 (i386_show_dr): Use debug_printf instead of fprintf. Use
8345 phex to format values.
8347 2014-06-18 Gary Benson <gbenson@redhat.com>
8349 * i386-low.h: Comment changes.
8350 * i386-low.c: Likewise.
8352 2014-06-18 Gary Benson <gbenson@redhat.com>
8354 * i386-low.c: Whitespace changes.
8356 2014-06-12 Tom Tromey <tromey@redhat.com>
8358 * utils.c (freeargv): Remove.
8360 2014-06-12 Tom Tromey <tromey@redhat.com>
8362 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8363 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8364 (parse_debug_format_options): Likewise.
8365 (gdbserver_usage): Likewise.
8366 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8367 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8368 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8370 ($(LIBGNU)): Depend on libiberty.
8371 (all-lib): Recurse into all subdirs.
8372 (install-only): Invoke "install" target in subdirs.
8373 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8375 * configure: Rebuild.
8376 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8377 for vasprintf, vsnprintf, or gettimeofday.
8378 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8381 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8383 * development.sh: Delete.
8384 * Makefile.in (config.status): Adjust dependency on development.sh.
8385 * configure.ac: Adjust development.sh source call.
8386 * configure: Regenerate.
8388 2014-06-02 Pedro Alves <palves@redhat.com>
8390 * ax.c (gdb_free_agent_expr): New function.
8391 * ax.h (gdb_free_agent_expr): New declaration.
8392 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8394 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8396 (clear_breakpoint_conditions_and_commands): New function.
8397 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8398 (clear_breakpoint_conditions_and_commands): New declaration.
8400 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8402 * linux-aarch64-low.c (asm/ptrace.h): Include.
8404 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8406 Fix TLS access for -static -pthread.
8407 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8408 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8409 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8411 2014-05-20 Pedro Alves <palves@redhat.com>
8413 * linux-aarch64-low.c (aarch64_insert_point)
8414 (aarch64_remove_point): No longer check whether the type is
8415 supported here. Adjust to new interface.
8416 (the_low_target): Install aarch64_supports_z_point_type as
8417 supports_z_point_type method.
8418 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8419 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8420 instead of a Z packet char. Adjust.
8421 (arm_supports_z_point_type): New function.
8422 (arm_insert_point, arm_remove_point): Adjust to new interface.
8423 (the_low_target): Install arm_supports_z_point_type.
8424 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8425 (cris_insert_point, cris_remove_point): Adjust to new interface.
8426 Don't check whether the type is supported here.
8427 (the_low_target): Install cris_supports_z_point_type.
8428 * linux-low.c (linux_supports_z_point_type): New function.
8429 (linux_insert_point, linux_remove_point): Adjust to new interface.
8430 * linux-low.h (struct linux_target_ops) <insert_point,
8431 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8432 raw_breakpoint pointer parameter.
8433 <supports_z_point_type>: New method.
8434 * linux-mips-low.c (mips_supports_z_point_type): New function.
8435 (mips_insert_point, mips_remove_point): Adjust to new interface.
8436 Use mips_supports_z_point_type.
8437 (the_low_target): Install mips_supports_z_point_type.
8438 * linux-ppc-low.c (the_low_target): Install NULL as
8439 supports_z_point_type method.
8440 * linux-s390-low.c (the_low_target): Install NULL as
8441 supports_z_point_type method.
8442 * linux-sparc-low.c (the_low_target): Install NULL as
8443 supports_z_point_type method.
8444 * linux-x86-low.c (x86_supports_z_point_type): New function.
8445 (x86_insert_point): Adjust to new insert_point interface. Use
8446 insert_memory_breakpoint. Adjust to new
8447 i386_low_insert_watchpoint interface.
8448 (x86_remove_point): Adjust to remove_point interface. Use
8449 remove_memory_breakpoint. Adjust to new
8450 i386_low_remove_watchpoint interface.
8451 (the_low_target): Install x86_supports_z_point_type.
8452 * lynx-low.c (lynx_target_ops): Install NULL as
8453 supports_z_point_type callback.
8454 * nto-low.c (nto_supports_z_point_type): New.
8455 (nto_insert_point, nto_remove_point): Adjust to new interface.
8456 (nto_target_ops): Install nto_supports_z_point_type.
8457 * mem-break.c: Adjust intro comment.
8458 (struct raw_breakpoint) <raw_type, size>: New fields.
8459 <inserted>: Update comment.
8460 <shlib_disabled>: Delete field.
8461 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8462 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8463 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8464 (raw_bkpt_type_to_target_hw_bp_type): New function.
8465 (find_enabled_raw_code_breakpoint_at): New function.
8466 (find_raw_breakpoint_at): New type and size parameters. Use them.
8467 (insert_memory_breakpoint): New function, based off
8468 set_raw_breakpoint_at.
8469 (remove_memory_breakpoint): New function.
8470 (set_raw_breakpoint_at): Reimplement.
8471 (set_breakpoint): New, based on set_breakpoint_at.
8472 (set_breakpoint_at): Reimplement.
8473 (delete_raw_breakpoint): Go through the_target->remove_point
8474 instead of assuming memory breakpoints.
8475 (find_gdb_breakpoint_at): Delete.
8476 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8477 (find_gdb_breakpoint): New function.
8478 (set_gdb_breakpoint_at): Delete.
8479 (z_type_supported): New function.
8480 (set_gdb_breakpoint_1): New function, loosely based off
8481 set_gdb_breakpoint_at.
8482 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8483 (delete_gdb_breakpoint_at): Delete.
8484 (delete_gdb_breakpoint_1): New function, loosely based off
8485 delete_gdb_breakpoint_at.
8486 (delete_gdb_breakpoint): New function.
8487 (clear_gdb_breakpoint_conditions): Rename to ...
8488 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8490 (add_condition_to_breakpoint): Make static.
8491 (add_breakpoint_condition): Take a struct breakpoint pointer
8492 instead of an address. Adjust.
8493 (gdb_condition_true_at_breakpoint): Rename to ...
8494 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8496 (gdb_condition_true_at_breakpoint): Reimplement.
8497 (add_breakpoint_commands): Take a struct breakpoint pointer
8498 instead of an address. Adjust.
8499 (gdb_no_commands_at_breakpoint): Rename to ...
8500 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8501 parameter. Return true if no breakpoint was found. Change debug
8503 (gdb_no_commands_at_breakpoint): Reimplement.
8504 (run_breakpoint_commands): Rename to ...
8505 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8506 and change return type to boolean.
8507 (run_breakpoint_commands): New function.
8508 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8509 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8510 breakpoint. Go through the_target->remove_point instead of
8511 assuming memory breakpoint.
8512 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8513 software and hardware breakpoints.
8514 (reinsert_raw_breakpoint): Go through the_target->insert_point
8515 instead of assuming memory breakpoint.
8516 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8517 software and hardware breakpoints.
8518 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8519 Check both software and hardware breakpoints.
8520 (validate_inserted_breakpoint): Assert the breakpoint is a
8521 software breakpoint. Set the inserted flag to -1 instead of
8522 setting shlib_disabled.
8523 (delete_disabled_breakpoints): Adjust.
8524 (validate_breakpoints): Only validate software breakpoints.
8525 Adjust to inserted flag change.
8526 (check_mem_read, check_mem_write): Skip breakpoint types other
8527 than software breakpoints. Adjust to inserted flag change.
8528 * mem-break.h (enum raw_bkpt_type): New enum.
8529 (raw_breakpoint, struct process_info): Forward declare.
8530 (Z_packet_to_target_hw_bp_type): Delete declaration.
8531 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8532 (set_gdb_breakpoint, delete_gdb_breakpoint)
8533 (clear_breakpoint_conditions): New declarations.
8534 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8535 (breakpoint_inserted_here): Update comment.
8536 (add_breakpoint_condition, add_breakpoint_commands): Replace
8537 address parameter with a breakpoint pointer parameter.
8538 (gdb_breakpoint_here): Update comment.
8539 (delete_gdb_breakpoint_at): Delete.
8540 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8541 * server.c (process_point_options): Take a struct breakpoint
8542 pointer instead of an address. Adjust.
8543 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8544 delete_gdb_breakpoint.
8545 * spu-low.c (spu_target_ops): Install NULL as
8546 supports_z_point_type method.
8547 * target.h: Include mem-break.h.
8548 (struct target_ops) <prepare_to_access_memory>: Update comment.
8549 <supports_z_point_type>: New field.
8550 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8551 instead of a char. Also take a raw breakpoint pointer.
8552 * win32-arm-low.c (the_low_target): Install NULL as
8553 supports_z_point_type.
8554 * win32-i386-low.c (i386_supports_z_point_type): New function.
8555 (i386_insert_point, i386_remove_point): Adjust to new interface.
8556 (the_low_target): Install i386_supports_z_point_type.
8557 * win32-low.c (win32_supports_z_point_type): New function.
8558 (win32_insert_point, win32_remove_point): Adjust to new interface.
8559 (win32_target_ops): Install win32_supports_z_point_type.
8560 * win32-low.h (struct win32_target_ops):
8561 <supports_z_point_type>: New method.
8562 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8563 instead of a char. Also take a raw breakpoint pointer.
8565 2014-05-20 Pedro Alves <palves@redhat.com>
8567 * mem-break.h: Include break-common.h.
8568 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8569 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8570 (Z_packet_to_target_hw_bp_type): New declaration.
8571 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8572 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8573 (Z_PACKET_ACCESS_WP): Delete macros.
8574 (Z_packet_to_hw_type): Delete function.
8575 * i386-low.h: Don't include break-common.h here.
8576 (Z_packet_to_hw_type): Delete declaration.
8577 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8578 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8579 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8580 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8581 * linux-aarch64-low.c: Don't include break-common.h here.
8582 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8583 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8584 (Z_packet_to_target_hw_bp_type): Delete function.
8585 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8587 (mips_insert_point, mips_remove_point): Use
8588 Z_packet_to_target_hw_bp_type.
8590 2014-05-20 Pedro Alves <palves@redhat.com>
8592 * linux-aarch64-low.c: Include break-common.h.
8593 (enum target_point_type): Delete.
8594 (Z_packet_to_point_type): Rename to ...
8595 (Z_packet_to_target_hw_bp_type): ... this, and return a
8596 target_hw_bp_type instead.
8597 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8598 instead of an enum target_point_type.
8599 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8601 (aarch64_dr_state_insert_one_point)
8602 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8603 (aarch64_handle_aligned_watchpoint)
8604 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8605 Take an enum target_hw_bp_type instead of an enum
8607 (aarch64_supports_z_point_type): New function.
8608 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8609 use Z_packet_to_target_hw_bp_type.
8611 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8613 * configure.ac: Only use -Werror by default when DEVELOPMENT
8615 * configure: Regenerate.
8617 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8619 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8620 * linux-x86-low.c (X86_64_USER_REGS): New.
8621 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8623 2014-04-28 Yao Qi <yao@codesourcery.com>
8625 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8628 2014-04-25 Pedro Alves <palves@redhat.com>
8631 * linux-low.c (linux_attach_fail_reason_string): New function.
8632 (linux_attach_lwp): Delete.
8633 (linux_attach_lwp_1): Rename to ...
8634 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8635 argument. Remove "initial" parameter. Return int instead of
8636 void. Don't error or warn here.
8637 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8638 failure to attach to the tgid. Call warning when failing to
8640 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8641 argument. Remove "initial" parameter. Return int instead of
8642 void. Don't error or warn here.
8643 (linux_attach_fail_reason_string): New declaration.
8644 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8645 interface change. Use linux_attach_fail_reason_string.
8647 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8648 Walfred Tedeschi <walfred.tedeschi@intel.com>
8650 * Makefile.in: Added rules to handle new files
8651 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8652 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8653 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8654 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8655 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8656 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8658 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8659 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8660 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8661 i386/x32-avx512.xml.
8662 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8663 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8664 i386/x32-avx512-linux.xml.
8665 * i387-fp.c (num_avx512_k_registers): New constant for number
8667 (num_avx512_zmmh_low_registers): New constant for number of
8668 lower ZMM registers (0-15).
8669 (num_avx512_zmmh_high_registers): New constant for number of
8670 higher ZMM registers (16-31).
8671 (num_avx512_ymmh_registers): New contant for number of higher
8672 YMM registers (ymm16-31 added by avx521 on x86_64).
8673 (num_avx512_xmm_registers): New constant for number of higher
8674 XMM registers (xmm16-31 added by AVX512 on x86_64).
8675 (struct i387_xsave): Add space for AVX512 registers.
8676 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8677 Add code to handle AVX512 registers.
8678 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8679 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8680 prototypei from generated file.
8681 (tdesc_amd64_avx512_linux): Likewise.
8682 (init_registers_x32_avx512_linux): Likewise.
8683 (tdesc_x32_avx512_linux): Likewise.
8684 (init_registers_i386_avx512_linux): Likewise.
8685 (tdesc_i386_avx512_linux): Likewise.
8686 (x86_64_regmap): Add AVX512 registers.
8687 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8689 (initialize_low_arch): Add code to initialize AVX512 registers.
8691 2014-04-23 Pedro Alves <palves@redhat.com>
8693 * mem-break.c (find_gdb_breakpoint_at): Make static.
8694 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8696 2014-04-23 Pedro Alves <palves@redhat.com>
8698 * i386-low.c: Don't include break-common.h here.
8699 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8700 prototype to take target_hw_bp_type as argument instead of a Z
8702 * i386-low.h: Include break-common.h here.
8703 (Z_packet_to_hw_type): Declare.
8704 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8706 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8707 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8708 (x86_remove_point): Convert the packet number to a
8709 target_hw_bp_type before calling i386_low_remove_watchpoint.
8710 * win32-i386-low.c (i386_insert_point): Convert the packet number
8711 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8712 (i386_remove_point): Convert the packet number to a
8713 target_hw_bp_type before calling i386_low_remove_watchpoint.
8715 2014-04-23 Pedro Alves <palves@redhat.com>
8717 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8719 2014-04-10 Pedro Alves <palves@redhat.com>
8721 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8722 Check if the condition or command is NULL before checking if the
8723 breakpoint is known. On success, return true.
8724 * mem-break.h (add_breakpoint_condition): Document return.
8725 (add_breakpoint_commands): Add describing comment.
8726 * server.c (skip_to_semicolon): New function.
8727 (process_point_options): Use it.
8729 2014-04-09 Pedro Alves <palves@redhat.com>
8731 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8734 2014-02-27 Pedro Alves <palves@redhat.com>
8737 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8739 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8741 (last_thread_of_process_p): Take a PID argument instead of a
8743 (linux_wait_for_lwp): Delete.
8744 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8746 (linux_low_filter_event): New function, party factored out from
8747 linux_wait_for_event.
8748 (linux_wait_for_event): Rename to ...
8749 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8750 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8751 sigsuspend. Check for zombie leaders.
8752 (linux_wait_for_event): Reimplement as wrapper around
8753 linux_wait_for_event_filtered.
8754 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8755 a normal or signal exit is seen, it's the whole process exiting.
8756 (wait_for_sigstop): No longer a for_each_inferior callback.
8757 Rewrite on top of linux_wait_for_event_filtered.
8758 (stop_all_lwps): Call wait_for_sigstop directly.
8759 * server.c (resume, handle_target_event): Handle
8760 TARGET_WAITKIND_NO_RESUMED.
8762 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8764 * win32-low.c (psapi_get_dll_name,
8765 * win32_CreateToolhelp32Snapshot): Delete.
8766 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8767 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8769 (handle_load_dll): Add function description.
8770 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8772 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8774 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8776 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8777 base address when calling win32_add_one_solib.
8778 (handle_load_dll): Delete local variable load_addr.
8779 Remove 0x1000 offset applied to DLL base address when calling
8780 win32_add_one_solib.
8781 (handle_unload_dll): Add comment.
8783 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8785 * win32-low.c (win32_add_all_dlls): Renames
8786 win32_ensure_ntdll_loaded. Rewrite function documentation.
8787 Adjust implementation to always load all DLLs.
8788 Add 0x1000 offset to DLL base address when calling
8789 win32_add_one_solib.
8790 (child_initialization_done): New static global.
8791 (do_initial_child_stuff): Set child_initialization_done to
8792 zero during child initialization, and 1 after. Replace call
8793 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8795 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8796 (handle_unload_dll): Add function documentation.
8797 (get_child_debug_event): Ignore load and unload DLL events
8798 during child initialization.
8800 2014-02-20 Doug Evans <dje@google.com>
8802 Remove global all_lwps.
8803 * inferiors.h (ptid_of): Move here from linux-low.h.
8804 (pid_of, lwpid_of): Ditto.
8805 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8806 parameter is a struct thread_info * now.
8807 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8808 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8809 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8811 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8812 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8813 * linux-arm-low.c (update_registers_callback): Update, "entry"
8814 parameter is a struct thread_info * now.
8815 Fetch lwpid from current_inferior directly.
8816 (arm_insert_point): Pass &all_threads to find_inferior instead of
8818 (arm_remove_point): Ditto.
8819 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8820 (arm_prepare_to_resume): Fetch pid from thread.
8821 (arm_read_description): Fetch lwpid from current_inferior directly.
8822 * linux-low.c (all_lwps): Delete.
8823 (delete_lwp): Delete call to remove_inferior.
8824 (handle_extended_wait): Fetch lwpid from thread.
8825 (add_lwp): Don't set lwp->entry.id. Remove call to
8826 add_inferior_to_list.
8827 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8828 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8829 (kill_one_lwp_callback): Ditto.
8830 (linux_kill): Don't dereference NULL pointer.
8831 Fetch ptid,lwpid from thread.
8832 (get_detach_signal): Fetch ptid from thread.
8833 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8834 Simplify call to regcache_invalidate_thread.
8835 (delete_lwp_callback): Update, "entry" parameter is a
8836 struct thread_info * now. Fetch pid from thread.
8837 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8838 (status_pending_p_callback): Update, "entry" parameter is a
8839 struct thread_info * now. Fetch ptid from thread.
8840 (find_lwp_pid): Update, "entry" parameter is a
8841 struct thread_info * now.
8842 (linux_wait_for_lwp): Fetch pid from thread.
8843 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8844 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8845 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8846 (dequeue_one_deferred_signal): Ditto.
8847 (cancel_breakpoint): Fetch ptid from current_inferior.
8848 (linux_wait_for_event): Pass &all_threads to find_inferior,
8849 not &all_lwps. Fetch ptid, lwpid from thread.
8850 (count_events_callback): Update, "entry" parameter is a
8851 struct thread_info * now.
8852 (select_singlestep_lwp_callback): Ditto.
8853 (select_event_lwp_callback): Ditto.
8854 (cancel_breakpoints_callback): Ditto.
8855 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8857 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8858 (unsuspend_one_lwp): Update, "entry" parameter is a
8859 struct thread_info * now.
8860 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8862 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8863 Fetch lwpid from thread, not lwp.
8864 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8865 Pass &all_threads to find_inferior, not &all_lwps.
8866 (send_sigstop): Fetch lwpid from thread, not lwp.
8867 (send_sigstop_callback): Update, "entry" parameter is a
8868 struct thread_info * now.
8869 (suspend_and_send_sigstop_callback): Ditto.
8870 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8871 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8872 struct thread_info * now.
8873 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8875 (lwp_running): Update, "entry" parameter is a
8876 struct thread_info * now.
8877 (stop_all_lwps): Fetch ptid from thread.
8878 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8879 (linux_resume_one_lwp): Fetch lwpid from thread.
8880 (linux_set_resume_request): Update, "entry" parameter is a
8881 struct thread_info * now. Fetch pid, lwpid from thread.
8882 (resume_status_pending_p): Update, "entry" parameter is a
8883 struct thread_info * now.
8884 (need_step_over_p): Ditto. Fetch lwpid from thread.
8885 (start_step_over): Fetch lwpid from thread.
8886 (linux_resume_one_thread): Update, "entry" parameter is a
8887 struct thread_info * now. Fetch lwpid from thread.
8888 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8889 (proceed_one_lwp): Update, "entry" parameter is a
8890 struct thread_info * now. Fetch lwpid from thread.
8891 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8892 struct thread_info * now.
8893 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8894 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8895 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8897 (regsets_store_inferior_registers): Ditto.
8898 (fetch_register, store_register): Ditto.
8899 (linux_read_memory, linux_write_memory): Ditto.
8900 (linux_request_interrupt): Ditto.
8901 (linux_read_auxv): Ditto.
8902 (linux_xfer_siginfo): Ditto.
8903 (linux_qxfer_spu): Ditto.
8904 (linux_qxfer_libraries_svr4): Ditto.
8905 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8906 moved to inferiors.h.
8908 (get_thread_lwp): Update.
8909 (struct lwp_info): Delete member "entry". Simplify comment for
8912 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8913 current_inferior directly.
8914 (update_watch_registers_callback): Update, "entry" parameter is a
8915 struct thread_info * now. Fetch pid from thread.
8916 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8917 (mips_insert_point): Fetch lwpid from current_inferior.
8918 Pass &all_threads to find_inferior, not &all_lwps.
8919 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8920 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8922 (mips_stopped_data_address): Ditto.
8923 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8925 * linux-tile-low.c (tile_arch_setup): Ditto.
8926 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8927 (update_debug_registers_callback): Update, "entry" parameter is a
8928 struct thread_info * now. Fetch pid from thread.
8929 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8930 Pass &all_threads to find_inferior, not &all_lwps.
8931 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8932 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8933 Pass &all_threads to find_inferior, not &all_lwps.
8934 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8935 (i386_dr_low_get_status): Ditto.
8936 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8937 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8938 (x86_linux_read_description): Ditto.
8939 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8941 2014-02-20 Doug Evans <dje@google.com>
8943 * inferiors.c (get_first_inferior): Fix buglet.
8945 2014-02-19 Doug Evans <dje@google.com>
8947 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8948 * inferiors.c (add_thread): Change result type to struct thread_info *.
8949 All callers updated.
8950 (add_lwp): Call add_thread here instead of in callers.
8951 All callers updated.
8952 * linux-low.h (get_lwp_thread): Rewrite.
8953 (struct lwp_info): New member "thread".
8955 2014-02-19 Doug Evans <dje@google.com>
8957 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8958 All callers updated.
8960 2014-02-19 Doug Evans <dje@google.com>
8962 * inferiors.c (add_thread): Fix whitespace.
8964 2014-02-19 Doug Evans <dje@google.com>
8966 * dll.c (clear_dlls): Replace accessing list implemention details
8968 * gdbthread.h (get_first_thread): Declare.
8969 * inferiors.c (for_each_inferior_with_data): New function.
8970 (get_first_thread): New function.
8971 (find_thread_ptid): Simplify.
8972 (get_first_inferior): New function.
8973 (clear_list): Delete.
8974 (one_inferior_p): New function.
8975 (clear_inferior_list): New function.
8976 (clear_inferiors): Update.
8977 * inferiors.h (for_each_inferior_with_data): Declare.
8978 (clear_inferior_list): Declare.
8979 (one_inferior_p): Declare.
8980 (get_first_inferior): Declare.
8981 * linux-low.c (linux_wait_for_event): Replace accessing list
8982 implemention details with API function.
8983 * server.c (target_running): Ditto.
8984 (accumulate_file_name_length): New function.
8985 (emit_dll_description): New function.
8986 (handle_qxfer_libraries): Replace accessing list implemention
8987 details with API function.
8988 (handle_qxfer_threads_worker): New function.
8989 (handle_qxfer_threads_proper): Replace accessing list implemention
8990 details with API function.
8991 (handle_query): Ditto.
8992 (visit_actioned_threads_callback_ftype): New typedef.
8993 (visit_actioned_threads_data): New struct.
8994 (visit_actioned_threads): Rewrite to be find_inferior callback.
8995 (resume): Call find_inferior.
8996 (handle_status): Replace accessing list implemention
8997 details with API function.
8998 (process_serial_event): Replace accessing list implemention details
9000 * target.c (set_desired_inferior): Replace accessing list implemention
9001 details with API function.
9002 * tracepoint.c (same_process_p): New function.
9003 (gdb_agent_about_to_close): Replace accessing list implemention
9004 details with API function.
9005 * win32-low.c (child_delete_thread): Replace accessing list
9006 implemention details with API function.
9007 (match_dll_by_basename): New function.
9008 (dll_is_loaded_by_basename): New function.
9009 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9010 details call to dll_is_loaded_by_basename.
9012 2014-02-19 Doug Evans <dje@google.com>
9014 * dll.h (struct dll_info): Add comment.
9015 * gdbthread.h (struct thread_info): Add comment.
9016 (current_ptid): Simplify.
9017 * inferiors.c (add_process): Update.
9018 (remove_process): Update.
9019 * inferiors.h (struct process_info): Rename member "head" to "entry".
9020 * linux-low.c (delete_lwp): Update.
9022 (last_thread_of_process_p): Update.
9023 (kill_one_lwp_callback, linux_kill): Update.
9024 (status_pending_p_callback): Update.
9025 (wait_for_sigstop): Update. Simplify read of ptid.
9026 (start_step_over): Update.
9027 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9028 (get_lwp_thread): Update.
9029 (struct lwp_info): Rename member "head" to "entry".
9030 * regcache.h (inferior_list_entry): Delete.
9031 * server.c (kill_inferior_callback): Update.
9032 (detach_or_kill_inferior_callback): Update.
9033 (print_started_pid): Update.
9034 (print_attached_pid): Update.
9035 (process_serial_event): Simplify read of ptid.
9036 * thread-db.c (thread_db_create_event): Update.
9037 (thread_db_get_tls_address): Update.
9038 * win32-low.c (current_inferior_ptid): Simplify.
9040 2014-02-19 Tom Tromey <tromey@redhat.com>
9042 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9044 (target_supports_btrace): Update.
9046 2014-02-14 Yao Qi <yao@codesourcery.com>
9048 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9049 (rsp-low-ipa.o): New target.
9051 2014-02-12 Tom Tromey <tromey@redhat.com>
9053 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9054 convert_ascii_to_int.
9055 * regcache.c (registers_to_string): Likewise.
9056 * remote-utils.c (decode_M_packet): Likewise.
9057 * server.c (process_serial_event): Likewise.
9059 2014-02-12 Tom Tromey <tromey@redhat.com>
9061 * server.c (handle_query, handle_v_run): Use hex2bin, not
9063 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9065 2014-02-12 Tom Tromey <tromey@redhat.com>
9067 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9068 convert_int_to_ascii.
9069 * regcache.c (registers_to_string, collect_register_as_string):
9071 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9073 * server.c (process_serial_event): Likewise.
9074 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9075 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9077 2014-02-12 Tom Tromey <tromey@redhat.com>
9079 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9080 bin2hex, not hexify.
9081 * tracepoint.c (cmd_qtstatus): Likewise.
9083 2014-02-12 Tom Tromey <tromey@redhat.com>
9085 * remote-utils.c (monitor_output): Pass explicit length to
9088 2014-02-12 Tom Tromey <tromey@redhat.com>
9090 * tracepoint.c: Include rsp-low.h.
9091 * server.c: Include rsp-low.h.
9092 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9093 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9095 * remote-utils.c: Include rsp-low.h.
9096 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9097 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9098 (convert_int_to_ascii, convert_ascii_to_int): Move to
9100 * regcache.c: Include rsp-low.h.
9101 * ax.c: Include rsp-low.h.
9102 * Makefile.in (SFILES): Add common/rsp-low.c.
9103 (OBS): Add rsp-low.o.
9104 (rsp-low.o): New target.
9106 2014-02-12 Tom Tromey <tromey@redhat.com>
9108 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9109 Include print-utils.h.
9110 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9111 (plongest, thirty_two, phex_nz): Remove.
9112 * Makefile.in (SFILES): Add common/print-utils.c.
9113 (OBS): Add print-utils.o.
9114 (print-utils-ipa.o): New target.
9115 (print-utils.o): New target.
9116 (IPA_OBJS): Add print-utils-ipa.o.
9118 2014-02-06 Tom Tromey <tromey@redhat.com>
9120 * Makefile.in (SFILES): Fix indentation.
9122 2014-02-05 Doug Evans <dje@google.com>
9124 * linux-low.c (linux_wait_for_event): Improve comment.
9125 (linux_wait_1): Keep current_inferior in sync with event_child.
9127 2014-01-22 Doug Evans <dje@google.com>
9129 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9131 2014-01-22 Doug Evans <dje@google.com>
9133 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9134 * configure: Regenerate.
9135 * config.in: Regenerate.
9136 * Makefile.in (SFILES): Add debug.c.
9138 * debug.c: New file.
9139 * debug.h: New file.
9140 * linux-aarch64-low.c (*): Update all debugging printfs to use
9141 debug_printf instead of fprintf.
9142 * linux-arm-low.c (*): Ditto.
9143 * linux-cris-low.c (*): Ditto.
9144 * linux-crisv32-low.c (*): Ditto.
9145 * linux-m32r-low.c (*): Ditto.
9146 * linux-sparc-low.c (*): Ditto.
9147 * linux-x86.c (*): Ditto.
9148 * linux-low.c (*): Ditto.
9149 (linux_wait_1): Add calls to debug_enter, debug_exit.
9150 (linux_wait): Remove redundant debugging printf.
9151 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9152 (linux_resume, unstop_all_lwps): Ditto.
9153 * mem-break.c (*): Update all debugging printfs to use
9154 debug_printf instead of fprintf.
9155 * remote-utils.c (*): Ditto.
9156 * thread-db.c (*): Ditto.
9157 * server.c #include <ctype.h>, "gdb_vecs.h".
9158 (debug_threads): Moved to debug.c.
9159 (*): Update all debugging printfs to use debug_printf instead of
9161 (start_inferior): Replace call to fflush with call to debug_flush.
9162 (monitor_show_help): Mention set debug-format.
9163 (parse_debug_format_options): New function.
9164 (handle_monitor_command): Handle "monitor set debug-format".
9165 (gdbserver_usage): Mention --debug-format.
9166 (main): Parse --debug-format.
9167 * server.h (debug_threads): Declaration moved to debug.h.
9169 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9170 trace_debug_1 that uses debug_printf.
9171 (tracepoint_look_up_symbols): Update all debugging printfs to use
9172 debug_printf instead of fprintf.
9174 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9176 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9179 2014-01-17 Pedro Alves <palves@redhat.com>
9182 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9183 defined after including gdb_proc_service.h.
9185 2014-01-16 Doug Evans <dje@google.com>
9187 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9188 (match_dll): Use it.
9190 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9192 * target.h (target_ops) <read_btrace>: Change parameters and
9193 return type to allow error reporting.
9194 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9195 trace reading errors on.
9196 * linux-low.c (linux_low_read_btrace): Pass trace reading
9198 (linux_low_disable_btrace): New.
9200 2014-01-15 Doug Evans <dje@google.com>
9202 * inferiors.c (thread_id_to_gdb_id): Delete.
9203 * inferiors.h (thread_id_to_gdb_id): Delete.
9205 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9207 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9208 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9211 2014-01-08 Pedro Alves <palves@redhat.com>
9213 * server.c (handle_status): Don't discard previous queued stop
9214 replies or thread's pending status here.
9215 (main) <disconnection>: Do it here instead.
9217 2014-01-08 Pedro Alves <palves@redhat.com>
9219 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9220 * server.c (visit_actioned_threads, handle_pending_status): New
9222 (handle_v_cont): Factor out parts to ...
9223 (resume): ... this new function. If in all-stop, and a thread
9224 being resumed has a pending status, report it without actually
9226 (myresume): Adjust to use the new 'resume' function.
9227 (clear_pending_status_callback, set_pending_status_callback)
9228 (find_status_pending_thread_callback): New functions.
9229 (handle_status): Handle the case of multiple threads having
9230 interesting statuses to report. Report threads' real last signal
9231 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9232 with an interesting thread to report the status for, instead of
9233 always reporting the status of the first thread.
9235 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9237 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9238 * gdbreplay.c (gdbreplay_version): Likewise.
9240 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9242 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9243 iov.iov_len with the real length in use.
9245 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9247 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9248 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9249 for all targets that use win32-low.c.
9250 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9251 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9253 2013-12-13 Pedro Alves <palves@redhat.com>
9255 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9256 if equal to TARGET_WAITKIND_LOADED.
9257 * win32-low.c (cached_status): New static global.
9258 (win32_wait): Add declaration.
9259 (do_initial_child_stuff): Flush all initial pending debug events
9260 up to the initial breakpoint.
9261 (win32_wait): If CACHED_STATUS was set, return that instead
9262 of doing a real wait. Remove the code resuming the execution
9263 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9264 during the initial phase. Also remove the code changing
9265 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9266 TARGET_WAITKIND_STOPPED.
9268 2013-12-11 Yao Qi <yao@codesourcery.com>
9270 * notif.c (handle_notif_ack): Return 0 if no notification
9273 2013-11-20 Doug Evans <dje@google.com>
9275 * linux-low.c (linux_set_resume_request): Fix comment.
9277 2013-11-20 Doug Evans <dje@google.com>
9279 * linux-low.c (resume_status_pending_p): Tweak comment.
9281 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9283 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9284 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9285 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9286 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9287 (srv_amd64_regobj): Add amd64-mpx.o.
9288 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9289 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9290 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9291 * i387-fp.c (num_pl_bnd_register) Added constant.
9292 (num_pl_bnd_cfg_registers) Added constant.
9293 (struct i387_xsave) Added reserved area and MPX fields.
9294 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9295 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9297 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9298 (init_registers_amd64_mpx_linux): Declare new function.
9299 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9300 (x86_64_regmap): Add MPX registers.
9301 (x86_linux_read_description): Add MPX case.
9302 (initialize_low_arch): Initialize MPX targets.
9304 2013-11-18 Tom Tromey <tromey@redhat.com>
9306 * configure: Rebuild.
9307 * configure.ac: Don't check for stdlib.h.
9308 * gdbreplay.c: Unconditionally include stdlib.h.
9310 2013-11-18 Tom Tromey <tromey@redhat.com>
9312 * config.in: Rebuild.
9313 * configure: Rebuild.
9314 * configure.ac: Don't use AC_HEADER_DIRENT.
9316 2013-11-18 Tom Tromey <tromey@redhat.com>
9318 * server.h: Don't check HAVE_STRING_H.
9319 * gdbreplay.c: Don't check HAVE_STRING_H.
9320 * configure: Rebuild.
9322 2013-11-18 Tom Tromey <tromey@redhat.com>
9324 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9327 2013-11-08 Tom Tromey <tromey@redhat.com>
9329 * configure, config.in: Rebuild.
9330 * configure.ac: Remove unused configury.
9332 2013-11-08 Tom Tromey <tromey@redhat.com>
9334 * acinclude.m4: Include common.m4, codeset.m4.
9335 * configure, config.in: Rebuild.
9336 * configure.ac: Use GDB_AC_COMMON.
9338 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9340 * linux-s390-low.c (HWCAP_S390_TE): New define.
9341 (s390_arch_setup): Consider the TE field in the HWCAP for
9342 determining 'have_regset_tdb'.
9344 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9347 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9350 2013-10-02 Pedro Alves <palves@redhat.com>
9352 * server.c (process_serial_event): Don't output "GDBserver
9353 exiting" if GDB is connected through stdio.
9354 * target.c (mywait): Likewise, be silent if GDB is connected
9357 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9359 * lynx-low.c (lynx_add_threads_after_attach): New function.
9360 (lynx_attach): Remove call to add_thread. Add call to
9361 lynx_add_threads_after_attach instead.
9363 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9365 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9366 * config.in, configure: Regenerated.
9368 2013-09-18 Yao Qi <yao@codesourcery.com>
9371 * server.c (start_inferior): Clear 'resume_info'.
9373 2013-09-16 Jiong Wang <jiwang@tilera.com>
9375 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9378 2013-09-16 Jiong Wang <jiwang@tilera.com>
9380 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9381 linux-tile-low.o to srv_tgtobj.
9383 2013-09-16 Will Newton <will.newton@linaro.org>
9385 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9388 2013-09-06 Pedro Alves <palves@redhat.com>
9390 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9391 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9392 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9393 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9394 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9395 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9397 2013-09-06 Pedro Alves <palves@redhat.com>
9399 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9400 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9402 2013-09-06 Pedro Alves <palves@redhat.com>
9404 * linux-amd64-ipa.c: Include tracepoint.h.
9405 * linux-i386-ipa.c: Include tracepoint.h.
9407 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9409 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9410 (ps_get_thread_area): New function.
9412 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9414 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9415 (initialize_low_arch): Call init_registers_crisv32 rather than
9416 init_register_crisv32.
9418 2013-09-05 Pedro Alves <palves@redhat.com>
9420 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9422 * hostio.h: ... this new file.
9423 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9424 win32-low.c: Include hostio.h.
9426 2013-09-05 Pedro Alves <palves@redhat.com>
9428 * server.h (gdb_client_data, handler_func, callback_handler_func)
9429 (delete_file_handler, add_file_handler, append_callback_event)
9430 (delete_callback_event, start_event_loop, initialize_event_loop):
9431 Move to event-loop.h and include it.
9432 * event-loop.h: New file.
9434 2013-09-05 Pedro Alves <palves@redhat.com>
9436 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9437 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9438 (loaded_dll, unloaded_dll): Move to ...
9439 * dll.h: ... this new file.
9440 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9442 2013-09-05 Pedro Alves <palves@redhat.com>
9444 * server.h (current_process, get_thread_process, all_processes)
9445 (add_inferior_to_list, for_each_inferior, current_inferior)
9446 (remove_inferior, add_process, remove_process, find_process_pid)
9447 (have_started_inferiors_p, have_attached_inferiors_p)
9448 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9449 (clear_inferiors, find_inferior, find_inferior_id)
9450 (inferior_target_data, set_inferior_target_data)
9451 (inferior_regcache_data, set_inferior_regcache_data): Move to
9452 inferiors.h, and include it.
9453 * inferiors.h: New file.
9455 2013-09-05 Pedro Alves <palves@redhat.com>
9457 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9461 2013-09-05 Pedro Alves <palves@redhat.com>
9463 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9465 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9466 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9467 (handle_tracepoint_general_set, handle_tracepoint_query)
9468 (tracepoint_finished_step, tracepoint_was_hit)
9469 (release_while_stepping_state_list, current_traceframe)
9470 (in_readonly_region, traceframe_read_mem)
9471 (fetch_traceframe_registers, traceframe_read_sdata)
9472 (traceframe_read_info, struct fast_tpoint_collect_status)
9473 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9474 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9475 (supply_fast_tracepoint_registers)
9476 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9477 (ipa_tdesc, claim_trampoline_space)
9478 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9479 (agent_mem_read, agent_get_trace_state_variable_value)
9480 (agent_set_trace_state_variable_value, agent_tsv_read)
9481 (agent_mem_read_string, get_raw_reg_func_addr)
9482 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9483 * tracepoint.h: ... this new file.
9485 2013-09-05 Pedro Alves <palves@redhat.com>
9487 * server.h (perror_with_name, error, fatal, warning, paddress)
9488 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9490 * utils.h: New file.
9492 2013-09-05 Pedro Alves <palves@redhat.com>
9494 * server.h (remote_debug, noack_mode, transport_is_reliable)
9495 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9496 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9497 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9498 (write_enn, initialize_async_io, enable_async_io)
9499 (disable_async_io, check_remote_input_interrupt_request)
9500 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9501 (dead_thread_notify, prepare_resume_reply)
9502 (decode_address_to_semicolon, decode_address, decode_m_packet)
9503 (decode_M_packet, decode_X_packet, decode_xfer_write)
9504 (decode_search_memory_packet, unhexify, hexify)
9505 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9506 (look_up_one_symbol, relocate_instruction)
9507 (monitor_output): Move to remote-utils.h, and include it.
9508 * remote-utils.h: New file.
9510 2013-09-05 Pedro Alves <palves@redhat.com>
9512 * server.h (_): Delete.
9514 2013-09-02 Pedro Alves <palves@redhat.com>
9516 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9517 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9519 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9521 2013-09-02 Pierre Muller <muller@sourceware.org>
9523 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9524 or WriteProcessMemory complete successfully and handle
9525 ERROR_PARTIAL_COPY error.
9527 2013-09-02 Pedro Alves <palves@redhat.com>
9529 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9530 error instead of EIO.
9532 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9535 * linux-low.c: Include filestuff.h.
9536 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9537 * lynx-low.c: Include filestuff.h.
9538 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9539 * server.c: Include filestuff.h.
9540 (main): Call notice_open_fds.
9541 * spu-low.c: Include filestuff.h.
9542 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9544 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9546 * Makefile.in: Explain why ../target and ../nat are not
9547 listed as include file search paths.
9548 (linux-waitpid.o): New object file rule.
9549 * configure.srv (srv_native_linux_obj): New variable.
9550 Replace all occurrences of linux native object files with
9551 $srv_native_linux_obj.
9552 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9553 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9554 (linux_enable_event_reporting): Remove declaration.
9555 (my_waitpid): Moved to common/linux-waitpid.c.
9556 (linux_wait_for_event): Pass ptid when calling
9557 linux_enable_event_reporting.
9558 (linux_supports_tracefork_flag): Remove.
9559 (linux_enable_event_reporting): Likewise.
9560 (linux_tracefork_grandchild): Remove.
9561 (STACK_SIZE): Moved to common/linux-ptrace.c.
9562 (linux_tracefork_child): Remove.
9563 (linux_test_for_tracefork): Remove.
9564 (linux_look_up_symbols): Call linux_supports_traceclone.
9565 (initialize_low): Remove call to linux_test_for_tracefork.
9566 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9567 common/linux-ptrace.h.
9568 (PTRACE_TYPE_ARG4): Likewise.
9569 Include linux-ptrace.h.
9571 2013-08-21 Pedro Alves <palves@redhat.com>
9573 * config.in: Renegerate.
9575 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9577 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9578 (SFILES): Remove $(srcdir)/common/target-common.c and
9579 add $(srcdir)/target/waitstatus.c.
9580 (OBS): Remove target-common.o and add waitstatus.o.
9581 (server_h): Remove $(srcdir)/../common/target-common.h and
9582 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9583 and $(srcdir)/../target/waitstatus.h.
9584 (target-common.o): Remove.
9585 (waitstatus.o): New target object file.
9586 * target.h: Do not include target-common.h and
9587 include target/resume.h, target/wait.h and
9588 target/waitstatus.h.
9590 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9592 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9593 to PTRACE_TYPE_ARG3.
9594 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9595 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9597 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9598 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9600 2013-07-27 Jie Zhang <jie@codesourcery.com>
9601 Daniel Jacobowitz <dan@codesourcery.com>
9602 Yao Qi <yao@codesourcery.com>
9604 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9605 (mips-linux-watch.o): New rule.
9606 (mips_linux_watch_h): New variable.
9607 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9609 * linux-mips-low.c: Include mips-linux-watch.h.
9610 (struct arch_process_info, struct arch_lwp_info): New.
9611 (update_watch_registers_callback): New function.
9612 (mips_linux_new_process, mips_linux_new_thread) New functions.
9613 (mips_linux_prepare_to_resume, mips_insert_point): New
9615 (mips_remove_point, mips_stopped_by_watchpoint): New
9617 (rsp_bp_type_to_target_hw_bp_type): New function.
9618 (mips_stopped_data_address): New function.
9619 (the_low_target): Add watchpoint support functions.
9621 2013-07-27 Yao Qi <yao@codesourcery.com>
9623 * i386-low.c: Include break-common.h.
9624 (enum target_hw_bp_type): Remove.
9626 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9628 * Makefile.in (SFILES): /common/target-common.c.
9629 (OBS): Add target-common.o.
9630 (server_h): Add $(srcdir)/../common/target-common.h.
9631 (target-common.o): New target.
9632 * server.c (queue_stop_reply_callback): Free
9633 status string after use.
9634 * target.c (target_waitstatus_to_string): Remove.
9635 * target.h: Include target-common.h.
9636 (resume_kind): Likewise.
9637 (target_waitkind): Likewise.
9638 (target_waitstatus): Likewise.
9639 (TARGET_WNOHANG): Likewise.
9641 2013-07-04 Yao Qi <yao@codesourcery.com>
9643 * Makefile.in (host_alias): Use @host_noncanonical@.
9644 (target_alias): Use @target_noncanonical@.
9645 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9646 ACX_NONCANONICAL_HOST.
9647 * configure: Regenerated.
9650 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9652 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9653 * configure: Rebuild.
9654 * Makefile.in (version_host, version_target): Get from configure.
9655 (version.c): Use $(version_host) and $(version_target).
9657 2013-07-03 Pedro Alves <palves@redhat.com>
9659 * Makefile.in (config.status): Depend on development.sh.
9660 * acinclude.m4: Include libmcheck.m4.
9661 * configure: Regenerate.
9663 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9665 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9666 attribute inside the parentheses.
9667 (winapi_DebugSetProcessKillOnExit): Ditto.
9668 (winapi_DebugBreakProcess): Ditto.
9669 (winapi_GenerateConsoleCtrlEvent): Ditto.
9671 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9673 * notif.h (notif_event): Add a dummy member to avoid compiler
9676 2013-07-01 Pedro Alves <palves@redhat.com>
9678 * hostio.c (HOSTIO_PATH_MAX): Define.
9679 (require_filename, handle_open, handle_unlink, handle_readlink):
9682 2013-07-01 Pedro Alves <palves@redhat.com>
9684 * server.h: Include "pathmax.h".
9685 * linux-low.c: Don't include sys/param.h.
9686 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9688 * win32-low.c: Don't include sys/param.h.
9689 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9691 2013-07-01 Pedro Alves <palves@redhat.com>
9693 * event-loop.c: Don't check HAVE_UNISTD_H before including
9695 * gdbreplay.c: Likewise.
9696 * remote-utils.c: Likewise.
9697 * server.c: Likewise.
9698 * configure.ac: Don't check for unistd.h.
9699 * configure: Regenerate.
9701 2013-06-28 Tom Tromey <tromey@redhat.com>
9703 * Makefile.in (version.c): Use version.in, not
9706 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9708 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9709 * configure: Rebuild.
9710 * Makefile.in (version_host, version_target): Get from configure.
9711 (version.c): Use $(version_host) and $(version_target).
9713 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9715 Fix trace-status to output user name without trailing colon.
9716 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9718 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9720 Fix trace-status to output proper start-time and stop-time.
9721 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9722 output start time and stop time in hex as gdb expects.
9724 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9726 * tracepoint.c (build_traceframe_info_xml): Output trace state
9727 variables present in the trace buffer.
9729 2013-06-24 Tom Tromey <tromey@redhat.com>
9731 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9733 (version.o): Remove.
9734 * gdbreplay.c: Include version.h.
9735 (version, host_name): Don't declare.
9736 * server.h: Include version.h.
9737 (version, host_name): Don't declare.
9739 2013-06-12 Pedro Alves <palves@redhat.com>
9741 * linux-x86-low.c (linux_is_elf64): Delete global.
9742 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9743 with local linux_pid_exe_is_elf_64_file use.
9745 2013-06-11 Pedro Alves <palves@redhat.com>
9747 * linux-low.c (regset_disabled, disable_regset): New functions.
9748 (regsets_fetch_inferior_registers)
9749 (regsets_store_inferior_registers): Use them.
9750 (initialize_regsets_info); Don't allocate the disabled_regsets
9752 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9755 2013-06-11 Pedro Alves <palves@redhat.com>
9757 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9760 2013-06-11 Pedro Alves <palves@redhat.com>
9762 * linux-x86-low.c (initialize_low_arch): Call
9763 init_registers_x32_avx_linux.
9765 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9767 Fix compatibility with Android Bionic.
9768 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9771 2013-06-07 Pedro Alves <palves@redhat.com>
9774 * Makefile.in (OBS): Add tdesc.o.
9775 (IPA_OBJS): Add tdesc-ipa.o.
9776 (tdesc-ipa.o): New rule.
9777 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9779 * linux-low.c (new_inferior): Delete.
9780 (disabled_regsets, num_regsets): Delete.
9781 (linux_add_process): Adjust to set the new per-process
9783 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9784 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9785 was a stop. When calling arch_setup, switch the current inferior
9786 to the thread that got an event.
9787 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9788 (regsets_fetch_inferior_registers)
9789 (regsets_store_inferior_registers): New regsets_info parameter.
9791 (linux_register_in_regsets): New regs_info parameter. Adjust to
9793 (register_addr, fetch_register, store_register): New usrregs_info
9794 parameter. Adjust to use it.
9795 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9796 parameter regs_info. Adjust to use it.
9797 (linux_fetch_registers): Get the current inferior's regs_info, and
9799 (linux_store_registers): Ditto.
9800 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9801 (initialize_low): Don't initialize the target_regsets here. Call
9802 initialize_low_arch.
9803 * linux-low.h (target_regsets): Delete declaration.
9804 (struct regsets_info): New.
9805 (struct usrregs_info): New.
9806 (struct regs_info): New.
9807 (struct process_info_private) <new_inferior>: New field.
9808 (struct linux_target_ops): Delete the num_regs, regmap, and
9809 regset_bitmap fields. New field regs_info.
9810 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9811 * i387-fp.c (num_xmm_registers): Delete.
9812 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9813 calls to new interface.
9814 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9815 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9816 Infer the number of xmm registers from the regcache's target
9818 * i387-fp.h (num_xmm_registers): Delete.
9819 * inferiors.c (add_thread): Don't install the thread's regcache
9821 * proc-service.c (gregset_info): Fetch the current inferior's
9822 regs_info. Adjust to use it.
9823 * regcache.c: Include tdesc.h.
9824 (register_bytes, reg_defs, num_registers)
9825 (gdbserver_expedite_regs): Delete.
9826 (get_thread_regcache): If the thread doesn't have a regcache yet,
9827 create one, instead of aborting gdbserver.
9828 (regcache_invalidate_one): Rename to ...
9829 (regcache_invalidate_thread): ... this.
9830 (regcache_invalidate_one): New.
9831 (regcache_invalidate): Only invalidate registers of the current
9833 (init_register_cache): Add target_desc parameter, and use it.
9834 (new_register_cache): Ditto. Assert the target description has a
9835 non zero registers_size.
9836 (regcache_cpy): Add assertions. Adjust.
9837 (realloc_register_cache, set_register_cache): Delete.
9838 (registers_to_string, registers_from_string): Adjust.
9839 (find_register_by_name, find_regno, find_register_by_number)
9840 (register_cache_size): Add target_desc parameter, and use it.
9841 (free_register_cache_thread, free_register_cache_thread_one)
9842 (regcache_release, register_cache_size): New.
9843 (register_size): Add target_desc parameter, and use it.
9844 (register_data, supply_register, supply_register_zeroed)
9845 (supply_regblock, supply_register_by_name, collect_register)
9846 (collect_register_as_string, collect_register_by_name): Adjust.
9847 * regcache.h (struct target_desc): Forward declare.
9848 (struct regcache) <tdesc>: New field.
9849 (init_register_cache, new_register_cache): Add target_desc
9851 (regcache_invalidate_thread): Declare.
9852 (regcache_invalidate_one): Delete declaration.
9853 (regcache_release): Declare.
9854 (find_register_by_number, register_cache_size, register_size)
9855 (find_regno): Add target_desc parameter.
9856 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9858 * remote-utils.c: Include tdesc.h.
9859 (outreg, prepare_resume_reply): Adjust.
9860 * server.c: Include tdesc.h.
9861 (gdbserver_xmltarget): Delete declaration.
9862 (get_features_xml, process_serial_event): Adjust.
9863 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9865 (struct process_info) <tdesc>: New field.
9866 (ipa_tdesc): Declare.
9867 * tdesc.c: New file.
9868 * tdesc.h: New file.
9869 * tracepoint.c: Include tdesc.h.
9870 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9871 (get_context_regcache): Adjust to pass ipa_tdesc down.
9872 (do_action_at_tracepoint): Adjust to get the register cache size
9873 from the context regcache's description.
9874 (traceframe_walk_blocks): Adjust to get the register cache size
9875 from the current trace frame's description.
9876 (traceframe_get_pc): Adjust to get current trace frame's
9877 description and pass it down.
9878 (gdb_collect): Adjust to get the register cache size from the
9880 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9881 (gdbserver_xmltarget): Delete.
9882 (initialize_low_tracepoint): Set the ipa's target description.
9883 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9884 (initialize_low_tracepoint): Set the ipa's target description.
9885 * linux-x86-low.c: Include tdesc.h.
9886 [__x86_64__] (is_64bit_tdesc): New.
9887 (ps_get_thread_area, x86_get_thread_area): Use it.
9888 (i386_cannot_store_register): Rename to ...
9889 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9890 (i386_cannot_fetch_register): Rename to ...
9891 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9892 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9894 (target_regsets): Rename to ...
9895 (x86_regsets): ... this.
9896 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9898 (x86_siginfo_fixup): Use is_64bit_tdesc.
9899 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9900 (tdesc_x32_avx_linux, tdesc_x32_linux)
9901 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9903 (x86_linux_update_xmltarget): Delete.
9904 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9905 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9906 (AMD64_LINUX_USER64_CS): New.
9907 (x86_linux_read_description): New, based on
9908 x86_linux_update_xmltarget.
9909 (same_process_callback): New.
9910 (x86_arch_setup_process_callback): New.
9911 (x86_linux_update_xmltarget): New.
9912 (x86_regsets_info): New.
9913 (amd64_linux_regs_info): New.
9914 (i386_linux_usrregs_info): New.
9915 (i386_linux_regs_info): New.
9916 (x86_linux_regs_info): New.
9917 (x86_arch_setup): Reimplement.
9918 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9919 (x86_emit_ops): Ditto.
9920 (the_low_target): Adjust. Install x86_linux_regs_info,
9921 x86_cannot_fetch_register, and x86_cannot_store_register.
9922 (initialize_low_arch): New.
9923 * linux-ia64-low.c (tdesc_ia64): Declare.
9924 (ia64_fetch_register): Adjust.
9925 (ia64_usrregs_info, regs_info): New globals.
9926 (ia64_regs_info): New function.
9927 (the_low_target): Adjust.
9928 (initialize_low_arch): New function.
9929 * linux-sparc-low.c (tdesc_sparc64): Declare.
9930 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9932 (sparc_arch_setup): New function.
9933 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9934 (the_low_target): Adjust.
9935 (initialize_low_arch): New function.
9936 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9937 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9938 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9939 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9940 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9941 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9942 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9943 (tdesc_powerpc_isa205_vsx64l): Declare.
9944 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9945 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9946 (ppc_set_pc, ppc_get_hwcap): Adjust.
9947 (ppc_usrregs_info): Forward declare.
9948 (!__powerpc64__) ppc_regmap_adjusted: New global.
9949 (ppc_arch_setup): Adjust to the current process'es target
9951 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9952 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9953 (ppc_store_evrregset): Adjust.
9954 (target_regsets): Rename to ...
9955 (ppc_regsets): ... this, and make static.
9956 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9957 (ppc_regs_info): New function.
9958 (the_low_target): Adjust.
9959 (initialize_low_arch): New function.
9960 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9961 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9962 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9963 (tdesc_s390x_linux64v2): Declare.
9964 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9965 (s390_fill_gregset, s390_store_last_break): Adjust.
9966 (target_regsets): Rename to ...
9967 (s390_regsets): ... this, and make static.
9968 (s390_get_pc, s390_set_pc): Adjust.
9969 (s390_get_hwcap): New target_desc parameter, and use it.
9970 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9971 (s390_arch_setup): Adjust to set the current process'es target
9972 description. Don't adjust the regmap.
9973 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9974 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9975 (regs_info_3264): New globals.
9976 (s390_regs_info): New function.
9977 (the_low_target): Adjust.
9978 (initialize_low_arch): New function.
9979 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9980 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9981 [__mips64] (init_registers_mips_linux)
9982 (init_registers_mips_dsp_linux): Delete defines.
9983 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9984 (have_dsp): New global.
9985 (mips_read_description): New, based on mips_arch_setup.
9986 (mips_arch_setup): Reimplement.
9987 (get_usrregs_info): New function.
9988 (mips_cannot_fetch_register, mips_cannot_store_register)
9989 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9990 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9991 (target_regsets): Rename to ...
9992 (mips_regsets): ... this, and make static.
9993 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9994 (dsp_regs_info, regs_info): New globals.
9995 (mips_regs_info): New function.
9996 (the_low_target): Adjust.
9997 (initialize_low_arch): New function.
9998 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9999 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10001 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10002 (arm_read_description): New, with bits factored from
10004 (arm_arch_setup): Reimplement.
10005 (target_regsets): Rename to ...
10006 (arm_regsets): ... this, and make static.
10007 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10008 (arm_regs_info): New function.
10009 (the_low_target): Adjust.
10010 (initialize_low_arch): New function.
10011 * linux-m68k-low.c (tdesc_m68k): Declare.
10012 (target_regsets): Rename to ...
10013 (m68k_regsets): ... this, and make static.
10014 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10015 (m68k_regs_info): New function.
10016 (m68k_arch_setup): New function.
10017 (the_low_target): Adjust.
10018 (initialize_low_arch): New function.
10019 * linux-sh-low.c (tdesc_sharch): Declare.
10020 (target_regsets): Rename to ...
10021 (sh_regsets): ... this, and make static.
10022 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10023 (sh_regs_info, sh_arch_setup): New functions.
10024 (the_low_target): Adjust.
10025 (initialize_low_arch): New function.
10026 * linux-bfin-low.c (tdesc_bfin): Declare.
10027 (bfin_arch_setup): New function.
10028 (bfin_usrregs_info, regs_info): New globals.
10029 (bfin_regs_info): New function.
10030 (the_low_target): Adjust.
10031 (initialize_low_arch): New function.
10032 * linux-cris-low.c (tdesc_cris): Declare.
10033 (cris_arch_setup): New function.
10034 (cris_usrregs_info, regs_info): New globals.
10035 (cris_regs_info): New function.
10036 (the_low_target): Adjust.
10037 (initialize_low_arch): New function.
10038 * linux-cris-low.c (tdesc_crisv32): Declare.
10039 (cris_arch_setup): New function.
10040 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10041 (cris_regs_info): New function.
10042 (the_low_target): Adjust.
10043 (initialize_low_arch): New function.
10044 * linux-m32r-low.c (tdesc_m32r): Declare.
10045 (m32r_arch_setup): New function.
10046 (m32r_usrregs_info, regs_info): New globals.
10047 (m32r_regs_info): Adjust.
10048 (initialize_low_arch): New function.
10049 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10050 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10051 (tic6x_usrregs_info): Forward declare.
10052 (tic6x_read_description): New function, based on ...
10053 (tic6x_arch_setup): ... this. Reimplement.
10054 (target_regsets): Rename to ...
10055 (tic6x_regsets): ... this, and make static.
10056 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10057 (tic6x_regs_info): New function.
10058 (the_low_target): Adjust.
10059 (initialize_low_arch): New function.
10060 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10061 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10062 (target_regsets): Rename to ...
10063 (xtensa_regsets): ... this, and make static.
10064 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10066 (xtensa_arch_setup, xtensa_regs_info): New functions.
10067 (the_low_target): Adjust.
10068 (initialize_low_arch): New function.
10069 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10070 (nios2_arch_setup): Set the current process'es tdesc.
10071 (target_regsets): Rename to ...
10072 (nios2_regsets): ... this.
10073 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10074 (nios2_regs_info): New function.
10075 (the_low_target): Adjust.
10076 (initialize_low_arch): New function.
10077 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10078 (aarch64_arch_setup): Set the current process'es tdesc.
10079 (target_regsets): Rename to ...
10080 (aarch64_regsets): ... this.
10081 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10082 (aarch64_regs_info): New function.
10083 (the_low_target): Adjust.
10084 (initialize_low_arch): New function.
10085 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10087 (target_regsets): Rename to ...
10088 (tile_regsets): ... this.
10089 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10090 (tile_regs_info): New function.
10091 (tile_arch_setup): Set the current process'es tdesc.
10092 (the_low_target): Adjust.
10093 (initialize_low_arch): New function.
10094 * spu-low.c (tdesc_spu): Declare.
10095 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10096 * win32-arm-low.c (tdesc_arm): Declare.
10097 (arm_arch_setup): New function.
10098 (the_low_target): Install arm_arch_setup instead of
10099 init_registers_arm.
10100 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10101 (init_windows_x86): Rename to ...
10102 (i386_arch_setup): ... this. Set `win32_tdesc'.
10103 (the_low_target): Adjust.
10104 * win32-low.c (win32_tdesc): New global.
10105 (child_add_thread): Don't create the thread cache here.
10106 (do_initial_child_stuff): Set the new process'es tdesc.
10107 * win32-low.h (struct target_desc): Forward declare.
10108 (win32_tdesc): Declare.
10109 * lynx-i386-low.c (tdesc_i386): Declare global.
10110 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10111 * lynx-low.c (lynx_tdesc): New global.
10112 (lynx_add_process): Set the new process'es tdesc.
10113 * lynx-low.h (struct target_desc): Forward declare.
10114 (lynx_tdesc): Declare global.
10115 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10116 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10117 * nto-low.c (nto_tdesc): New global.
10118 (do_attach): Set the new process'es tdesc.
10119 * nto-low.h (struct target_desc): Forward declare.
10120 (nto_tdesc): Declare.
10121 * nto-x86-low.c (tdesc_i386): Declare.
10122 (nto_x86_arch_setup): Set `nto_tdesc'.
10124 2013-06-04 Gary Benson <gbenson@redhat.com>
10126 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10127 to qSupported response when appropriate.
10128 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10129 with nonzero-length annex.
10130 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10131 arguments supplied in annex.
10133 2013-05-31 Doug Evans <dje@google.com>
10136 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10137 64 bits in 64-cross-32 environment.
10139 2013-05-28 Pedro Alves <palves@redhat.com>
10141 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10142 (aarch64-without-fpu.c): Delete rule.
10143 * configure.srv (aarch64*-*-linux*): Remove references to
10144 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10145 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10148 2013-05-24 Pedro Alves <palves@redhat.com>
10150 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10151 instead of strchr/decode_address. Error if the range isn't split
10152 with a ','. Don't assume there's be a ':' in the action.
10154 2013-05-23 Yao Qi <yao@codesourcery.com>
10155 Pedro Alves <palves@redhat.com>
10157 * linux-low.c (lwp_in_step_range): New function.
10158 (linux_wait_1): If the thread was range stepping and stopped
10159 outside the stepping range, report the stop to GDB. Otherwise,
10160 continue stepping. Add range stepping debug output.
10161 (linux_set_resume_request): Copy the step range from the resume
10162 request to the lwp.
10163 (linux_supports_range_stepping): New.
10164 (linux_target_ops) <supports_range_stepping>: Set to
10165 linux_supports_range_stepping.
10166 * linux-low.h (struct linux_target_ops)
10167 <supports_range_stepping>: New field.
10168 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10169 * linux-x86-low.c (x86_supports_range_stepping): New.
10170 (the_low_target) <supports_range_stepping>: Set to
10171 x86_supports_range_stepping.
10172 * server.c (handle_v_cont): Handle 'r' action.
10173 (handle_v_requests): Append ";r" if the target supports range
10175 * target.h (struct thread_resume) <step_range_start,
10176 step_range_end>: New fields.
10177 (struct target_ops) <supports_range_stepping>:
10179 (target_supports_range_stepping): New macro.
10181 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10183 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10184 confusion in comment.
10186 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10188 * lynx-low.c (struct process_info_private): New type.
10189 (lynx_add_process): New function.
10190 (lynx_create_inferior, lynx_attach): Replace calls to
10191 add_process by calls to lynx_add_process.
10192 (lynx_resume): If PTID is null, then try using
10193 current_process()->private->last_wait_event_ptid.
10195 (lynx_clear_inferiors): Delete. The contents of that function
10196 has been inlined in lynx_mourn;
10197 (lynx_wait_1): Save the ptid in the process's private data.
10198 (lynx_mourn): Free the process' private data. Replace call
10199 to lynx_clear_inferiors by call to clear_inferiors.
10201 2013-05-17 Yao Qi <yao@codesourcery.com>
10203 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10206 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10208 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10209 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10210 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10211 PT_TEXT_END_ADDR guards. Update comments.
10212 (linux_target_op) <read_offsets>: Conditionally define to
10213 linux_read_offsets if the target is UCLIBC and if it defines
10214 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10216 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10217 Andrew Jenner <andrew@codesourcery.com>
10219 * Makefile.in (SFILES): Add linux-nios2-low.c.
10220 (clean): Add action to delete nios2-linux.c.
10221 (nios2-linux.c): New rule.
10222 * configure.srv: Add nios2*-*-linux*.
10223 * linux-nios2-low.c: New.
10225 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10227 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10229 2013-04-25 Hui Zhu <hui@codesourcery.com>
10232 * ax.c (ax_printf): Add fflush.
10234 2013-04-22 Tom Tromey <tromey@redhat.com>
10236 * Makefile.in (SFILES): Add filestuff.c.
10237 (OBS): Add filestuff.o.
10238 (filestuff.o): New target.
10239 * config.in, configure: Rebuild.
10240 * configure.ac: Check for fdwalk, pipe2.
10242 2013-04-17 Pedro Alves <palves@redhat.com>
10244 * configure.ac (USE_THREAD_DB): Delete variable.
10245 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10246 Don't AC_SUBST USE_THREAD_DB.
10247 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10248 * config.in, configure: Regenerate.
10250 2013-04-16 Pedro Alves <palves@redhat.com>
10252 * linux-low.h (struct lwp_info) <thread_known>: Move under
10253 the USE_THREAD_DB #ifdef.
10255 2013-04-16 Pedro Alves <palves@redhat.com>
10257 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10258 (linux-low.o): Delete rule.
10259 * linux-low.h: Always include "gdb_thread_db.h" instead of
10260 conditionally including thread_db.h.
10261 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10264 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10266 * Makefile.in (install-only): Fix make install regression.
10268 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10270 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10271 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10273 * gdbserver.1: Remove.
10275 2013-03-22 Pedro Alves <palves@redhat.com>
10277 * linux-low.c (handle_extended_wait): Don't call
10278 linux_enable_event_reporting.
10280 2013-03-15 Tony Theodore <tonyt@logyst.com>
10283 * Makefile.in (SHELL): Use @SHELL@.
10285 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10287 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10290 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10292 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10293 Remove extraneous NULL element.
10295 2013-03-13 Yao Qi <yao@codesourcery.com>
10297 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10298 'V' block in trace frame.
10300 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10302 * target.h (struct target_ops): Add btrace ops.
10303 (target_supports_btrace): New macro.
10304 (target_enable_btrace): New macro.
10305 (target_disable_btrace): New macro.
10306 (target_read_btrace): New macro.
10307 * gdbthread.h (struct thread_info): Add btrace field.
10308 * server.c: Include btrace-common.h.
10309 (handle_btrace_general_set): New function.
10310 (handle_btrace_enable): New function.
10311 (handle_btrace_disable): New function.
10312 (handle_general_set): Call handle_btrace_general_set.
10313 (handle_qxfer_btrace): New function.
10314 (struct qxfer qxfer_packets[]): Add btrace entry.
10315 * inferiors.c (remove_thread): Disable btrace.
10316 * linux-low: Include linux-btrace.h.
10317 (linux_low_enable_btrace): New function.
10318 (linux_low_read_btrace): New function.
10319 (linux_target_ops): Add btrace ops.
10320 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10321 Add srv_linux_btrace=yes.
10322 (x86_64-*-linux*): Add linux-btrace.o.
10323 Add srv_linux_btrace=yes.
10324 * configure.ac: Define HAVE_LINUX_BTRACE.
10325 * config.in: Regenerated.
10326 * configure: Regenerated.
10328 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10330 * server.c (handle_qxfer): Preserve error message if -3 is
10332 (qxfer): Document the -3 return value.
10334 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10336 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10337 (linux_btrace_h): New variable.
10338 (linux-btrace.o): New rule.
10340 2013-03-08 Stan Shebs <stan@codesourcery.com>
10341 Hafiz Abid Qadeer <abidh@codesourcery.com>
10343 * tracepoint.c (trace_buffer_size): New global.
10344 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10345 (init_trace_buffer): Change to one-argument function. Allocate
10346 trace buffer memory.
10347 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10348 handle QTBuffer:size packet.
10349 (cmd_bigqtbuffer_size): New function.
10350 (initialize_tracepoint): Call init_trace_buffer with
10351 DEFAULT_TRACE_BUFFER_SIZE.
10352 * server.c (handle_query): Add QTBuffer:size in the
10355 2013-03-07 Yao Qi <yao@codesourcery.com>
10357 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10358 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10360 (cmd_qtsp): Adjust condition. Do post increment.
10361 Set cur_action and cur_step_action back to 0.
10363 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10366 * linux-low.c (linux_write_memory): Return early success if LEN is
10369 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10371 * configure.srv: Add x86_64-*-cygwin* as target.
10373 2013-02-28 Tom Tromey <tromey@redhat.com>
10375 * configure.ac: Invoke AC_SYS_LARGEFILE.
10376 * configure, config.in: Rebuild.
10378 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10380 * win32-low.c: Throughout, fix format strings and casts of
10381 printf-like functions to avoid type related warnings on all
10383 (get_child_debug_event): Print dwDebugEventCode as hex since
10384 that's how it's usually documented.
10386 2013-02-28 Yao Qi <yao@codesourcery.com>
10388 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10391 2013-02-27 Jiong Wang <jiwang@tilera.com>
10393 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10394 (reg-tilegx32.c): New rule.
10395 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10396 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10397 different register info initializer according to elf class.
10398 (init_registers_tilgx32): New function. The tilegx32 register info
10400 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10401 (tile_store_gregset): Likewise.
10403 2013-02-27 Yao Qi <yao@codesourcery.com>
10405 * server.c (process_point_options): Print debug message when
10406 debug_threads is true.
10408 2013-02-26 Yao Qi <yao@codesourcery.com>
10410 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10412 2013-02-19 Pedro Alves <palves@redhat.com>
10413 Kai Tietz <ktietz@redhat.com>
10417 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10418 instead of strtoul to extract address from packet.
10419 (process_serial_event) <'z'>: Likewise.
10421 2013-02-18 Yao Qi <yao@codesourcery.com>
10423 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10425 2013-02-14 Pedro Alves <palves@redhat.com>
10429 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10430 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10432 2013-02-14 Pedro Alves <palves@redhat.com>
10434 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10436 2013-02-14 Pedro Alves <palves@redhat.com>
10438 * tracepoint.c (save_string): Delete.
10439 (add_tracepoint_action): Use savestring instead of save_string.
10441 2013-02-12 Pedro Alves <palves@redhat.com>
10443 * linux-xtensa-low.c: Ditto.
10444 * xtensa-xtregs.c: Ditto.
10446 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10448 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10451 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10453 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10454 aarch64_num_wp_regs and aarch64_num_bp_regs to
10455 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10457 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10459 * linux-aarch64-low.c (ps_get_thread_area): Replace
10460 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10462 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10463 Marcus Shawcroft <marcus.shawcroft@arm.com>
10464 Nigel Stephens <nigel.stephens@arm.com>
10465 Yufeng Zhang <yufeng.zhang@arm.com>
10467 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10468 (aarch64.c, aarch64-without-fpu.c): New targets.
10469 * configure.srv (aarch64*-*-linux*): New.
10470 * linux-aarch64-low.c: New file.
10472 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10474 * linux-low.c (handle_extended_wait, linux_create_inferior)
10475 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10476 (dequeue_one_deferred_signal, linux_resume_one_thread)
10477 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10478 (linux_tracefork_grandchild, linux_test_for_tracefork)
10479 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10480 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10481 where the argument is 0.
10483 2013-01-25 Yao Qi <yao@codesourcery.com>
10485 * event-loop.c: Include "queue.h".
10486 (gdb_event_p): New typedef.
10487 (struct gdb_event) <next_event>: Remove.
10488 (event_queue): Change to QUEUE(gdb_event_p).
10489 (async_queue_event): Remove.
10490 (gdb_event_xfree): New.
10491 (initialize_event_loop): New.
10492 (process_event): Use API from QUEUE.
10493 (wait_for_event): Likewise.
10494 * server.c (main): Call initialize_event_loop.
10495 * server.h (initialize_event_loop): Declare.
10497 2013-01-18 Yao Qi <yao@codesourcery.com>
10499 * ax.h (struct eval_agent_expr_context): New.
10500 (gdb_eval_agent_expr): Update declaration.
10501 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10502 TFRAME. Add new argument CTX.
10503 * server.h (struct eval_agent_expr_context): Declare.
10504 (agent_mem_read, agent_tsv_read): Update declaration.
10505 (agent_mem_read_string): Likewise.
10506 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10507 (add_traceframe_block): Add new argument TPOINT.
10508 Increase TPOINT->traceframe_usage.
10509 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10510 eval_tracepoint_agent_expr.
10511 (condition_true_at_tracepoint): Likewise.
10512 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10513 (agent_mem_read_string, agent_tsv_read): Likewise.
10515 2013-01-16 Yao Qi <yao@codesourcery.com>
10517 * linux-low.c (linux_resume_one_lwp): Don't check
10518 'lwp->bp_reinsert != 0'.
10520 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10521 Pedro Alves <palves@redhat.com>
10523 * lynx-low.c (ptrace_request_to_str): Define a temporary
10524 macro and use it to simplify this function's implementation.
10526 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10528 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10531 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10533 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10535 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10537 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10539 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10541 * lynx-low.c (lynx_resume): Use the resume_info parameter
10542 to determine the ptid for the lynx_ptrace call, unless
10543 it is equal to minus_one_ptid, in which case we use the
10544 ptid of the current_inferior.
10545 (lynx_wait_1): After having received a thread create/exit
10546 event, resume the inferior's execution using the signaling
10547 thread's ptid, rather than the old ptid.
10549 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10551 * lynx-low.c (lynx_resume): Delete variable ret.
10553 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10555 * gdbreplay.c (gdbreplay_version): Update copyright year.
10556 * server.c (gdbserver_version): Likewise.
10558 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10560 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10563 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10565 * lynx-low.c (ptrace_request_to_str): Add handling for
10566 PTRACE_GETTRACESIG.
10568 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10570 * lynx-low.c (lynx_attach): Delete variable new_process.
10572 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10574 * lynx-low.c (lynx_create_inferior): Delete variable
10577 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10579 * lynx-low.c (ptrace_request_to_str): Do not handle
10580 PTRACE_GETTHREADLIST if this macro does not exist.
10582 2012-12-15 Yao Qi <yao@codesourcery.com>
10584 * Makefile.in (OBS): Add notif.o.
10585 * notif.c, notif.h: New.
10586 * server.c: Include "notif.h".
10587 (struct vstop_notif) <next>: Remove.
10589 (queue_stop_reply): Update.
10590 (push_event, send_next_stop_reply): Remove.
10591 (discard_queued_stop_replies): Update.
10592 (notif_stop): New variable.
10593 (handle_v_stopped): Remove.
10594 (handle_v_requests): Don't call handle_v_stopped. Call
10595 handle_ack_notif instead.
10596 (queue_stop_reply_callback): Call notif_event_enque instead
10597 of queue_stop_reply.
10598 (handle_status): Don't call send_next_stop_reply, call
10599 notif_write_event instead.
10600 (kill_inferior_callback): Likewise.
10601 (detach_or_kill_inferior_callback): Likewise.
10602 (main): Call initialize_notif.
10603 (process_serial_event): Call QUEUE_is_empty.
10604 (handle_target_event): Call notif_push instead of push event.
10605 * server.h (push_event): Remove declaration.
10607 2012-12-10 Tom Tromey <tromey@redhat.com>
10609 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10610 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10613 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10614 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10615 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10616 (amd64-linux-ipa.o, ax.o): Rewrite.
10617 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10618 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10619 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10620 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10621 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10622 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10623 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10624 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10625 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10626 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10627 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10628 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10629 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10630 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10631 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10632 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10633 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10634 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10635 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10636 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10637 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10638 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10639 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10640 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10641 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10642 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10643 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10644 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10645 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10646 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10647 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10648 (reg-tilegx.o): Remove.
10649 (all_object_files): New macro.
10650 Include .deps files.
10651 * aclocal.m4, configure: Rebuild.
10652 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10653 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10654 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10656 2012-12-05 Tom Tromey <tromey@redhat.com>
10659 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10661 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10663 * configure.ac: Check for linux/perf_event.h.
10664 * config.in: Regenerated.
10665 * configure: Regenerated.
10667 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10669 * hostio.c (handle_readlink): Decrease buffer size
10670 parameter passed to readlink by one byte.
10672 2012-11-26 Yao Qi <yao@codesourcery.com>
10674 * configure.ac (build_warnings): Append '-Wempty-body'.
10675 * configure: Regenerated.
10676 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10679 2012-11-15 Pierre Muller <muller@sourceware.org>
10681 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10682 * config.in: Regenerate.
10683 * configure: Regenerate.
10684 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10685 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10686 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10687 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10689 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10690 instead of <sys/wait.h> header.
10691 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10693 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10695 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10696 (various make rules): Remove -DGDBSERVER
10698 2012-11-09 Yao Qi <yao@codesourcery.com>
10700 * spu-low.c (current_ptid): Move it to ..
10701 * gdbthread.h: ... here. New.
10702 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10703 * server.c (myresume, process_serial_event): Likewise.
10704 * thread-db.c (thread_db_find_new_threads): Likewise.
10705 * tracepoint.c (run_inferior_command): Likewise.
10707 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10709 * server.c (handle_search_memory_1): Include access length in
10712 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10714 * linux-crisv32-low.c: Fix compile errors.
10716 2012-09-04 Yao Qi <yao@codesourcery.com>
10718 * tracepoint.c (cmd_qtsv): Adjust debug message.
10719 Don't check CUR_TPOINT.
10721 2012-08-28 Yao Qi <yao@codesourcery.com>
10723 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10724 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10725 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10726 Remove declarations of xmalloc, xreallloc, xstrdup and
10728 * Makefile.in (libiberty_h): New.
10729 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10730 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10732 2012-08-23 Yao Qi <yao@codesourcery.com>
10734 * server.h: Remove declaration of 'xsnprintf'.
10736 2012-08-22 Keith Seitz <keiths@redhat.com>
10738 * server.h: Include build-gnulib-gbserver/config.h.
10739 * gdbreplay.c: Likewise.
10741 2012-08-08 Doug Evans <dje@google.com>
10743 * Makefile.in (SFILES): Add gdb_vecs.c.
10744 (OBS): Add gdb_vecs.o.
10745 (gdb_vecs_h, host_defs_h): New variables.
10746 (thread-db.o): Add $(gdb_vecs_h) dependency.
10747 (gdb_vecs.o): New rule.
10748 * thread-db.c: #include "gdb_vecs.h".
10749 (thread_db_load_search): Use a vector to iterate over path elements.
10750 Handle text appearing after "$pdir".
10752 * configure.ac: Add check for strstr.
10753 * config.in: Regenerate.
10754 * configure: Regenerate.
10756 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10758 * hostio.c (handle_pread): If pread fails, fall back to attempting
10760 (handle_pwrite): Likewise for pwrite.
10762 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10764 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10765 between unsupported TYPE and unimplementable ADDR/LEN combination.
10766 (arm_insert_point): Act on new return value.
10768 2012-07-31 Pedro Alves <palves@redhat.com>
10770 * server.c (process_point_options): Only skip tokens if we find
10771 one that is unrecognized. Don't treat 'X' specially while
10772 skipping unrecognized tokens.
10774 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10776 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10777 to 4-byte-align HW breakpoint addresses for Thumb.
10779 2012-07-27 Yao Qi <yao@codesourcery.com>
10783 * server.h: Declare gdb_agent_about_to_close.
10784 * target.c (kill_inferior): Include "agent.h".
10785 New. Send command 'kill'.
10786 * target.h (kill_inferior): Removed macro.
10787 * tracepoint.c (gdb_agent_about_to_close): New.
10788 (gdb_agent_helper_thread): Handle command 'close'.
10789 Wait endlessly until the inferior stops.
10790 Install gdb_agent_remove_socket to atexit hook.
10791 (agent_socket_name): New static variable.
10792 (gdb_agent_socket_init): Replace local variable 'name' with
10793 'agent_socket_name'.
10794 (gdb_agent_remove_socket): New.
10796 2012-07-27 Yao Qi <yao@codesourcery.com>
10798 * server.c (process_point_options): Stop at 'X' when parsing.
10800 2012-07-19 Michael Eager <eager@eagercon.com>
10802 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10804 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10805 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10806 hardware breakpoint.
10808 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10810 * gdbserver/linux-low.c (initialize_low): Call
10811 linux_ptrace_init_warnings.
10813 2012-07-02 Doug Evans <dje@google.com>
10815 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10818 2012-07-02 Stan Shebs <stan@codesourcery.com>
10820 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10821 (ax.o): Add it to build rule.
10823 (OBS): Add format.o.
10824 (IPA_OBS): Add format.o.
10825 * server.c (handle_query): Claim support for breakpoint commands.
10826 (process_point_options): Add command case.
10827 (process_serial_event): Leave running if there are printfs in
10829 * mem-break.h (any_persistent_commands): Declare.
10830 (add_breakpoint_commands): Declare.
10831 (gdb_no_commands_at_breakpoint): Declare.
10832 (run_breakpoint_commands): Declare.
10833 * mem-break.c (struct point_command_list): New struct.
10834 (struct breakpoint): New field command_list.
10835 (any_persistent_commands): New function.
10836 (add_commands_to_breakpoint): New function.
10837 (add_breakpoint_commands): New function.
10838 (gdb_no_commands_at_breakpoint): New function.
10839 (run_breakpoint_commands): New function.
10840 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10842 * ax.c: Include format.h.
10843 (ax_printf): New function.
10844 (gdb_eval_agent_expr): Add printf opcode.
10846 2012-06-13 Yao Qi <yao@codesourcery.com>
10848 * server.c (start_inferior): Remove duplicated writes to fields
10849 'last_resume_kind' and 'last_status' of 'current_inferior'.
10851 2012-06-12 Yao Qi <yao@codesourcery.com>
10852 Pedro Alves <palves@redhat.com>
10854 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10856 * server.c (handle_v_cont): Extend comment.
10858 2012-06-11 Yao Qi <yao@codesourcery.com>
10860 * linux-low.c (linux_attach): Add 'static'.
10862 2012-06-06 Yao Qi <yao@codesourcery.com>
10864 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10866 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10868 Fix gcc -flto compilation warning.
10869 * server.c (main): Make variable multi_mode and attach volatile.
10871 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10873 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10874 if the platform doesn't know about it.
10876 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10878 * Makefile.in (SFILES): Add linux-tile-low.c.
10879 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10880 * configure.srv: Handle tilegx-*-linux*.
10881 * linux-tile-low.c: New file.
10883 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10885 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10887 2012-05-24 Pedro Alves <palves@redhat.com>
10891 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10893 2012-05-24 Pedro Alves <palves@redhat.com>
10897 Replace target_signal with gdb_signal throughout.
10899 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10901 * linux-low.c (linux_store_registers): Avoid the copying sequence
10902 when no data has been retrieved by ptrace.
10904 2012-05-22 Will Deacon <will.deacon@arm.com>
10906 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10907 Include asm/ptrace.h.
10908 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10911 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10913 * linux-low.c (linux_store_registers): Don't re-retrieve data
10914 with ptrace that has already been obtained from /proc. Always
10915 copy any data retrieved with ptrace to the buffer supplied.
10917 2012-05-11 Yao Qi <yao@codesourcery.com>
10918 Pedro Alves <palves@redhat.com>
10920 * linux-low.c (enum stopping_threads_kind): New.
10921 (stopping_threads): Change type to `enum stopping_threads_kind'.
10922 (handle_extended_wait): If stopping and suspending threads, leave
10923 the new_lwp suspended too.
10924 (linux_wait_for_event): Adjust.
10925 (stop_all_lwps): Set `stopping_threads' to
10926 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10927 whether we're suspending threads or just stopping them. Assert no
10930 2012-04-29 Yao Qi <yao@codesourcery.com>
10932 * server.h: Move some code to ...
10933 * gdbthread.h: ... here. New.
10934 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10935 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10936 (nto-low.o, win32-low.o): Likewise.
10937 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10938 * regcache.c, remote-utils.c, server.c: Likewise.
10939 * target.c, tracepoint.c, win32-low.c: Likewise.
10941 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10943 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10944 (PTRACE_ARG4_TYPE): Likewise.
10945 (PTRACE_XFER_TYPE): Likewise.
10946 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10947 ptrace to PTRACE_ARG3_TYPE.
10948 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10949 (PTRACE_ARG4_TYPE): Likewise.
10950 (PTRACE_XFER_TYPE): Likewise.
10951 (linux_detach_one_lwp): Cast fourth argument of
10952 ptrace to long then PTRACE_ARG4_TYPE.
10953 (regsets_fetch_inferior_registers): Cast third argument of
10954 ptrace to long then PTRACE_ARG3_TYPE.
10955 (regsets_store_inferior_registers): Likewise.
10957 2012-04-20 Pedro Alves <palves@redhat.com>
10959 * configure: Regenerate.
10961 2012-04-19 Pedro Alves <palves@redhat.com>
10963 * Makefile.in (GNULIB_BUILDDIR): New.
10964 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10965 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10966 (all, install-only, uninstall, clean-info, all-lib, clean): No
10967 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10968 (maintainer-clean realclean distclean): Use subdir_do.
10970 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10971 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10972 * acinclude.m4: Include acx_configure_dir.m4.
10973 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10974 calls. Call AC_PROG_RANLIB. Configure gnulib using
10977 (GNULIB_STDINT_H): Adjust.
10978 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10979 * gdbreplay.c: Include build-gnulib/config.h.
10980 * server.h: Likewise.
10981 * aclocal.m4: Regenerate.
10982 * config.in: Regenerate.
10983 * configure: Regenerate.
10985 2012-04-19 Pedro Alves <palves@redhat.com>
10987 * Makefile.in (LIBGNU, INCGNU): Adjust.
10988 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10989 (all, install-only, uninstall, clean-info, all-lib, clean)
10990 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10991 * configure.ac: Adjust AC_OUTPUT output.
10992 * aclocal.m4: Regenerate.
10993 * configure: Regenerate.
10995 2012-04-19 Pedro Alves <palves@redhat.com>
10997 * Makefile.in (generated_files): New.
10998 (server_h): Remove the explicit dependency on config.h, and depend
10999 on $generated_files.
11001 2012-04-19 Pedro Alves <palves@redhat.com>
11003 * Makefile.in (INCGNU): Add -Ignulib.
11005 2012-04-19 Pedro Alves <palves@redhat.com>
11007 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11008 (INCGNU): ... this, and spell out -I here.
11009 (GNULIB_LIB): Rename to ...
11010 (LIBGNU): ... this.
11011 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11013 2012-04-19 Pedro Alves <palves@redhat.com>
11015 * config.in: Regenerate.
11017 2012-04-19 Pedro Alves <palves@redhat.com>
11019 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11020 * server.h (memmem): Remove declaration.
11021 * config.in: Regenerate.
11022 * configure: Regenerate.
11024 2012-04-19 Yao Qi <yao@codesourcery.com>
11026 * Makefile.in (SFILES): Add common/vec.c.
11030 2012-04-19 Yao Qi <yao@codesourcery.com>
11032 * remote-utils.c (prepare_resume_reply): Replace with macro
11033 target_core_of_thread.
11034 * server.c (handle_qxfer_threads_proper): Likewise.
11035 * target.h (traget_core_of_thread): New macro.
11037 2012-04-18 Pedro Alves <palves@redhat.com>
11039 * aclocal.m4: Regenerate.
11040 * configure: Regenerate.
11042 2012-04-16 Yao Qi <yao@codesourcery.com>
11044 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11045 duplicated on address.
11047 2012-04-16 Yao Qi <yao@codesourcery.com>
11049 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11050 (struct tracepoint_action_ops) <send>: New field.
11051 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11052 (agent_expr_send, x_tracepoint_action_send): New.
11053 (l_tracepoint_action_send): New.
11054 (cmd_qtdp): Download and install tracepoint
11055 according to `use_agent'.
11056 (run_inferior_command): Add one more parameter `len'.
11058 (tracepoint_send_agent): New.
11059 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11061 2012-04-16 Yao Qi <yao@codesourcery.com>
11063 * tracepoint.c (download_tracepoints): Moved to ...
11064 (cmd_qtstart): ... here.
11066 2012-04-14 Yao Qi <yao@codesourcery.com>
11068 * tracepoint.c: Include inttypes.h.
11069 (struct collect_memory_action): Use sized types.
11070 (struct tracepoint): Likewise.
11071 (cmd_qtdp, stop_tracing): Update print specifiers.
11072 (cmd_qtp, response_tracepoint): Likewise.
11073 (collect_data_at_tracepoint): Likewise.
11074 (collect_data_at_step): Likewise.
11076 2012-04-14 Yao Qi <yao@codesourcery.com>
11078 Import gnulib module inttypes.
11079 * aclocal.m4, config.in, configure: Regenerated.
11081 2012-04-14 Yao Qi <yao@codesourcery.com>
11083 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11084 Makefile and config.status at last.
11086 2012-04-13 Yao Qi <yao@codesourcery.com>
11088 * tracepoint.c: Include stdint.h unconditionally.
11090 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11092 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11093 on BFD_HAVE_SYS_PROCFS_TYPE.
11094 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11095 * configure: Regenerate.
11096 * config.in: Likewise.
11098 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11100 * Makefile.in (clean): Also remove x32.c x32-linux.c
11101 x32-avx.c x32-avx-linux.c.
11102 (x32.o): New target.
11104 (x32-linux.o): Likewise.
11105 (x32-linux.c): Likewise.
11106 (x32-avx.o): Likewise.
11107 (x32-avx.c): Likewise.
11108 (x32-avx-linux.o): Likewise.
11109 (x32-avx-linux.c): Likewise.
11111 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11112 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11113 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11114 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11115 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11116 i386/x32-avx-linux.xml.
11118 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11119 (init_registers_x32_avx_linux): Likwise.
11120 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11121 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11123 2012-04-13 Pedro Alves <palves@redhat.com>
11125 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11126 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11127 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11128 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11131 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11133 * linux-x86-low.c (compat_x32_clock_t): New.
11134 (compat_x32_siginfo_t): Likewise.
11135 (compat_x32_siginfo_from_siginfo): Likewise.
11136 (siginfo_from_compat_x32_siginfo): Likewise.
11137 (linux_is_elf64): Likewise.
11138 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11139 and siginfo_from_compat_x32_siginfo for x32.
11140 (x86_arch_setup): Set linux_is_elf64.
11142 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11145 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11147 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11148 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11149 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11150 compatible with process.
11152 2012-04-12 Yao Qi <yao@codesourcery.com>
11154 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11155 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11156 (install-only, install-info, clean): Handle sub dir gnulib.
11157 (all-lib, am--refresh): New targets.
11158 (memmem.o): Remove target.
11159 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11160 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11161 (AC_REPLACE_FUNCS): Remove memmem.
11162 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11163 (AC_OUTPUT): Generate Makefile in gnulib/.
11164 * aclocal.m4, config.in, configure: Regenerated.
11166 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11168 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11170 2012-04-05 Pedro Alves <palves@redhat.com>
11172 -Werror=strict-aliasing
11174 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11177 2012-04-04 Pedro Alves <palves@redhat.com>
11179 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11180 (sparc_store_gregset_from_stack, sparc_store_gregset)
11181 (sparc_breakpoint_at): Fix formatting.
11183 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11185 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11187 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11188 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11189 * config.in: Regenerate.
11190 * configure: Likewise.
11192 2012-03-29 Pedro Alves <palves@redhat.com>
11194 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11195 Correct ptrace arguments.
11197 2012-03-28 Pedro Alves <palves@redhat.com>
11199 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11200 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11201 (IA64_FR1_REGNUM): New defines.
11202 (ia64_fetch_register): New.
11203 (the_low_target): Install it.
11204 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11206 * linux-low.c (linux_fetch_registers): Try the
11207 the_low_target.fetch_register hook first.
11209 * linux-arm-low.c (the_low_target): Adjust.
11210 * linux-bfin-low.c (the_low_target): Adjust.
11211 * linux-cris-low.c (the_low_target): Adjust.
11212 * linux-crisv32-low.c (the_low_target): Adjust.
11213 * linux-m32r-low.c (the_low_target): Adjust.
11214 * linux-m68k-low.c (the_low_target): Adjust.
11215 * linux-mips-low.c (the_low_target): Adjust.
11216 * linux-ppc-low.c (the_low_target): Adjust.
11217 * linux-s390-low.c (the_low_target): Adjust.
11218 * linux-sh-low.c (the_low_target): Adjust.
11219 * linux-sparc-low.c (the_low_target): Adjust.
11220 * linux-tic6x-low.c (the_low_target): Adjust.
11221 * linux-x86-low.c (the_low_target): Adjust.
11222 * linux-xtensa-low.c (the_low_target): Adjust.
11224 2012-03-26 Pedro Alves <palves@redhat.com>
11226 * server.c (handle_qxfer_libraries): Don't bail early if
11227 the_target->qxfer_libraries_svr4 is not NULL.
11229 2012-03-26 Pedro Alves <palves@redhat.com>
11231 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11233 2012-03-23 Pedro Alves <palves@redhat.com>
11235 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11236 "library-list-svr4" element's start tag when the the DSO list is
11239 2012-03-23 Pedro Alves <palves@redhat.com>
11241 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11242 a variable whose type size is the same as the inferior's pointer
11245 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11247 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11249 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11250 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11251 * linux-low.h: Include <signal.h>.
11252 (struct siginfo): Remove forward declaration.
11253 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11256 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11258 * .gitignore: Ignore more files.
11260 2012-03-19 Pedro Alves <palves@redhat.com>
11261 Jan Kratochvil <jan.kratochvil@redhat.com>
11263 * server.c (cont_thread, general_thread): Add describing comments.
11264 (start_inferior): Clear `cont_thread'.
11265 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11268 2012-03-15 Yao Qi <yao@codesourcery.com>
11270 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11272 (cmd_qtdp): ... here.
11274 2012-03-15 Yao Qi <yao@codesourcery.com>
11276 * tracepoint.c (struct tracepoint_action_ops): New.
11277 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11278 (m_tracepoint_action_download): New.
11279 (r_tracepoint_action_download): New.
11280 (x_tracepoint_action_download): New.
11281 (l_tracepoint_action_download): New.
11282 (add_tracepoint_action): Install `action->ops' according type.
11283 (download_tracepoint_1): Move code `download' function pointer
11284 of various tracepoint_action_ops.
11286 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11288 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11289 linux_ptrace_attach_warnings.
11291 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11293 * Makefile.in (linux-ptrace.o): New.
11294 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11295 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11296 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11297 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11298 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11300 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11302 2012-03-08 Yao Qi <yao@codesourcery.com>
11303 Pedro Alves <palves@redhat.com>
11305 Fix PR server/13392.
11306 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11307 offset of JMP insn.
11308 * tracepoint.c (remove_tracepoint): New.
11309 (cmd_qtdp): Call remove_tracepoint when failed to install.
11311 2012-03-07 Pedro Alves <palves@redhat.com>
11313 * linux-low.c (get_detach_signal): New.
11314 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11315 Pass on pending signals to PTRACE_DETACH. Check the result of the
11317 * server.c (program_signals, program_signals_p): New.
11318 (handle_general_set): Handle QProgramSignals.
11319 * server.h (program_signals, program_signals_p): Declare.
11321 2012-03-05 Pedro Alves <palves@redhat.com>
11322 Jan Kratochvil <jan.kratochvil@redhat.com>
11324 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11327 2012-03-03 Yao Qi <yao@codesourcery.com>
11329 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11330 agent_look_up_symbols.
11332 2012-03-03 Yao Qi <yao@codesourcery.com>
11334 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11335 (linux-x86-low.o): Likewise.
11336 * server.h: Remove in_process_agent_loaded.
11337 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11341 2012-03-03 Yao Qi <yao@codesourcery.com>
11343 * tracepoint.c (gdb_agent_capability): New global.
11344 (in_process_agent_loaded_ust): Renamed to
11345 `in_process_agent_supports_ust'.
11347 (in_process_agent_supports_ust): Call agent_capability_check.
11348 (clear_installed_tracepoints): Assert that agent supports
11351 2012-03-03 Yao Qi <yao@codesourcery.com>
11353 * linux-low.c (linux_supports_agent): New.
11354 (linux_target_ops): Initialize field `supports_agent' with
11355 linux_supports_agent.
11356 * target.h (struct target_ops) <supports_agent>: New.
11357 (target_supports_agent): New macro.
11358 * server.c (handle_general_set): Handle packet 'QAgent'.
11359 (handle_query): Send `QAgent+'.
11360 * Makefile.in (server.o): Depends on agent.h.
11362 2012-03-03 Yao Qi <yao@codesourcery.com>
11364 * Makefile.in (OBS): Add agent.o.
11365 Add new rule for agent.o.
11366 Track dependence of tracepoint.c on agent.h.
11367 * tracepoint.c (run_inferior_command_1):
11368 (run_inferior_command): Call agent_run_command.
11369 (gdb_ust_connect_sync_socket): Deleted. Move it to
11371 (resume_thread, stop_thread): Likewise.
11372 (gdb_ust_socket_init): Renamed to ...
11373 (gdb_agent_socket_init): ... New.
11374 (gdb_ust_thread): Renamed to ...
11375 (gdb_agent_helper_thread): ... New.
11376 (gdb_ust_init): Move some code to ...
11377 (gdb_agent_init): ... here. New.
11378 [HAVE_UST]: Call gdb_ust_init.
11379 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11380 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11381 * config.in, configure: Regenerated.
11383 2012-03-02 Pedro Alves <palves@redhat.com>
11385 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11386 * linux-low.c (struct simple_pid_list): New.
11387 (stopped_pids): New a struct simple_pid_list pointer.
11388 (add_to_pid_list, pull_pid_from_list): New.
11389 (handle_extended_wait): Don't assume the first signal new children
11390 report is SIGSTOP. Adjust call to pull_pid_from_list.
11391 (linux_wait_for_lwp): Adjust.
11393 2012-03-02 Yao Qi <yao@codesourcery.com>
11395 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11398 2012-03-02 Yao Qi <yao@codesourcery.com>
11400 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11401 `stop_pc' and `tpoint'. Update caller.
11403 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11405 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11406 * linux-low.c (use_linux_regsets): New macro.
11407 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11408 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11409 (linux_register_in_regsets): New function.
11410 (usr_fetch_inferior_registers): Skip registers covered by
11412 (usr_store_inferior_registers): Likewise.
11413 (usr_fetch_inferior_registers): New macro.
11414 (usr_store_inferior_registers): Likewise.
11415 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11416 (linux_store_registers): Likewise.
11417 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11419 (init_registers_mips64_dsp_linux): Likewise.
11420 (init_registers_mips_linux): New macro.
11421 (init_registers_mips_dsp_linux): Likewise.
11422 (mips_dsp_num_regs): Likewise.
11423 (DSP_BASE, DSP_CONTROL): New fallback macros.
11424 (mips_base_regs): New macro.
11425 (mips_regmap): Use it. Fix the size.
11426 (mips_dsp_regmap): New variable.
11427 (mips_dsp_regset_bitmap): Likewise.
11428 (mips_arch_setup): New function.
11429 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11431 (mips_cannot_store_register): Likewise.
11432 (the_low_target): Update .arch_setup, .num_regs and .regmap
11433 initializers. Add .regset_bitmap initializer.
11434 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11436 * linux-bfin-low.c (the_low_target): Likewise.
11437 * linux-cris-low.c (the_low_target): Likewise.
11438 * linux-crisv32-low.c (the_low_target): Likewise.
11439 * linux-ia64-low.c (the_low_target): Likewise.
11440 * linux-m32r-low.c (the_low_target): Likewise.
11441 * linux-m68k-low.c (the_low_target): Likewise.
11442 * linux-ppc-low.c (the_low_target): Likewise.
11443 * linux-s390-low.c (the_low_target): Likewise.
11444 * linux-sh-low.c (the_low_target): Likewise.
11445 * linux-sparc-low.c (the_low_target): Likewise.
11446 * linux-tic6x-low.c (the_low_target): Likewise.
11447 * linux-x86-low.c (the_low_target): Likewise.
11448 * linux-xtensa-low.c (the_low_target): Likewise.
11449 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11450 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11451 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11453 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11454 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11456 2012-02-29 Yao Qi <yao@codesourcery.com>
11457 Pedro Alves <palves@redhat.com>
11459 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11460 `step_over_finished' is true.
11462 2012-02-27 Pedro Alves <palves@redhat.com>
11464 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11465 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11467 2012-02-27 Pedro Alves <palves@redhat.com>
11470 * linux-low.c (pid_is_stopped): New.
11471 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11473 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11475 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11478 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11480 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11482 2012-02-24 Luis Machado <lgustavo@codesourcery>
11484 * server.c (handle_query): Advertise support for target-side
11485 breakpoint condition evaluation.
11486 (process_point_options): New function.
11487 (process_serial_event): When inserting a breakpoint, check for
11488 a target-side condition that should be evaluated.
11490 * mem-break.c: Include regcache.h and ax.h.
11491 (point_cond_list_t): New data structure.
11492 (breakpoint) <cond_list>: New field.
11493 (find_gdb_breakpoint_at): Make non-static.
11494 (delete_gdb_breakpoint_at): Clear any target-side
11496 (clear_gdb_breakpoint_conditions): New function.
11497 (add_condition_to_breakpoint): Likewise.
11498 (add_breakpoint_condition): Likewise.
11499 (gdb_condition_true_at_breakpoint): Likewise.
11500 (gdb_breakpoint_here): Return result directly instead
11501 of going through a local variable.
11503 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11504 (clear_gdb_breakpoint_conditions): Likewise.
11505 (add_breakpoint_condition): Likewise.
11506 (gdb_condition_true_at_breakpoint): Likewise.
11508 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11509 (need_step_over_p): Take target-side breakpoint condition into
11512 2012-02-24 Luis Machado <lgustavo@codesourcery>
11514 * server.h: Include tracepoint.h.
11515 (agent_mem_read, agent_get_trace_state_variable_value,
11516 agent_set_trace_state_variable_value,
11517 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11518 get_set_tsv_func_addr): New prototypes.
11520 * ax.h: New include file.
11521 * ax.c: New source file.
11523 * tracepoint.c: Include ax.h.
11524 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11525 agent_expr, eval_result_type): Move to ax.h.
11526 (parse_agent_expr): Rename to ...
11527 (gdb_parse_agent_expr): ... this, make it non-static and move
11529 (unparse_agent_expr) Rename to ...
11530 (gdb_unparse_agent_expr): ... this, make it non-static and move
11532 (eval_agent_expr): Rename to ...
11533 (eval_tracepoint_agent_expr): ... this.
11534 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11535 forward declarations.
11536 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11537 (agent_get_trace_state_variable_value): New function.
11538 (agent_set_trace_state_variable_value): New function.
11539 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11540 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11541 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11542 (condition_true_at_tracepoint): Likewise.
11543 (parse_agent_expr): Rename to ...
11544 (gdb_parse_agent_expr): ... this and move to ax.c.
11545 (unparse_agent_expr): Rename to ...
11546 (gdb_unparse_agent_expr): ... this and move to ax.c.
11547 (gdb_agent_op_name): Move to ax.c.
11548 (eval_agent_expr): Rename to ...
11549 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11551 (eval_tracepoint_agent_expr): New function.
11552 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11554 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11556 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11557 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11558 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11559 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11560 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11561 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11562 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11563 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11564 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11565 (compile_bytecodes): Remove forward declaration.
11566 (is_goto_target): Move to ax.c.
11567 (compile_bytecodes): Move to ax.c and call
11568 agent_get_trace_state_variable_value (...) and
11569 agent_set_trace_state_variable_value (...).
11571 * Makefile.in: Update ax.c and IPA dependencies.
11573 2012-02-24 Pedro Alves <palves@redhat.com>
11575 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11576 (cmd_bigqtbuffer_circular): ... this. Only handle
11577 'QTBuffer:circular:'.
11578 (handle_tracepoint_general_set): Adjust.
11580 2012-02-16 Yao Qi <yao@codesourcery.com>
11582 * inferiors.c: Move code to ...
11583 * dll.c: .... here. New.
11584 * server.h: Declare clear_dlls.
11585 * Makefile.in (SFILES): Add dll.c.
11589 2012-02-11 Yao Qi <yao@codesourcery.com>
11591 * server.c: (handle_monitor_command): Add a new parameter
11593 (handle_query): Update caller.
11595 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11597 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11598 * configure, config.in: Regenerate.
11599 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11602 2012-02-02 Pedro Alves <palves@redhat.com>
11604 Try SIGKILL first, then PTRACE_KILL.
11605 * linux-low.c (linux_kill_one_lwp): New.
11606 (linux_kill_one_lwp): Rename to ...
11607 (kill_one_lwp_callback): ... this. Use the new
11608 linux_kill_one_lwp.
11610 2012-02-02 Pedro Alves <palves@redhat.com>
11612 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11615 2012-01-27 Pedro Alves <palves@redhat.com>
11617 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11618 (elf_64_file_p): Make static.
11619 (linux_pid_exe_is_elf_64_file): New.
11620 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11621 Delete declarations.
11622 (linux_pid_exe_is_elf_64_file): Declare.
11623 * linux-x86-low.c (x86_arch_setup): Use
11624 linux_pid_exe_is_elf_64_file.
11626 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11628 * linux-low.c (linux_wait_for_event_1): Rename to ...
11629 (linux_wait_for_event): ... here and merge it with former
11630 linux_wait_for_event - new variable wait_ptid, use it.
11631 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11633 2012-01-23 Pedro Alves <palves@redhat.com>
11635 * server.c (main): Avoid yet another case of infinite loop while
11636 detaching/killing after a longjmp.
11638 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11641 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11643 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11645 * hostio.c (handle_readlink): New function.
11646 (handle_vFile): Call it to handle "vFile:readlink" packets.
11648 2012-01-20 Pedro Alves <palves@redhat.com>
11649 Ulrich Weigand <ulrich.weigand@linaro.org>
11651 * server.c (handle_v_requests): Only support vAttach and vRun to
11652 start multiple processes when in extended protocol mode.
11654 2012-01-17 Pedro Alves <palves@redhat.com>
11656 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11657 memalign plus mprotect to allocate the scratch buffer.
11659 2012-01-13 Pedro Alves <palves@redhat.com>
11661 * server.c (attach_inferior): Clear `cont_thread'.
11663 2012-01-13 Pedro Alves <palves@redhat.com>
11665 * server.c (main): Avoid infinite loop while detaching/killing
11668 2012-01-09 Doug Evans <dje@google.com>
11670 * server.c (start_inferior): Set last_ptid in --wrapper case.
11672 2012-01-06 Yao Qi <yao@codesourcery.com>
11674 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11676 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11678 2012-01-04 Yao Qi <yao@codesourcery.com>
11680 * tracepoint.c (cmd_qtdp): Print debug message
11681 for static tracepoint.
11683 2012-01-04 Yao Qi <yao@codesourcery.com>
11685 * tracepoint.c (trace_vdebug): Differentiate debug message
11686 between gdbserver and IPA.
11688 2012-01-03 Yao Qi <yao@codesourcery.com>
11690 * tracepoint.c (tracepoint_was_hit): Don't collect for
11693 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11695 * terminal.h: Reformat copyright header.
11697 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11699 * server.c (gdbserver_version): Update copyright year.
11700 * gdbreplay.c (gdbreplay_version): Likewise.
11702 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11704 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11707 2011-12-18 Hui Zhu <teawater@gmail.com>
11708 * linux-low.c (linux_create_inferior): Save return value to ret.
11710 2011-12-18 Hui Zhu <teawater@gmail.com>
11712 * linux-low.c (linux_create_inferior): Save return value to ret.
11714 2011-12-16 Doug Evans <dje@google.com>
11716 * linux-low.c (linux_create_inferior): If stdio connection,
11717 redirect stdin from /dev/null, stdout to stderr.
11718 * remote-utils.c (remote_is_stdio): New static global.
11719 (remote_connection_is_stdio): New function.
11720 (remote_prepare): Handle stdio connection.
11721 (remote_open): Ditto.
11722 (remote_close): Don't close stdin for stdio connections.
11723 (read_prim,write_prim): New functions. Replace all calls to
11724 read/write to these.
11725 * server.c (main): Watch for "-" argument. Move call to
11726 remote_prepare before start_inferior.
11727 * server.h (STDIO_CONNECTION_NAME): New macro.
11728 (remote_connection_is_stdio): Declare.
11730 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11731 in debugging output.
11733 2011-12-15 Yao Qi <yao@codesourcery.com>
11735 * tracepoint.c: Include sys/syscall.h.
11736 (gdb_ust_thread): Remove preprocessor conditional.
11738 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11740 * linux-low.c (linux_detach_one_lwp): Call
11741 the_low_target.prepare_to_resume before detaching.
11743 2011-12-14 Yao Qi <yao@codesourcery.com>
11745 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11748 2011-12-14 Yao Qi <yao@codesourcery.com>
11750 * i386-low.c (i386_low_stopped_data_address): Initialize local
11751 variable `control'.
11753 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11757 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11758 DR_CONTROL unless necessary. Extend comments.
11759 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11760 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11762 2011-12-13 Yao Qi <yao@codesourcery.com>
11764 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11766 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11768 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11770 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11771 Print new debug message for such case.
11773 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11775 Fix overlapping memcpy.
11776 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11777 the read_inferior_memory transfer.
11778 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11779 write_inferior_memory transfer.
11780 (set_fast_tracepoint_jump): New variable buf. Use it for the
11781 read_inferior_memory and write_inferior_memory transfers.
11782 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11783 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11784 Use it for the write_inferior_memory transfer.
11785 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11788 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11790 * linux-low.c (fetch_register, store_register): Make code
11791 consistent, fix formatting.
11793 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11795 * linux-low.c (usr_store_inferior_registers): Factor out code
11796 to handle individual registers into...
11797 (store_register): ... this new function.
11799 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11801 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11802 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11803 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11804 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11805 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11806 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11807 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11808 (srv_xmlfiles): Add new XML files.
11810 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11812 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11813 (init_registers_s390_linux32v1): Add prototype.
11814 (init_registers_s390_linux32v2): Likewise.
11815 (init_registers_s390_linux64v1): Likewise.
11816 (init_registers_s390_linux64v2): Likewise.
11817 (init_registers_s390x_linux64v1): Likewise.
11818 (init_registers_s390x_linux64v2): Likewise.
11819 (s390_num_regs): Increment to 52.
11820 (s390_regmap): Add orig_r2 register.
11821 (s390_num_regs_3264): Increment to 68.
11822 (s390_regmap_3264): Add orig_r2 register.
11823 (s390_collect_ptrace_register): Handle orig_r2 register.
11824 (s390_supply_ptrace_register): Likewise.
11825 (s390_fill_last_break): New function.
11826 (s390_store_last_break): Likewise.
11827 (s390_fill_system_call): New function.
11828 (s390_store_system_call): Likewise.
11829 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11831 (s390_check_regset): New function.
11832 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11833 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11834 Update target_regsets for available register sets.
11836 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11837 Jan Kratochvil <jan.kratochvil@redhat.com>
11839 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11840 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11842 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11843 * linux-low.h (struct process_info_private): New member r_debug.
11844 * server.c (handle_qxfer_libraries): Call
11845 the_target->qxfer_libraries_svr4.
11846 (handle_qxfer_libraries_svr4): New function.
11847 (qxfer_packets): New entry "libraries-svr4".
11848 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11849 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11850 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11851 PACKET_qXfer_libraries_svr4.
11853 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11855 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11856 PSW address/mask between 8-byte and 16-byte formats.
11857 (s390_supply_ptrace_register): Likewise.
11858 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11859 basic addressing mode bit.
11861 2011-11-24 Stan Shebs <stan@codesourcery.com>
11863 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11865 2011-11-17 Stan Shebs <stan@codesourcery.com>
11867 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11868 (tracing_start_time): New global.
11869 (tracing_stop_time): New global.
11870 (tracing_user_name): New global.
11871 (tracing_notes): New global.
11872 (tracing_stop_note): New global.
11873 (cmd_qtstart): Set traceframe_usage, start_time.
11874 (stop_tracing): Set stop_time.
11875 (cmd_qtstatus): Report additional status.
11876 (cmd_qtp): New function.
11877 (handle_tracepoint_query): Call it.
11878 (cmd_qtnotes): New function.
11879 (handle_tracepoint_general_set): Call it.
11880 (get_timestamp): Rename from tsv_get_timestamp.
11882 2011-11-14 Stan Shebs <stan@codesourcery.com>
11883 Kwok Cheung Yeung <kcy@codesourcery.com>
11885 * linux-x86-low.c (small_jump_insn): New.
11886 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11887 trampoline and error message, build a trampoline and issue a small
11888 jump instruction to it.
11889 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11890 trampoline and error message.
11891 (x86_get_min_fast_tracepoint_insn_len): New.
11892 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11893 * linux-low.h (struct linux_target_ops): Add arguments to
11894 install_fast_tracepoint_jump_pad operation, add new operation.
11895 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11897 (linux_get_min_fast_tracepoint_insn_len): New function.
11898 (linux_target_op): Add new operation.
11899 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11900 (gdb_trampoline_buffer_end): Ditto.
11901 (gdb_trampoline_buffer_error): Ditto.
11902 (struct ipa_sym_addresses): Add fields for new IPA variables.
11903 (symbol_list): Add entries for new IPA variables.
11904 (struct tracepoint): Add fields to hold the address range of the
11905 trampoline used by the tracepoint.
11906 (trampoline_buffer_head): New static variable.
11907 (trampoline_buffer_tail): Ditto.
11908 (claim_trampoline_space): New function.
11909 (have_fast_tracepoint_trampoline_buffer): New function.
11910 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11912 (install_fast_tracepoint): Ditto, also add error buffer argument.
11913 (cmd_qtminftpilen): New function.
11914 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11915 (fast_tracepoint_from_trampoline_address): New function.
11916 (fast_tracepoint_collecting): Handle trampoline as part of jump
11918 (set_trampoline_buffer_space): New function.
11919 (initialize_tracepoint): Initialize new IPA variables.
11920 * target.h (struct target_ops): Add arguments to
11921 install_fast_tracepoint_jump_pad operation, add new
11922 get_min_fast_tracepoint_insn_len operation.
11923 (target_get_min_fast_tracepoint_insn_len): New.
11924 (install_fast_tracepoint_jump_pad): Add arguments.
11925 * server.h (IPA_BUFSIZ): Define.
11926 * linux-i386-ipa.c: Include extra header files.
11927 (initialize_fast_tracepoint_trampoline_buffer): New function.
11928 (initialize_low_tracepoint): Call it.
11929 * server.h (set_trampoline_buffer_space): Declare.
11930 (claim_trampoline_space): Ditto.
11931 (have_fast_tracepoint_trampoline_buffer): Ditto.
11933 2011-11-14 Yao Qi <yao@codesourcery.com>
11935 * server.c (handle_query): Handle InstallInTrace for qSupported.
11936 * tracepoint.c (add_tracepoint): Sort list.
11937 (install_tracepoint, download_tracepoint): New.
11938 (cmd_qtdp): Call them to install and download tracepoints.
11939 (sort_tracepoints): Removed.
11940 (cmd_qtstart): Update.
11942 2011-11-14 Yao Qi <yao@codesourcery.com>
11944 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11945 * mem-break.h: Declare.
11946 * tracepoint.c (cmd_qtstart): Move some code to ...
11947 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11949 (download_tracepoints): Move some code to ...
11950 (download_tracepoint_1): ... here. New.
11952 2011-11-08 Yao Qi <yao@codesourcery.com>
11954 * remote-utils.c (relocate_instruction): A comment fix.
11956 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11958 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11959 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11960 dr_status_mirror and dr_control_mirror from debug_reg_state.
11961 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11962 (i386_initial_stuff): Remove use of deleted globals.
11963 (i386_get_thread_context, i386_set_thread_context,
11964 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11965 from debug_reg_state.
11967 2011-11-05 Yao Qi <yao@codesourcery.com>
11969 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11970 address as TPOINT's.
11972 2011-11-02 Stan Shebs <stan@codesourcery.com>
11974 * tracepoint.c (agent_mem_read_string): New function.
11975 (eval_agent_expr): Call it for tracenz.
11976 * server.c (handle_query): Report support for tracenz.
11978 2011-11-02 Yao Qi <yao@codesourcery.com>
11980 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11982 2011-11-02 Yao Qi <yao@codesourcery.com>
11984 * target.h: Fix a typo in comment.
11986 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11988 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11989 clobber the breakpoints' shadows with fast tracepoint jumps.
11990 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11991 * target.c (write_inferior_memory): Also pass MYADDR down to
11994 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11996 * configure.ac: Check support for personality routine.
11997 * configure: Regenerate.
11998 * config.in: Likewise.
11999 * linux-low.c: Include <sys/personality.h>.
12000 Define ADDR_NO_RANDOMIZE if necessary.
12001 (linux_create_inferior): Disable address space randomization when
12002 forking inferior, if requested.
12003 (linux_supports_disable_randomization): New function.
12004 (linux_target_ops): Install it.
12005 * server.h (disable_randomization): Declare.
12006 * server.c (disable_randomization): New global variable.
12007 (handle_general_set): Handle QDisableRandomization.
12008 (handle_query): Likewise for qSupported.
12009 (main): Support --disable-randomization and --no-disable-randomization
12010 command line arguments.
12011 * target.h (struct target_ops): Add supports_disable_randomization.
12012 (target_supports_disable_randomization): New macro.
12014 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12016 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12018 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12019 [!PT_GETDSBT] (target_loadmap): New definition.
12020 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12021 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12022 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12023 and PT_GETDSBT to LINUX_LOADMAP.
12024 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12025 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12027 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12029 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12030 (arm_linux_hwbp_cap): New static variable.
12031 (arm_linux_get_hwbp_cap): Replace by ...
12032 (arm_linux_init_hwbp_cap): ... this new function.
12033 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12034 (arm_linux_get_hw_watchpoint_count): Likewise.
12035 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12036 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12037 (arm_prepare_to_resume): Use perror_with_name instead of error.
12039 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12041 * linux-arm-low.c: Include <signal.h>.
12042 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12043 (struct arm_linux_hwbp_cap): New data type.
12044 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12045 (struct arm_linux_hw_breakpoint): New data type.
12046 (MAX_BPTS, MAX_WPTS): Define.
12047 (struct arch_process_info, struct arch_lwp_info): New data types.
12048 (arm_linux_get_hwbp_cap): New function.
12049 (arm_linux_get_hw_breakpoint_count): Likewise.
12050 (arm_linux_get_hw_watchpoint_count): Likewise.
12051 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12052 (arm_hwbp_control_initialize): Likewise.
12053 (arm_hwbp_control_is_enabled): Likewise.
12054 (arm_hwbp_control_is_initialized): Likewise.
12055 (arm_hwbp_control_disable): Likewise.
12056 (arm_linux_hw_breakpoint_equal): Likewise.
12057 (arm_linux_hw_point_initialize): Likewise.
12058 (struct update_registers_data): New data structure.
12059 (update_registers_callback: New function.
12060 (arm_insert_point): Likewise.
12061 (arm_remove_point): Likewise.
12062 (arm_stopped_by_watchpoint): Likewise.
12063 (arm_stopped_data_address): Likewise.
12064 (arm_new_process): Likewise.
12065 (arm_new_thread): Likewise.
12066 (arm_prepare_to_resume): Likewise.
12067 (the_low_target): Register arm_insert_point, arm_remove_point,
12068 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12069 arm_new_thread, and arm_prepare_to_resume.
12071 2011-09-15 Stan Shebs <stan@codesourcery.com>
12073 * server.h (struct emit_ops): Add compare-goto fields.
12074 * tracepoint.c (gdb_agent_op_sizes): New table.
12075 (emit_eq_goto): New function.
12076 (emit_ne_goto): New function.
12077 (emit_lt_goto): New function.
12078 (emit_le_goto): New function.
12079 (emit_gt_goto): New function.
12080 (emit_ge_goto): New function.
12081 (is_goto_target): New function.
12082 (compile_bytecodes): Recognize special cases of compare-goto
12083 combinations and call specialized emitters for them.
12084 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12085 (amd64_emit_ne_goto): New function.
12086 (amd64_emit_lt_goto): New function.
12087 (amd64_emit_le_goto): New function.
12088 (amd64_emit_gt_goto): New function.
12089 (amd64_emit_ge_goto): New function.
12090 (amd64_emit_ops): Add the new functions.
12091 (i386_emit_eq_goto): New function.
12092 (i386_emit_ne_goto): New function.
12093 (i386_emit_lt_goto): New function.
12094 (i386_emit_le_goto): New function.
12095 (i386_emit_gt_goto): New function.
12096 (i386_emit_ge_goto): New function.
12097 (i386_emit_ops): Add the new functions.
12099 2011-09-08 Stan Shebs <stan@codesourcery.com>
12101 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12102 (i386_emit_epilogue): Restore %ebx.
12104 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12106 * server.c (step_thread): Remove definition.
12107 (process_serial_event): Don't handle Hs.
12108 * server.h (step_thread): Remove declaration.
12109 * target.c (set_desired_inferior): Remove use of step_thread.
12111 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12113 * linux-low.c: Include linux-procfs.h.
12114 (linux_attach_lwp_1): Update comments.
12115 (linux_attach): Scan for existing threads when attaching to a
12116 process that is the tgid.
12117 * Makefile.in: Update dependencies.
12119 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12121 * configure.srv: Add linux-procfs.o dependencies.
12123 2011-08-14 Yao Qi <yao@codesourcery.com>
12125 * target.h (struct target_ops): Fix indent.
12126 * win32-low.c (win32_target_ops): Fix comment.
12128 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12129 Yao Qi <yao@codesourcery.com>
12131 * Makefile.in (clean): Remove tic6x-*.c files.
12132 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12133 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12134 (tic6x-c64xp-linux.c): Likewise.
12135 * configure.srv: Add support for tic6x-*-uclinux.
12136 * linux-tic6x-low.c: New.
12137 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12139 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12140 Yao Qi <yao@codesourcery.com>
12142 * target.h (struct target_ops): Add read_loadmap.
12143 * linux-low.c (struct target_loadseg): New type.
12144 (struct target_loadmap): New type.
12145 (linux_read_loadmap): New function.
12146 (linux_target_ops): Add linux_read_loadmap.
12147 * server.c (handle_query): Support qXfer:fdpic:read packet.
12148 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12151 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12153 * win32-low.c: Include <stdint.h>.
12155 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12157 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12158 to the inferior here.
12159 (i386_remove_aligned_watchpoint): Ditto.
12160 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12161 fit part of the watchpoint in the debug registers.
12162 (i386_update_inferior_debug_regs): New.
12163 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12164 registers, and only update the inferior on success.
12165 (i386_low_remove_watchpoint): Ditto.
12167 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12169 * linux-low.c (compare_ints, unique, list_threads, show_process,
12170 linux_core_of_thread): Delete.
12171 (linux_target_ops): Change linux_core_of_thread to
12172 linux_common_core_of_thread.
12173 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12174 * utils.c (malloc_failure): Change type of argument.
12175 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12176 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12177 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12178 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12179 (IPA_OBJS): Add common-utils-ipa.o.
12180 (ptid_h, linux_osdata_h): New macros.
12181 (server_h): Add common/common-utils.h, common/xml-utils.h,
12182 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12184 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12185 ptid.o, buffer.o): New rules.
12186 (linux-low.o): Add common/linux-osdata.h as a dependency.
12187 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12188 * configure.ac: Add AC_HEADER_DIRENT check.
12189 * config.in: Regenerate.
12190 * configure: Regenerate.
12191 * remote-utils.c (xml_escape_text): Delete.
12192 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12193 buffer_xml_printf): Move to common/buffer.c.
12194 * server.c (main): Remove call to initialize_inferiors.
12195 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12196 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12197 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12198 internal_error, gdb_assert, gdb_assert_fail): Delete.
12199 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12200 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12202 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12203 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12204 initialize_inferiors): Delete.
12206 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12208 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12211 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12213 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12215 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12217 2011-05-26 Yao Qi <yao@codesourcery.com>
12219 * Makefile.in (thread-db.o): Track dependence to
12220 common/gdb_thread_db.h.
12221 * thread-db.c: include gdb_thread_db.h from right place.
12223 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12225 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12226 __FILE__ and __LINE__ to internal_error.
12228 2011-05-13 Doug Evans <dje@google.com>
12230 * thread-db.c (try_thread_db_load_from_sdir): New function.
12231 (try_thread_db_load_from_dir): New function.
12232 (thread_db_load_search): Handle $sdir, ignore $pdir.
12233 Remove trying of system directories if search of
12234 libthread-db-search-path fails, that is now done via $sdir.
12236 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12238 * server.c (handle_query): Add EnableDisableTracepoints to the list
12239 of supported features.
12240 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12242 (cmd_qtenable_disable): New.
12243 (cmd_qtstart): Install tracepoints even if disabled.
12244 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12245 receiving a QTEnable or QTDisable packet.
12246 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12247 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12249 (gdb_probe): Skip data collection if static tracepoint is disabled.
12251 2011-05-10 Doug Evans <dje@google.com>
12253 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12255 2011-05-04 Doug Evans <dje@google.com>
12257 * linux-low.c (linux_join): Skip process lookup.
12258 * spu-low.c (spu_join): Ditto.
12259 * server.c (join_inferiors_callback): Delete.
12260 (process_serial_event): For 'D' packet (detach) call join_inferior
12263 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12265 * README: Don't mention xscale*-*-linux*.
12266 * configure.srv (xscale*-*-linux*): Don't handle target.
12268 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12270 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12272 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12273 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12274 (i386_emit_void_call_2): Likewise.
12276 2011-04-26 Yao Qi <yao@codesourcery.com>
12278 * linux-low.c: Move common macros to linux-ptrace.h.
12279 Include linux-ptrace.h.
12280 * Makefile.in (linux_ptrace_h): New.
12281 (linux-low.o): Depends on linux-ptrace.h.
12283 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12285 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12286 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12287 (remote_prepare): New function with most of the TCP code from ...
12288 (remote_open): ... here. Detect PORT here unconditionally. Move also
12289 setting transport_is_reliable.
12290 * server.c (run_once): New variable.
12291 (gdbserver_usage): Document it.
12292 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12293 the first run if RUN_ONCE.
12294 * server.h (run_once, remote_prepare): New declarations.
12296 2011-04-19 Tom Tromey <tromey@redhat.com>
12298 * win32-low.c (handle_load_dll): Remove duplicate "the".
12300 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12302 Remove support for old Cygwin 1.5 versions.
12303 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12304 function to avoid warning.
12305 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12308 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12310 * gdbserver/server.h (Macro _): Define it if not available.
12312 2011-03-14 Michael Snyder <msnyder@vmware.com>
12314 * hostio.c (handle_close): Remove unnecessary null test.
12316 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12318 * Makefile.in (maintainer-clean realclean distclean): Remove
12319 "make ... subdir_do" command.
12321 2011-03-10 Michael Snyder <msnyder@vmware.com>
12323 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12325 * server.c (handle_v_run): Free alloced buffer on early return.
12327 2011-03-09 Yao Qi <yao@codesourcery.com>
12330 2011-03-04 Yao Qi <yao@codesourcery.com>
12332 * Makefile.in: Remove GNU make feature --directory.
12334 2011-03-05 Yao Qi <yao@codesourcery.com>
12336 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12337 (subdir_do): New make target. Copied from gdb/Makefile.
12338 (maintainer-clean, realclean, distclean, clean): Call corresponding
12339 make targets in common/Makefile.
12341 2011-02-11 Yao Qi <yao@codesourcery.com>
12343 * configure.ac: Call AC_PROG_RANLIB.
12344 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12345 * configure: Regenerate.
12347 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12349 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12351 2011-03-06 Yao Qi <yao@codesourcery.com>
12353 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12355 2011-03-05 Yao Qi <yao@codesourcery.com>
12357 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12358 (subdir_do): New make target. Copied from gdb/Makefile.
12359 (maintainer-clean, realclean, distclean, clean): Call corresponding
12360 make targets in common/Makefile.
12362 2011-03-04 Yao Qi <yao@codesourcery.com>
12364 * Makefile.in: Remove GNU make feature --directory.
12366 2011-03-04 Michael Snyder <msnyder@vmware.com>
12368 * server.c (queue_stop_reply): Call xmalloc not malloc.
12370 2011-03-02 Michael Snyder <msnyder@vmware.com>
12372 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12374 2011-02-28 Michael Snyder <msnyder@vmware.com>
12376 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12377 (cmd_qtframe): Ditto.
12378 (cmd_qtbuffer): Ditto.
12379 (cmd_bigqtbuffer): Ditto.
12381 * utils.c (decimal2str): Initialize 'width' to nine, then
12382 don't mess with it.
12384 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12386 * hostio.c (require_data): Free *data, not data.
12388 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12390 * hostio.c (require_data): Use free, not xfree.
12392 2011-02-27 Michael Snyder <msnyder@vmware.com>
12394 * server.c (handle_query): Discard unused value.
12396 * hostio.c (require_data): Free malloc memory before returning
12399 2011-02-26 Michael Snyder <msnyder@vmware.com>
12401 * linux-low.c (list_threads): Call closedir for dirent.
12403 2011-02-27 Michael Snyder <msnyder@vmware.com>
12405 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12406 a case statement falls through.
12408 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12410 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12413 2011-02-26 Michael Snyder <msnyder@vmware.com>
12415 * utils.c (decimal2str): Eliminate dead code and dead param.
12416 (pulongest): Drop dead param from call to decimal2str.
12419 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12421 Revert the following patch (not approved yet):
12422 2011-02-21 Hui Zhu <teawater@gmail.com>
12423 * tracepoint.c (tp_printf): New function.
12424 (eval_agent_expr): Handle gdb_agent_op_printf.
12426 2011-02-21 Hui Zhu <teawater@gmail.com>
12428 * tracepoint.c (tp_printf): New function.
12429 (eval_agent_expr): Handle gdb_agent_op_printf.
12431 2011-02-18 Tom Tromey <tromey@redhat.com>
12433 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12434 (tracepoint.o): Likewise.
12435 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12436 (gdb_agent_op_names): Likewise.
12438 2011-02-18 Tom Tromey <tromey@redhat.com>
12440 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12441 gdb_agent_op_rot>: New constants.
12442 (gdb_agent_op_names): Add pick and roll.
12443 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12446 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12448 * aclocal.m4: Regenerated with aclocal-1.11.1.
12450 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12452 * server.c (handle_qxfer_traceframe_info): New.
12453 (qxfer_packets): Register "traceframe-info".
12454 (handle_query): Report support for qXfer:traceframe-info:read+.
12455 * tracepoint.c (match_blocktype): New.
12456 (traceframe_find_block_type): Rename to ...
12457 (traceframe_walk_blocks): ... this. Add callback filter argument,
12459 (traceframe_find_block_type): New, reimplemented on top of
12460 traceframe_walk_blocks.
12461 (build_traceframe_info_xml): New.
12462 (traceframe_read_info): New.
12463 * server.h (traceframe_read_info): Declare.
12465 2011-02-11 Yao Qi <yao@codesourcery.com>
12467 * configure.ac: Call AC_PROG_RANLIB.
12468 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12469 * configure: Regenerate.
12471 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12473 * server.c (gdb_read_memory): Change return semantics to allow
12475 (handle_search_memory_1): Adjust.
12476 (process_serial_event) <'m' packet>: Handle partial transfers.
12477 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12479 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12481 * regcache.c (init_register_cache): Initialize
12482 regcache->register_status.
12483 (free_register_cache): Release regcache->register_status.
12484 (regcache_cpy): Copy register_status.
12485 (registers_to_string): Print 'x's for unavailable registers.
12486 (supply_register): Mark the register's status valid or
12487 unavailable, depending on whether a buffer was passed in or not.
12488 (supply_register_zeroed): New.
12489 (supply_regblock): Mark the registers' status valid or
12490 unavailable, depending on whether a buffer was passed in or not.
12491 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12492 (struct regcache): New `register_status' field.
12493 (supply_register_zeroed): Declare.
12494 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12495 supply_register_zeroed, rather than passing a NULL buffer to
12497 * tracepoint.c (fetch_traceframe_registers): Update comment.
12499 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12501 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12504 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12506 * server.h (decode_xfer_write): Change prototype.
12507 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12508 and don't extract the annex here.
12509 * server.c (decode_xfer_read): Remove `annex' parameter,
12510 and don't extract the annex here.
12511 (decode_xfer): New.
12512 (struct qxfer): New.
12513 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12514 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12515 (handle_qxfer_statictrace): New functions, abstracted out from
12516 handle_query, and made to use the struct qxfer interface.
12517 (handle_threads_qxfer_proper): Rename to ...
12518 (handle_qxfer_threads_proper): ... this.
12519 (handle_threads_qxfer): Rename to ...
12520 (handle_qxfer_threads): ... this. Adjust.
12521 (qxfer_packets): New array.
12522 (handle_qxfer): New function.
12523 (handle_query): Use handle_qxfer.
12525 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12527 * gdbreplay.c: Shorten lines of >= 80 columns.
12528 * linux-low.c: Ditto.
12529 * linux-ppc-low.c: Ditto.
12530 * linux-s390-low.c: Ditto.
12531 * linux-sparc-low.c: Ditto.
12532 * linux-x86-low.c: Ditto.
12533 * linux-xtensa-low.c: Ditto.
12534 * mem-break.c: Ditto.
12535 * nto-low.c: Ditto.
12536 * regcache.h: Ditto.
12537 * remote-utils.c: Ditto.
12540 * thread-db.c: Ditto.
12541 * tracepoint.c: Ditto.
12543 * win32-low.h: Ditto.
12545 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12547 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12550 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12552 * server.c (gdbserver_version): Update copyright year in version
12554 * gdbreplay.c (gdbreplay_version): Ditto.
12556 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12558 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12559 * linux-bfin-low.c: New file.
12560 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12561 PT_DATA_ADDR for BFIN targets.
12562 * Makefile.in (SFILES): Add linux-bfin-low.c.
12563 (clean): Remove reg-bfin.c.
12564 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12565 * README: Mention supported Blackfin targets.
12567 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12569 * .gitignore: New file.
12571 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12573 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12575 2010-10-22 Jie Zhang <jie@codesourcery.com>
12577 * Makefile.in: Add FLAGS_TO_PASS variable.
12578 (install): Remove dependency of install-only and recursively
12579 invoke make for install-only.
12581 2010-10-04 Doug Evans <dje@google.com>
12583 * Makefile.in (uninstall): Use $(DESTDIR).
12585 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12589 * linux-x86-low.c (compat_siginfo_from_siginfo)
12590 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12591 si_code is < 0. Check for si_code == SI_TIMER before checking for
12594 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12596 * lynx-i386-low.c: New file.
12597 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12599 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12601 * lynx-low.c (ptrace_request_to_str): Remove handling for
12602 request values that have been removed in LynxOS 5.x.
12604 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12606 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12609 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12611 * configure.ac: Add --enable-inprocess-agent option.
12612 * configure: Rebuilt.
12614 2010-09-06 Yao Qi <yao@codesourcery.com>
12616 * linux-low.c (linux_kill): Remove unused variable.
12617 (linux_stabilize_threads): Likewise.
12618 * server.c (start_inferior): Likewise.
12619 (queue_stop_reply_callback): Likewise.
12620 * tracepoint.c (do_action_at_tracepoint): Likewise.
12622 2010-09-06 Yao Qi <yao@codesourcery.com>
12624 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12627 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12629 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12631 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12633 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12636 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12638 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12639 gdbserver/lynx-ppc-low.c: New files.
12640 * Makefile.in (lynx_low_h): New variable.
12641 (lynx-low.o, lynx-ppc-low.o): New rules.
12642 * configure.ac: On LynxOS, link with -lnetinet.
12643 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12644 * configure: regenerate.
12646 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12648 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12649 * configure.ac: Add check for vasprintf and vsnprintf.
12650 * configure, config.in: Regenerate.
12651 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12653 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12655 * gdbreplay.c: Move include of alloca.h up, next to include of
12657 * server.h: Add include of malloc.h.
12658 * mem-break.c: Remove include of malloc.h.
12659 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12663 * Makefile.in (memmem.o): Build with -Wno-error.
12665 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12667 * utils.c (xsnprintf): Make non-static.
12668 * server.h: Add xsnprintf declaration.
12669 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12670 replace calls to snprintf by calls to xsnprintf throughout.
12672 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12674 * configure.ac: Add configure check for alloca.
12675 * configure, config.in: Regenerate.
12676 * server.h: Include alloca.h if it exists.
12677 * gdbreplay.c: Include alloca.h if it exists.
12679 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12681 * linux-low.c (__SIGRTMIN): Define if not already defined.
12682 (linux_create_inferior): Check for __ANDROID__ rather than
12684 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12685 are already deferred.
12686 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12687 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12688 stopped and already has a pending signal to report.
12689 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12690 a pending signal to report or is moving out of a jump pad.
12691 (linux_init_signals): Check for __ANDROID__ rather than
12694 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12696 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12697 debug_threads check. Avoid a linear search when not doing debug
12700 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12702 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12703 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12704 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12705 (process_event): Change local fd's type to gdb_fildes_t.
12706 (create_file_handler): Adjust prototype.
12707 (delete_file_handler): Adjust prototype.
12708 (handle_file_event): Adjust prototype. Use pfildes.
12709 (create_file_event): Adjsut prototype.
12710 * remote-utils.c (remote_desc, listen_desc): Change type to
12712 * server.h: New gdb_fildes_t typedef.
12713 [USE_WIN32API]: Include winsock2.h.
12714 (delete_file_handler, add_file_handler): Adjust prototypes.
12715 (pfildes): Declare.
12716 * utils.c (pfildes): New.
12718 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12720 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12721 * configure: Regenerate.
12723 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12725 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12726 (linux_done_accessing_memory): ... this.
12727 (linux_target_ops): Adjust.
12728 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12729 * nto-low.c (nto_target_ops): Adjust comment.
12730 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12731 * spu-low.c (spu_target_ops): Adjust comment.
12732 * target.h (target_ops): Rename unprepare_to_access_memory field
12733 to done_accessing_memory.
12734 (unprepare_to_access_memory): Rename to ...
12735 (done_accessing_memory): ... this.
12737 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12739 * linux-low.c (linux_prepare_to_access_memory): New.
12740 (linux_unprepare_to_access_memory): New.
12741 (linux_target_ops): Install them.
12742 * server.c (read_memory): Rename to ...
12743 (gdb_read_memory): ... this. Use
12744 prepare_to_access_memory/prepare_to_access_memory.
12745 (write_memory): Rename to ...
12746 (gdb_write_memory): ... this. Use
12747 prepare_to_access_memory/prepare_to_access_memory.
12748 (handle_search_memory_1): Adjust.
12749 (process_serial_event): Adjust.
12750 * target.h (struct target_ops): New fields
12751 prepare_to_access_memory and unprepare_to_access_memory.
12752 (prepare_to_access_memory, unprepare_to_access_memory): New.
12753 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12754 prepare_to_access_memory/prepare_to_access_memory.
12755 * nto-low.c (nto_target_ops): Adjust.
12756 * spu-low.c (spu_target_ops): Adjust.
12757 * win32-low.c (win32_target_ops): Adjust.
12759 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12761 * Makefile.in (WARN_CFLAGS): Get it from configure.
12762 (WERROR_CFLAGS): New.
12763 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12764 * configure.ac: Introduce --enable-werror, which adds -Werror to
12765 the compiler command line. Enabled by default. Disable with
12766 --disable-werror. Add -Wdeclaration-after-statement
12767 Wpointer-arith and -Wformat-nonliteral to warning flags.
12768 * configure: Regenerate.
12770 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12772 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12774 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12776 * gdbreplay.c (remote_error): New.
12778 (expect): Use gdbchar. Check for error reading from GDB.
12779 Clarify sync error output.
12780 (play): Check for errors writing to GDB.
12781 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12782 * remote-utils.c (getpkt): Check for errors writing to the remote
12785 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12787 * linux-low.c (linux_wait_1): Move non-debugging code out of
12788 `debug_threads' control.
12790 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12792 * linux-low.c (linux_wait_1): Don't set last_status here.
12793 * server.c (push_event, queue_stop_reply_callback): Assert we're
12794 not pushing a TARGET_WAITKIND_IGNORE event.
12795 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12796 (myresume, handle_target_event): Set the thread's last_resume_kind
12797 and last_status from the target returned status.
12799 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12803 * linux-x86-low.c (update_debug_registers_callback): New.
12804 (i386_dr_low_set_addr): Use it.
12805 (i386_dr_low_get_addr): New.
12806 (i386_dr_low_set_control): Use update_debug_registers_callback.
12807 (i386_dr_low_get_control): New.
12808 (i386_dr_low_get_status): Adjust.
12809 * linux-low.c (linux_stop_lwp): New.
12810 * linux-low.h (linux_stop_lwp): Declare.
12812 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12813 argument instead of a i386_debug_reg_state.
12814 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12815 a i386_debug_reg_state.
12816 (i386_insert_aligned_watchpoint): Adjust.
12817 (i386_remove_aligned_watchpoint): Adjust.
12818 (i386_low_stopped_data_address): Read the debug registers from the
12819 inferior instead of from the mirrors.
12820 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12821 (i386_dr_low_get_addr): Declare.
12822 (i386_dr_low_get_control): Declare.
12823 (i386_dr_low_get_status): Change prototype.
12825 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12826 (i386_dr_low_get_addr): New.
12827 (i386_dr_low_get_control): New.
12828 (i386_dr_low_get_status): Adjust prototype. Return
12830 (i386_initial_stuff): Clear dr_status_mirror and
12832 (i386_get_thread_context): Adjust.
12833 (i386_set_thread_context): Adjust.
12834 (i386_thread_added): Adjust.
12836 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12838 * linux-low.h (linux_thread_area): Delete declaration.
12840 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12842 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12843 after its termination.
12845 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12847 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12848 (gdb_wants_all_stopped): Delete.
12849 (linux_wait_1): Don't call them.
12850 * server.c (handle_v_cont): Tag all threads as want-stopped.
12851 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12852 stopped as "client-wants-stopped".
12854 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12856 * Makefile.in (signals_h): New.
12857 (server_h): Depend on it.
12858 (server.o): Don't depend on $(signals_def).
12859 (signals.o): Depend on $(signals_def).
12861 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12863 * Makefile.in (signals_def): New.
12864 (server_h): Append include/gdb/signals.h and signals_def.
12865 (server.o): Append signals_def.
12867 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12869 * server.c (handle_target_event): Use target_signal_to_host for
12870 resume_info.sig initialization.
12871 * target.h (struct thread_resume) <sig>: New comment.
12873 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12875 * server.c (handle_query): strcpy() the returned string from paddress()
12876 instead of sprintf().
12877 * utils.c (paddress): Return phex_nz().
12879 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12881 * server.c (handle_v_cont): Call mourn_inferior if process
12883 (myresume): Likewise.
12885 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12887 Static tracepoints, and integration with UST.
12889 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12890 * mem-break.c (uninsert_all_breakpoints)
12891 (reinsert_all_breakpoints): New.
12892 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12893 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12894 (gdb_agent_ust_loaded, helper_thread_id)
12895 (gdb_agent_helper_thread_id): New macros.
12896 (struct ipa_sym_addresses): Add addr_ust_loaded,
12897 addr_helper_thread_id, addr_cmd_buf.
12898 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12899 (in_process_agent_loaded_ust): New.
12900 (write_e_ust_not_loaded): New.
12901 (maybe_write_ipa_ust_not_loaded): New.
12902 (struct collect_static_trace_data_action): New.
12903 (enum tracepoint_type) <static_tracepoint>: New.
12904 (struct tracepoint) <handle>: Mention static tracepoints.
12905 (struct static_tracepoint_ctx): New.
12906 (CMD_BUF_SIZE): New.
12907 (add_tracepoint_action): Handle static tracepoint actions.
12908 (unprobe_marker_at): New.
12909 (clear_installed_tracepoints): Handle static tracepoints.
12910 (cmd_qtdp): Handle static tracepoints.
12911 (probe_marker_at): New.
12912 (cmd_qtstart): Handle static tracepoints.
12913 (response_tracepoint): Handle static tracepoints.
12914 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12915 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12916 (get_context_regcache): Handle static tracepoints.
12917 (do_action_at_tracepoint): Handle static tracepoint actions.
12918 (traceframe_find_block_type): Handle static trace data blocks.
12919 (traceframe_read_sdata): New.
12920 (download_tracepoints): Download static tracepoint actions.
12921 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12922 (GDB_PROBE_NAME): New.
12924 (GET_UST_SYM): New.
12927 (ust_marker_to_static_tracepoint): New.
12929 (collect_ust_data_at_tracepoint): New.
12930 (gdb_ust_probe): New.
12931 (UNIX_PATH_MAX, SOCK_DIR): New.
12932 (gdb_ust_connect_sync_socket): New.
12933 (resume_thread, stop_thread): New.
12934 (run_inferior_command): New.
12935 (init_named_socket): New.
12936 (gdb_ust_socket_init): New.
12937 (cstr_to_hexstr): New.
12939 (first_marker, next_marker): New.
12940 (response_ust_marker): New.
12941 (cmd_qtfstm, cmd_qtsstm): New.
12942 (unprobe_marker_at, probe_marker_at): New.
12943 (cmd_qtstmat, gdb_ust_thread): New.
12944 (gdb_ust_init): New.
12945 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12946 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12947 (ST_REGENTRY): New.
12948 (x86_64_st_collect_regmap): New.
12949 (X86_64_NUM_ST_COLLECT_GREGS): New.
12950 (AMD64_RIP_REGNUM): New.
12951 (supply_static_tracepoint_registers): New.
12952 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12953 (ST_REGENTRY): New.
12954 (i386_st_collect_regmap): New.
12955 (i386_NUM_ST_COLLECT_GREGS): New.
12956 (supply_static_tracepoint_registers): New.
12957 * server.c (handle_query): Handle qXfer:statictrace:read.
12958 <qSupported>: Report support for StaticTracepoints, and
12959 qXfer:statictrace:read features.
12960 * server.h (traceframe_read_sdata)
12961 (supply_static_tracepoint_registers): Declare.
12962 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12963 (unpack_varlen_hex): Include in IPA build.
12964 * Makefile.in (ustlibs, ustinc): New.
12965 (IPA_OBJS): Add remote-utils-ipa.o.
12966 ($(IPA_LIB)): Link -ldl and -lpthread.
12968 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12969 * config.in, configure: Regenerate.
12971 2010-06-20 Ian Lance Taylor <iant@google.com>
12972 Pedro Alves <pedro@codesourcery.com>
12974 * linux-x86-low.c (always_true): Delete.
12975 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12976 trying to fool the compiler with always_true.
12978 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12980 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12981 conditions in gdbserver.
12983 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12985 * spu-low.c (spu_read_memory): Wrap around local store limit.
12986 (spu_write_memory): Likewise.
12988 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12990 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12991 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12993 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12995 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12996 uses with LONGEST uses.
12998 2010-06-14 Stan Shebs <stan@codesourcery.com>
12999 Pedro Alves <pedro@codesourcery.com>
13003 * linux-x86-low.c: Include limits.h.
13005 (always_true): New.
13008 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13009 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13010 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13011 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13012 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13013 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13014 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13015 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13016 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13017 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13018 (amd64_emit_void_call_2): New.
13019 (amd64_emit_ops): New.
13020 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13021 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13022 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13023 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13024 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13025 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13026 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13027 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13028 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13029 (i386_emit_stack_adjust, i386_emit_int_call_1)
13030 (i386_emit_void_call_2): New.
13031 (i386_emit_ops): New.
13032 (x86_emit_ops): New.
13033 (the_low_target): Install x86_emit_ops.
13034 * server.h (struct emit_ops): New.
13035 (get_raw_reg_func_addr): Declare.
13036 (current_insn_ptr, emit_error): Declare.
13037 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13038 (set_trace_state_variable_value): New defines.
13039 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13040 addr_get_trace_state_variable_value and
13041 addr_set_trace_state_variable_value.
13042 (symbol_list): New fields for get_raw_reg,
13043 get_trace_state_variable_value and set_trace_state_variable_value.
13044 (condfn): New typedef.
13045 (struct tracepoint): New field `compiled_cond'.
13046 (do_action_at_tracepoint): Clear compiled_cond.
13047 (get_trace_state_variable_value, set_trace_state_variable_value):
13049 (condition_true_at_tracepoint): If there's a compiled condition,
13051 (current_insn_ptr, emit_error): New globals.
13052 (struct bytecode_address): New.
13053 (get_raw_reg_func_addr): New.
13054 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13055 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13056 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13057 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13058 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13059 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13060 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13061 (compile_tracepoint_condition, compile_bytecodes): New.
13062 * target.h (emit_ops): Forward declare.
13063 (struct target_ops): New field emit_ops.
13064 (target_emit_ops): New.
13065 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13066 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13067 * linux-low.c (linux_emit_ops): New.
13068 (linux_target_ops): Install it.
13069 * linux-low.h (struct linux_target_ops): New field emit_ops.
13071 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13073 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13074 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13076 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13077 Stan Shebs <stan@codesourcery.com>
13079 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13080 (all): Depend on $(extra_libraries).
13081 (install-only): Install the IPA.
13082 (IPA_OBJS, IPA_LIB): New.
13083 (clean): Remove the IPA lib.
13084 (IPAGENT_CFLAGS): New.
13085 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13086 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13087 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13088 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13089 * configure.ac: Check for atomic builtins support in the compiler.
13090 (IPA_DEPFILES, extra_libraries): Define.
13091 * configure.srv (ipa_obj): Add description.
13092 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13093 (i[34567]86-*-linux*): Set ipa_obj.
13094 (x86_64-*-linux*): Set ipa_obj.
13095 * linux-low.c (stabilizing_threads): New.
13096 (supports_fast_tracepoints): New.
13097 (linux_detach): Stabilize threads before detaching.
13098 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13099 the lwp is either not stabilizing, or is moving out of a jump pad.
13100 (linux_fast_tracepoint_collecting): New.
13101 (maybe_move_out_of_jump_pad): New.
13102 (enqueue_one_deferred_signal): New.
13103 (dequeue_one_deferred_signal): New.
13104 (linux_wait_for_event_1): If moving out of a jump pad, defer
13105 pending signals to later.
13106 (linux_stabilize_threads): New.
13107 (linux_wait_1): Check if threads need moving out of jump pads, and
13109 (stuck_in_jump_pad_callback): New.
13110 (move_out_of_jump_pad_callback): New.
13111 (lwp_running): New.
13112 (linux_resume_one_lwp): Handle moving out of jump pads.
13113 (linux_set_resume_request): Dequeue deferred signals.
13114 (need_step_over_p): Also step over fast tracepoint jumps.
13115 (start_step_over): Also uninsert fast tracepoint jumps.
13116 (finish_step_over): Also reinsert fast tracepoint jumps.
13117 (linux_install_fast_tracepoint_jump): New.
13118 (linux_target_ops): Install linux_stabilize_threads and
13119 linux_install_fast_tracepoint_jump_pad.
13120 * linux-low.h (linux_target_ops) <get_thread_area,
13121 install_fast_tracepoint_jump_pad>: New fields.
13122 (struct lwp_info) <collecting_fast_tracepoint,
13123 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13124 (linux_get_thread_area): Declare.
13125 * linux-x86-low.c (jump_insn): New.
13126 (x86_get_thread_area): New.
13127 (append_insns): New.
13128 (push_opcode): New.
13129 (amd64_install_fast_tracepoint_jump_pad): New.
13130 (i386_install_fast_tracepoint_jump_pad): New.
13131 (x86_install_fast_tracepoint_jump_pad): New.
13132 (the_low_target): Install x86_get_thread_area and
13133 x86_install_fast_tracepoint_jump_pad.
13134 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13135 (struct fast_tracepoint_jump): New.
13136 (fast_tracepoint_jump_insn): New.
13137 (fast_tracepoint_jump_shadow): New.
13138 (find_fast_tracepoint_jump_at): New.
13139 (fast_tracepoint_jump_here): New.
13140 (delete_fast_tracepoint_jump): New.
13141 (set_fast_tracepoint_jump): New.
13142 (uninsert_fast_tracepoint_jumps_at): New.
13143 (reinsert_fast_tracepoint_jumps_at): New.
13144 (set_breakpoint_at): Use write_inferior_memory.
13145 (uninsert_raw_breakpoint): Use write_inferior_memory.
13146 (check_mem_read): Mask out fast tracepoint jumps.
13147 (check_mem_write): Mask out fast tracepoint jumps.
13148 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13149 (set_fast_tracepoint_jump): Declare.
13150 (delete_fast_tracepoint_jump)
13151 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13152 (reinsert_fast_tracepoint_jumps_at): Declare.
13153 * regcache.c: Don't compile many functions when building the
13154 in-process agent library.
13155 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13156 the register buffer in the heap.
13157 (free_register_cache): If the register buffer isn't owned by the
13158 regcache, don't free it.
13159 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13160 pre-existing register caches.
13161 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13163 (convert_ascii_to_int): : Constify `from' parameter type.
13164 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13165 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13166 the needed buffer in-place.
13167 (relocate_instruction): New.
13168 * server.c (handle_query) <qSymbols>: If the target supports
13169 tracepoints, give it a chance of looking up symbols. Report
13170 support for fast tracepoints.
13171 (handle_status): Stabilize threads.
13172 (process_serial_event): Adjust.
13173 * server.h (struct fast_tracepoint_jump): Forward declare.
13174 (struct process_info) <fast_tracepoint_jumps>: New field.
13175 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13176 (decode_X_packet, decode_M_packet): Adjust.
13177 (relocate_instruction): Declare.
13178 (in_process_agent_loaded): Declare.
13179 (tracepoint_look_up_symbols): Declare.
13180 (struct fast_tpoint_collect_status): Declare.
13181 (fast_tracepoint_collecting): Declare.
13182 (force_unlock_trace_buffer): Declare.
13183 (handle_tracepoint_bkpts): Declare.
13184 (initialize_low_tracepoint)
13185 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13186 * target.h (struct target_ops) <stabilize_threads,
13187 install_fast_tracepoint_jump_pad>: New fields.
13188 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13189 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13190 [HAVE_STDINT_H]: Include stdint.h.
13191 (trace_debug_1): Rename to ...
13192 (trace_vdebug): ... this.
13193 (trace_debug): Rename to ...
13194 (trace_debug_1): ... this. Add `level' parameter.
13195 (trace_debug): New.
13196 (ATTR_USED, ATTR_NOINLINE): New.
13197 (IP_AGENT_EXPORT): New.
13198 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13199 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13200 (about_to_request_buffer_space, trace_buffer_is_full)
13201 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13202 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13203 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13204 (traceframe_write_count, traceframes_created)
13205 (trace_state_variables)
13206 New renaming defines.
13207 (struct ipa_sym_addresses): New.
13208 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13209 (symbol_list): New.
13210 (ipa_sym_addrs): New.
13211 (all_tracepoint_symbols_looked_up): New.
13212 (in_process_agent_loaded): New.
13213 (write_e_ipa_not_loaded): New.
13214 (maybe_write_ipa_not_loaded): New.
13215 (tracepoint_look_up_symbols): New.
13216 (debug_threads) [IN_PROCESS_AGENT]: New.
13217 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13218 (UNKNOWN_SIDE_EFFECTS): New.
13219 (stop_tracing): New.
13220 (flush_trace_buffer): New.
13221 (stop_tracing_bkpt): New.
13222 (flush_trace_buffer_bkpt): New.
13223 (read_inferior_integer): New.
13224 (read_inferior_uinteger): New.
13225 (read_inferior_data_pointer): New.
13226 (write_inferior_data_pointer): New.
13227 (write_inferior_integer): New.
13228 (write_inferior_uinteger): New.
13229 (struct collect_static_trace_data_action): Delete.
13230 (enum tracepoint_type): New.
13231 (struct tracepoint) <type>: New field `type'.
13232 <actions_str, step_actions, step_actions_str>: Only include in
13234 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13235 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13236 (tracepoints): Use IP_AGENT_EXPORT.
13237 (last_tracepoint): Don't include in the IPA.
13238 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13239 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13240 (alloced_trace_state_variables): New.
13241 (trace_state_variables): Use IP_AGENT_EXPORT.
13242 (traceframe_t): Delete unused variable.
13243 (circular_trace_buffer): Don't include in the IPA.
13244 (trace_buffer_start): Delete.
13245 (struct trace_buffer_control): New.
13246 (trace_buffer_free): Delete.
13247 (struct ipa_trace_buffer_control): New.
13248 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13249 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13251 (trace_buffer_ctrl): New.
13252 (TRACE_BUFFER_CTRL_CURR): New.
13253 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13254 Reimplement as macros.
13255 (trace_buffer_wrap): Delete.
13256 (traceframe_write_count, traceframe_read_count)
13257 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13258 (struct tracepoint_hit_ctx) <type>: New field.
13259 (struct fast_tracepoint_ctx): New.
13260 (memory_barrier): New.
13262 (record_tracepoint_error): Update atomically in the IPA.
13263 (clear_inferior_trace_buffer): New.
13264 (about_to_request_buffer_space): New.
13265 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13266 updating the same buffer.
13267 (add_tracepoint): Default the tracepoint's type to trap
13268 tracepoint, and orig_size to -1.
13269 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13270 internal variables.
13271 (create_trace_state_variable): New parameter `gdb'. Handle it.
13272 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13273 (cmd_qtdp): Handle fast tracepoints.
13274 (cmd_qtdv): Adjust.
13275 (max_jump_pad_size): New.
13276 (gdb_jump_pad_head): New.
13277 (get_jump_space_head): New.
13278 (claim_jump_space): New.
13279 (sort_tracepoints): New.
13280 (MAX_JUMP_SIZE): New.
13281 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13283 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13284 support. Upload fast traceframes, and delete internal IPA
13286 (stop_tracing_handler): New.
13287 (flush_trace_buffer_handler): New.
13288 (cmd_qtstop): Upload fast tracepoints.
13289 (response_tracepoint): Handle fast tracepoints.
13290 (tracepoint_finished_step): Upload fast traceframes. Set the
13291 tracepoint hit context's tracepoint type.
13292 (handle_tracepoint_bkpts): New.
13293 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13294 type. Add comment about fast tracepoints.
13295 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13296 non-existing action_str field.
13297 (get_context_regcache): Handle fast tracepoints.
13298 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13300 (fast_tracepoint_from_jump_pad_address): New.
13301 (fast_tracepoint_from_ipa_tpoint_address): New.
13302 (collecting_t): New.
13303 (force_unlock_trace_buffer): New.
13304 (fast_tracepoint_collecting): New.
13306 (gdb_collect): New.
13307 (write_inferior_data_ptr): New.
13308 (target_tp_heap): New.
13309 (target_malloc): New.
13310 (download_agent_expr): New.
13312 (download_tracepoints): New.
13313 (download_trace_state_variables): New.
13314 (upload_fast_traceframes): New.
13315 (IPA_FIRST_TRACEFRAME): New.
13316 (IPA_NEXT_TRACEFRAME_1): New.
13317 (IPA_NEXT_TRACEFRAME): New.
13318 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13319 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13320 (gdb_jump_pad_buffer_end): New.
13321 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13322 (initialize_tracepoint): Adjust.
13323 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13324 buffer. Initialize the low module.
13325 * utils.c (PREFIX, TOOLNAME): New.
13326 (malloc_failure): Use PREFIX.
13327 (error): In the IPA, an error causes an exit.
13328 (fatal, warning): Use PREFIX.
13329 (internal_error): Use TOOLNAME.
13330 (NUMCELLS): Increase to 10.
13331 * configure, config.in: Regenerate.
13333 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13335 * server.c (handle_query) <qSupported>: Do two passes over the
13336 qSupported string to avoid nesting strtok.
13338 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13340 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13342 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13343 -Wl,--dynamic-list.
13344 * configure: Regenerate.
13345 * proc-service.list: New.
13347 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13349 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13352 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13354 * gdbreplay.c (remote_open): Check error return from socket() call by
13355 its equality to -1 not by it being negative.
13356 * remote-utils.c (remote_open): Likewise.
13358 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13360 * config.h: Regenerate.
13362 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13364 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13365 doesn't provide PTRACE_GET_THREAD_AREA.
13367 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13369 * linux-m68k-low.c: Include <asm/ptrace.h>
13370 (ps_get_thread_area): Implement.
13372 2010-05-03 Doug Evans <dje@google.com>
13374 * event-loop.c (struct callback_event): New struct.
13375 (callback_list): New global.
13376 (append_callback_event, delete_callback_event): New functions.
13377 (process_callback): New function.
13378 (start_event_loop): Call it.
13379 * remote-utils.c (NOT_SCHEDULED): Define.
13380 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13381 moved out of readchar.
13382 (readchar): Rewrite. Call reschedule before returning.
13383 (reset_readchar): New function.
13384 (remote_close): Call it.
13385 (process_remaining, reschedule): New functions.
13386 * server.h (callback_handler_func): New typedef.
13387 (append_callback_event, delete_callback_event): Declare.
13389 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13391 * proc-service.c (ps_pglobal_lookup): Use
13392 thread_db_look_up_one_symbol.
13393 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13394 parameter. Use it instead of all_symbols_looked_up.
13395 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13397 (all_symbols_looked_up): Don't declare.
13398 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13399 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13401 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13402 Set all_symbols_looked_up here.
13403 (thread_db_look_up_one_symbol): New.
13404 (thread_db_get_tls_address): Adjust.
13405 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13406 thread_db object on the heap, and tentatively set it in the
13408 (thread_db_init): Don't set all_symbols_looked_up here.
13409 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13411 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13413 * linux-low.c (linux_kill, linux_detach): Adjust.
13414 (status_pending_p_callback): Remove redundant statement. Check
13415 for !TARGET_WAITIKIND_IGNORE, instead of
13416 TARGET_WAITKIND_STOPPED.
13417 (handle_tracepoints): Make sure LWP is locked. Adjust.
13418 (linux_wait_for_event_1): Adjust.
13419 (linux_cancel_breakpoints): New.
13420 (unsuspend_one_lwp): New.
13421 (unsuspend_all_lwps): New.
13422 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13423 (send_sigstop_callback): Change return type to int, add new
13424 `except' parameter and handle it.
13425 (suspend_and_send_sigstop_callback): New.
13426 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13427 pass them down. If SUSPEND, also increment the lwp's suspend
13429 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13430 (need_step_over_p): Don't consider suspended LWPs.
13431 (start_step_over): Adjust.
13432 (proceed_one_lwp): Change return type to int, add new `except'
13433 parameter and handle it.
13434 (unsuspend_and_proceed_one_lwp): New.
13435 (proceed_all_lwps): Use find_inferior instead of
13437 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13438 also decrement the suspend count of LWPs. Pass `except' down,
13439 instead of hacking its suspend count.
13440 (linux_pause_all): Add `freeze' parameter. Adjust.
13441 (linux_unpause_all): New.
13442 (linux_target_ops): Install linux_unpause_all.
13443 * server.c (handle_status): Adjust.
13444 * target.h (struct target_ops): New fields `unpause_all' and
13445 `cancel_breakpoints'. Add new parameter to `pause_all'.
13446 (pause_all): Add new `freeze' parameter.
13447 (unpause_all): New.
13448 (cancel_breakpoints): New.
13449 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13450 cancel breakpoints.
13451 (cmd_qtstart): Pause threads.
13452 (stop_tracing): Pause threads, and cancel breakpoints.
13453 * win32-low.c (win32_target_ops): Adjust.
13455 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13457 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13458 the inferior right away from here...
13459 (linux_wait_1): ... to here, and adjust to check the thread's
13460 last_resume_kind instead of the lwp's step or stop_expected flags.
13462 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13464 * README: Use consistent `GDB' and `GDBserver' spellings.
13466 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13468 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13469 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13470 (linux_detach_one_lwp): Assume the lwp is stopped.
13471 (any_thread_of): Delete.
13472 (linux_detach): Stop all lwps here. Don't blindly delete all
13474 (delete_lwp_callback): New.
13475 (linux_mourn): Delete all lwps of the process that is gone.
13476 (linux_wait_1): Don't delete the last lwp of the process here.
13477 * mem-break.h (mark_breakpoints_out): Declare.
13478 * mem-break.c (mark_breakpoints_out): New.
13479 (free_all_breakpoints): Use it.
13480 * server.c (handle_target_event): If the process is gone, mark
13482 * thread-db.c (struct thread_db) <create_bp>: New field.
13483 (thread_db_enable_reporting): Fix prototype. Store a thread event
13484 breakpoint reference in the thread_db struct.
13485 (thread_db_load_search): Clear the thread_db object.
13486 (try_thread_db_load_1): Ditto.
13487 (switch_to_process): New.
13488 (disable_thread_event_reporting): Use it.
13489 (remove_thread_event_breakpoints): New.
13490 (thread_db_detach, thread_db_mourn): Use it.
13492 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13494 * linux-low.c (linux_enable_event_reporting): New.
13495 (linux_wait_for_event_1, handle_extended_wait): Use it.
13497 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13499 * linux-low.c (linux_kill_one_lwp, linux_kill)
13500 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13501 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13502 SIGSTOP even if the LWP is stopped.
13503 (send_sigstop_callback): New.
13504 (stop_all_lwps): Use send_sigstop_callback instead.
13505 (linux_resume_one_thread): Adjust.
13506 (proceed_one_lwp): Still proceed an LWP that the client has
13507 requested to stop, if we haven't reported it as stopped yet. Make
13508 sure that LWPs the client want stopped, have a pending SIGSTOP.
13510 2010-04-26 Doug Evans <dje@google.com>
13512 * server.c (handle_general_set): Make static.
13514 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13515 Print received char after testing for error/eof instead of before.
13516 (input_interrupt): Tweak comment.
13518 2010-04-23 Doug Evans <dje@google.com>
13520 * server.c (start_inferior): Print inferior argv if --debug.
13522 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13524 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13525 * nto-x86-low.c: Include server.h
13527 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13529 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13530 be consistent with other sources of this directory.
13531 (init_registers_amd64): Correct name of source file of this function
13534 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13536 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13537 64-bit executables.
13539 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13541 * win32-i386-low.c: Add 64-bit support.
13542 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13543 (init_registers_amd64): Declare.
13544 (mappings): Add 64-bit version of array.
13545 (init_windows_x86): New function.
13546 (the_low_target): Change init_arch field to init_windows_x86.
13548 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13550 * win32-low.c: Adapt to support also 64-bit architecture.
13551 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13552 (get_image_name): Use SIZE_T type for local variable `done'.
13553 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13554 (toolhelp_get_dll_name): Idem.
13555 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13556 Use uintptr_t typecast to avoid warning.
13557 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13558 (handle_exception): Use phex_nz to avoid warning.
13559 (win32_wait): Remove unused local variable `process'.
13561 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13563 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13566 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13568 * configure.ac: Use `ws2_32' library for srv_mingw.
13569 * configure: Regenerate.
13570 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13571 * remote-utils.c: Likewise.
13573 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13575 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13576 if __x86_64__ is defined.
13578 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13580 * configure: Regenerate.
13582 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13584 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13585 * target.h (target_ops): New get_tib_address field.
13586 * win32-low.h (win32_thread_info): Add thread_local_base field.
13587 * win32-low.c (child_add_thread): Add tlb argument.
13588 Set thread_local_base field to TLB.
13589 (get_child_debug_event): Adapt to child_add_thread change.
13590 (win32_get_tib_address): New function.
13591 (win32_target_ops): Set get_tib_address field to
13592 win32_get_tib_address.
13593 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13595 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13597 * linux-low.c (linux_mourn): Also remove the process.
13598 * server.c (handle_target_event): Don't remove the process here.
13599 * nto-low.c (nto_mourn): New.
13600 (nto_target_ops): Install it.
13601 * spu-low.c (spu_mourn): New.
13602 (spu_target_ops): Install it.
13603 * win32-low.c (win32_mourn): New.
13604 (win32_target_ops): Install it.
13606 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13608 * server.h (buffer_xml_printf): Remove redundant `;'.
13610 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13612 * regcache.c (set_register_cache): Invalidate regcaches before
13613 changing the register cache layout.
13614 (regcache_invalidate_one): Allow a NULL regcache.
13615 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13616 regcaches before changing the register cache layout or the target
13619 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13621 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13622 variable warning on Linux/x86-64.
13624 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13626 GDBserver disconnected tracing support.
13628 * linux-low.c (linux_remove_process): Delete.
13629 (add_lwp): Don't set last_resume_kind here.
13630 (linux_kill): Use `mourn'.
13631 (linux_detach): Use `thread_db_detach', and `mourn'.
13632 (linux_mourn): New.
13633 (linux_attach_lwp_1): Adjust comment.
13634 (linux_attach): last_resume_kind moved the thread_info; adjust.
13635 (status_pending_p_callback): Adjust.
13636 (linux_wait_for_event_1): Adjust.
13637 (count_events_callback, select_singlestep_lwp_callback)
13638 (select_event_lwp_callback, cancel_breakpoints_callback)
13639 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13640 (proceed_one_lwp): Adjust.
13641 (linux_async): Add debug output.
13642 (linux_thread_stopped): New.
13643 (linux_pause_all): New.
13644 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13646 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13647 (thread_db_free): Delete declaration.
13648 (thread_db_detach, thread_db_mourn): Declare.
13649 * thread-db.c (thread_db_init): Use thread_db_mourn.
13650 (thread_db_free): Delete, split in two.
13651 (disable_thread_event_reporting): New.
13652 (thread_db_detach): New.
13653 (thread_db_mourn): New.
13655 * server.h (struct thread_info) <last_resume_kind>: New field.
13656 <attached>: Add comment.
13657 <gdb_detached>: New field.
13658 (handler_func): Change return type to int.
13659 (handle_serial_event, handle_target_event): Ditto.
13660 (gdb_connected): Declare.
13662 (disconnected_tracing): Declare.
13663 (stop_tracing): Declare.
13665 * server.c (handle_query) <qSupported>: Report support for
13666 disconnected tracing.
13667 (queue_stop_reply_callback): Account for running threads.
13668 (gdb_wants_thread_stopped): New.
13669 (gdb_wants_all_threads_stopped): New.
13670 (gdb_reattached_process): New.
13671 (handle_status): Clear the `gdb_detached' flag of all processes.
13672 In all-stop, stop all threads.
13673 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13674 (process_serial_event): If the remote connection breaks, or if an
13675 exit was forced with "monitor exit", force an event loop exit.
13676 Handle disconnected tracing on detach.
13677 (handle_serial_event): Adjust.
13678 (handle_target_event): If GDB isn't connected, forward events back
13679 to the inferior, unless the last process exited, in which case,
13680 exit gdbserver. Adjust interface.
13682 * remote-utils.c (remote_open): Don't block in accept. Instead
13683 register an event loop source on the listen socket file
13684 descriptor. Refactor bits into ...
13685 (listen_desc): ... this new global.
13686 (gdb_connected): ... this new function.
13687 (enable_async_notification): ... this new function.
13688 (handle_accept_event): ... this new function.
13689 (remote_close): Clear remote_desc.
13691 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13693 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13695 (mourn_inferior): Define.
13696 (target_process_qsupported): Avoid the dangling else problem.
13697 (thread_stopped): Define.
13698 (pause_all): Define.
13699 (target_waitstatus_to_string): Declare.
13700 * target.c (target_waitstatus_to_string): New.
13702 * tracepoint.c (tracing): Make extern.
13703 (disconnected_tracing): New.
13704 (stop_tracing): Make extern. Handle tracing stops due to GDB
13706 (cmd_qtdisconnected): New.
13707 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13708 (handle_tracepoint_general_set): Handle QTDisconnected.
13710 * event-loop.c (event_handler_func): Change return type to int.
13711 (process_event): Bail out if the event handler wants the event
13713 (handle_file_event): Ditto.
13714 (start_event_loop): Bail out if the event handler wants the event
13717 * nto-low.c (nto_target_ops): Adjust.
13718 * spu-low.c (spu_wait): Don't remove the process here.
13719 (spu_target_ops): Adjust.
13720 * win32-low.c (win32_wait): Don't remove the process here.
13721 (win32_target_ops): Adjust.
13723 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13725 * regcache.c (realloc_register_cache): Invalidate inferior's
13726 regcache before recreating it.
13728 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13730 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13732 2010-04-09 Stan Shebs <stan@codesourcery.com>
13733 Pedro Alves <pedro@codesourcery.com>
13735 * server.h (LONGEST): New.
13736 (struct thread_info) <while_stepping>: New field.
13737 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13739 (initialize_tracepoint, handle_tracepoint_general_set)
13740 (handle_tracepoint_query, tracepoint_finished_step)
13741 (tracepoint_was_hit, release_while_stepping_state_list):
13742 (current_traceframe): Declare.
13743 * server.c (handle_general_set): Handle tracepoint packets.
13744 (read_memory): New.
13745 (write_memory): New.
13746 (handle_search_memory_1): Use read_memory.
13747 (handle_query): Report support for conditional tracepoints, trace
13748 state variables, and tracepoint sources. Handle tracepoint
13750 (main): Initialize the tracepoints module.
13751 (process_serial_event): Handle traceframe reads/writes.
13753 * linux-low.c (handle_tracepoints): New.
13754 (linux_wait_1): Call it.
13755 (linux_resume_one_lwp): Handle while-stepping.
13756 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13757 (linux_target_ops): Install them.
13758 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13760 * linux-x86-low.c (x86_supports_tracepoints): New.
13761 (the_low_target). Install it.
13763 * mem-break.h (delete_breakpoint): Declare.
13764 * mem-break.c (delete_breakpoint): Make external.
13766 * target.h (struct target_ops): Add `supports_tracepoints',
13767 `read_pc', and `write_pc' fields.
13768 (target_supports_tracepoints): Define.
13769 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13772 * regcache.h (struct regcache) <registers_owned>: New field.
13773 (init_register_cache, regcache_cpy): Declare.
13774 (regcache_read_pc, regcache_write_pc): Declare.
13775 (register_cache_size): Declare.
13776 (supply_regblock): Declare.
13777 * regcache.c (init_register_cache): New.
13778 (new_register_cache): Use it.
13779 (regcache_cpy): New.
13780 (register_cache_size): New.
13781 (supply_regblock): New.
13782 (regcache_read_pc, regcache_write_pc): New.
13784 * tracepoint.c: New.
13786 * Makefile.in (OBS): Add tracepoint.o.
13787 (tracepoint.o): New rule.
13789 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13791 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13793 (i386-mmx.c): Likewise.
13794 (i386-mmx-linux.o): Likewise.
13795 (i386-mmx-linux.c): Likewise.
13797 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13798 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13799 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13800 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13802 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13803 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13804 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13806 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13808 * Makefile.in (clean): Updated.
13810 (i386-avx.c): Likewise.
13811 (i386-avx-linux.o): Likewise.
13812 (i386-avx-linux.c): Likewise.
13813 (amd64-avx.o): Likewise.
13814 (amd64-avx.c): Likewise.
13815 (amd64-avx-linux.o): Likewise.
13816 (amd64-avx-linux.c): Likewise.
13818 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13819 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13820 (srv_amd64_regobj): Add amd64-avx.o.
13821 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13822 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13823 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13824 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13825 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13826 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13827 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13829 * i387-fp.c: Include "i386-xstate.h".
13831 (i387_cache_to_xsave): Likewise.
13832 (i387_xsave_to_cache): Likewise.
13833 (x86_xcr0): Likewise.
13835 * i387-fp.h (i387_cache_to_xsave): Likewise.
13836 (i387_xsave_to_cache): Likewise.
13837 (x86_xcr0): Likewise.
13839 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13840 * linux-crisv32-low.c (target_regsets): Likewise.
13841 * linux-m68k-low.c (target_regsets): Likewise.
13842 * linux-mips-low.c (target_regsets): Likewise.
13843 * linux-ppc-low.c (target_regsets): Likewise.
13844 * linux-s390-low.c (target_regsets): Likewise.
13845 * linux-sh-low.c (target_regsets): Likewise.
13846 * linux-sparc-low.c (target_regsets): Likewise.
13847 * linux-xtensa-low.c (target_regsets): Likewise.
13849 * linux-low.c: Include <sys/uio.h>.
13850 (regsets_fetch_inferior_registers): Support nt_type.
13851 (regsets_store_inferior_registers): Likewise.
13852 (linux_process_qsupported): New.
13853 (linux_target_ops): Add linux_process_qsupported.
13855 * linux-low.h (regset_info): Add nt_type.
13856 (linux_target_ops): Add process_qsupported.
13858 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13860 (init_registers_i386_avx_linux): New.
13861 (init_registers_amd64_avx_linux): Likewise.
13862 (xmltarget_i386_linux_no_xml): Likewise.
13863 (xmltarget_amd64_linux_no_xml): Likewise.
13864 (PTRACE_GETREGSET): Likewise.
13865 (PTRACE_SETREGSET): Likewise.
13866 (x86_fill_xstateregset): Likewise.
13867 (x86_store_xstateregset): Likewise.
13868 (use_xml): Likewise.
13869 (x86_linux_update_xmltarget): Likewise.
13870 (x86_linux_process_qsupported): Likewise.
13871 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13872 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13873 init_registers_i386_linux here. Call
13874 x86_linux_update_xmltarget.
13875 (the_low_target): Add x86_linux_process_qsupported.
13877 * server.c (handle_query): Call target_process_qsupported.
13879 * target.h (target_ops): Add process_qsupported.
13880 (target_process_qsupported): New.
13882 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13884 * inferiors.c (add_thread): Set last_status kind to
13885 TARGET_WAITKIND_IGNORE.
13886 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13887 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13888 (linux_wait_1): Move `thread' local definition to block that uses
13889 it. Don't NULL initialize `event_child'.
13890 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13891 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13892 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13894 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13896 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13897 an extended waitstatus, or by a watchpoint.
13898 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13899 thread was stepping or has been stopped by a watchpoint.
13901 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13903 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13904 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13905 of another, then delete the previous, and validate all
13907 (validate_inserted_breakpoint): New.
13908 (delete_disabled_breakpoints): New.
13909 (validate_breakpoints): New.
13910 (check_mem_read): Validate breakpoints before trusting their
13911 shadow. Delete disabled breakpoints.
13912 (check_mem_write): Validate breakpoints before trusting they
13913 should be inserted. Delete disabled breakpoints.
13914 * mem-break.h (validate_breakpoints):
13915 * server.c (handle_query): Validate breakpoints when we see a
13918 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13920 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13921 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13922 if we could tell there's a GDB breakpoint at stop_pc.
13923 (need_step_over_p): Don't do a step over if we find a GDB
13924 breakpoint at the resume PC.
13926 * mem-break.c (struct raw_breakpoint): New.
13927 (enum bkpt_type): New type `gdb_breakpoint'.
13928 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13929 fields. New field `raw'.
13930 (find_raw_breakpoint_at): New.
13931 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13932 breakpoint instead.
13933 (set_breakpoint_at): Adjust.
13934 (delete_raw_breakpoint): New.
13935 (release_breakpoint): New.
13936 (delete_breakpoint): Rename to...
13937 (delete_breakpoint_1): ... this. Add proc parameter. Use
13938 release_breakpoint. Return ENOENT.
13939 (delete_breakpoint): Reimplement.
13940 (find_breakpoint_at): Delete.
13941 (find_gdb_breakpoint_at): New.
13942 (delete_breakpoint_at): Delete.
13943 (set_gdb_breakpoint_at): New.
13944 (delete_gdb_breakpoint_at): New.
13945 (gdb_breakpoint_here): New.
13946 (set_reinsert_breakpoint): Use release_breakpoint.
13947 (uninsert_breakpoint): Rename to ...
13948 (uninsert_raw_breakpoint): ... this.
13949 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13950 (reinsert_raw_breakpoint): Change parameter type to
13952 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13954 (check_breakpoints): Adjust. Use release_breakpoint.
13955 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13956 (breakpoint_inserted_here): Ditto.
13957 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13958 Don't trust the breakpoint's shadow if it is not inserted.
13959 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13960 (delete_all_breakpoints): Adjust.
13961 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13962 use delete_breakpoint_1.
13964 * mem-break.h (breakpoints_supported): Delete declaration.
13965 (set_gdb_breakpoint_at): Declare.
13966 (gdb_breakpoint_here): Declare.
13967 (delete_breakpoint_at): Delete.
13968 (delete_gdb_breakpoint_at): Declare.
13970 * server.h (struct raw_breakpoint): Forward declare.
13971 (struct process_info): New field `raw_breakpoints'.
13973 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13976 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13978 * linux-low.c (status_pending_p_callback): Fix comment.
13979 (linux_wait_for_event_1): Move most of the internal breakpoint
13980 handling from here...
13981 (linux_wait_1): ... to here.
13982 (count_events_callback): New.
13983 (select_singlestep_lwp_callback): New.
13984 (select_event_lwp_callback): New.
13985 (cancel_breakpoints_callback): New.
13986 (select_event_lwp): New.
13987 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13988 priority to all LWPs that have had events that should be reported
13989 to the client. Cancel breakpoints when about to reporting the
13990 event to the client, not while stopping lwps. No longer cancel
13991 finished single-steps here.
13992 (cancel_finished_single_step): Delete.
13993 (cancel_finished_single_steps): Delete.
13995 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13997 * mem-break.c (enum bkpt_type): New.
13998 (struct breakpoint): New field `type'.
13999 (set_breakpoint_at): Change return type to struct breakpoint
14000 pointer. Set type to `other_breakpoint' by default.
14001 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14002 in the breakpoint list.
14003 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14004 (reinsert_breakpoint): Rename to ...
14005 (reinsert_raw_breakpoint): ... this.
14006 (reinsert_breakpoints_at): Adjust.
14007 * mem-break.h (struct breakpoint): Declare.
14008 (set_breakpoint_at): Change return type to struct breakpoint
14011 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14013 * server.c (handle_query): Assign, not compare.
14015 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14017 Teach linux gdbserver to step-over-breakpoints.
14019 * linux-low.c (can_hardware_single_step): New.
14020 (supports_breakpoints): New.
14021 (handle_extended_wait): If stopping threads, read the stop pc of
14022 the new cloned LWP.
14024 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14025 low target doesn't support retrieving the PC.
14026 (add_lwp): Set last_resume_kind to resume_continue.
14027 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14028 (linux_attach): Don't clear stop_expected. Set the lwp's
14029 last_resume_kind to resume_stop.
14030 (linux_detach_one_lwp): Don't check for removed breakpoints.
14031 (check_removed_breakpoint): Delete.
14032 (status_pending_p): Rename to ...
14033 (status_pending_p_callback): ... this. Don't check for removed
14034 breakpoints. Don't consider threads that are stopped from GDB's
14036 (linux_wait_for_lwp): Always read the stop_pc here.
14037 (cancel_breakpoint): New.
14038 (step_over_bkpt): New global.
14039 (linux_wait_for_event_1): Implement stepping over breakpoints.
14040 (gdb_wants_lwp_stopped): New.
14041 (gdb_wants_all_stopped): New.
14042 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14043 single-step traps here. Store the thread's last reported target
14045 (send_sigstop): Don't clear stop_expected. Always set it,
14047 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14048 (cancel_finished_single_step): New.
14049 (cancel_finished_single_steps): New.
14050 (wait_for_sigstop): Don't cancel finished single-step traps here.
14051 (linux_resume_one_lwp): Don't check for removed breakpoints.
14052 Don't set `step' on non-hardware step archs.
14053 (linux_set_resume_request): Ignore resume_stop requests if already
14054 stopping or stopped. Set the lwp's last_resume_kind.
14055 (resume_status_pending_p): Don't check for removed breakpoints.
14056 (need_step_over_p): New.
14057 (start_step_over): New.
14058 (finish_step_over): New.
14059 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14060 requests. Clear the thread's last reported target waitstatus.
14061 Don't use the `suspended' flag. Don't consider pending breakpoints.
14062 (linux_resume): Start a step-over if necessary.
14063 (proceed_one_lwp): New.
14064 (proceed_all_lwps): New.
14065 (unstop_all_lwps): New.
14066 * linux-low.h (struct lwp_info): Rewrite comment for the
14067 `suspended' flag. Add the `stop_pc' field. Delete the
14068 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14069 Add `'last_resume_kind' and `need_step_over' fields.
14070 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14071 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14072 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14073 (set_raw_breakpoint_at): New.
14074 (set_breakpoint_at): Rewrite to use it.
14075 (reinsert_breakpoint_handler): Delete.
14076 (set_reinsert_breakpoint): New.
14077 (reinsert_breakpoint_by_bp): Delete.
14078 (delete_reinsert_breakpoints): New.
14079 (uninsert_breakpoint): Rewrite.
14080 (uninsert_breakpoints_at): New.
14081 (reinsert_breakpoint): Rewrite.
14082 (reinsert_breakpoints_at): New.
14083 (check_breakpoints): Rewrite.
14084 (breakpoint_here): New.
14085 (breakpoint_inserted_here): New.
14086 (check_mem_read): Adjust.
14087 * mem-break.h (breakpoints_supported, breakpoint_here)
14088 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14089 (reinsert_breakpoint_by_bp): Delete declaration.
14090 (delete_reinsert_breakpoints): Declare.
14091 (reinsert_breakpoint): Delete declaration.
14092 (reinsert_breakpoints_at): Declare.
14093 (uninsert_breakpoint): Delete declaration.
14094 (uninsert_breakpoints_at): Declare.
14095 (check_breakpoints): Adjust prototype.
14096 * server.h: Adjust include order.
14097 (struct thread_info): Declare here. Add a `last_status' field.
14099 2010-03-23 Michael Snyder <msnyder@vmware.com>
14101 * server.c (crc32): New function.
14102 (handle_query): Add handling for 'qCRC:' request.
14104 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14106 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14107 lwp had been stopped by a watchpoint.
14109 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14111 * server.h (internal_error): Declare.
14112 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14113 * utils.c (internal_error): New function.
14115 2010-03-15 Andreas Schwab <schwab@redhat.com>
14117 * configure.srv: Fix typo setting srv_regobj.
14119 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14121 * linux-low.c (fetch_register): Avoid passing a non string literal
14123 (usr_store_inferior_registers): Ditto.
14125 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14127 * linux-low.c (linux_write_memory): Bail out early if peeking
14130 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14132 * linux-low.h (struct lwp_info): New fields
14133 `stopped_by_watchpoint' and `stopped_data_address'.
14134 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14135 here, and cache them in the lwp object.
14136 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14138 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14140 (linux_stopped_by_watchpoint): Rewrite.
14141 (linux_stopped_data_address): Rewrite.
14143 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14145 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14146 switching the current inferior, not before.
14148 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14150 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14151 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14152 i386-linux.c and amd64-linux.c.
14153 (reg-i386.o): Removed.
14154 (reg-i386.c): Likewise.
14155 (reg-i386-linux.o): Likewise.
14156 (reg-i386-linux.c): Likewise.
14157 (reg-x86-64.o): Likewise.
14158 (reg-x86-64.c): Likewise.
14159 (reg-x86-64-linux.o): Likewise.
14160 (reg-x86-64-linux.c): Likewise.
14162 (i386.c): Likewise.
14163 (i386-linux.o): Likewise.
14164 (i386-linux.c): Likewise.
14165 (amd64.o): Likewise.
14166 (amd64.c): Likewise.
14167 (amd64-linux.o): Likewise.
14168 (amd64-linux.c): Likewise.
14170 * configure.srv (srv_i386_regobj): New.
14171 (srv_i386_linux_regobj): Likewise.
14172 (srv_amd64_regobj): Likewise.
14173 (srv_amd64_linux_regobj): Likewise.
14174 (srv_i386_32bit_xmlfiles): Likewise.
14175 (srv_i386_64bit_xmlfiles): Likewise.
14176 (srv_i386_xmlfiles): Likewise.
14177 (srv_amd64_xmlfiles): Likewise.
14178 (srv_i386_linux_xmlfiles): Likewise.
14179 (srv_amd64_linux_xmlfiles): Likewise.
14180 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14181 srv_xmlfiles to $srv_i386_xmlfiles.
14182 (i[34567]86-*-mingw32ce*): Likewise.
14183 (i[34567]86-*-mingw*): Likewise.
14184 (i[34567]86-*-nto*): Likewise.
14185 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14186 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14187 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14188 (x86_64-*-linux*): Likewise.
14190 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14191 (init_registers_amd64_linux): New.
14192 (x86_arch_setup): Replace init_registers_x86_64_linux with
14193 init_registers_amd64_linux.
14195 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14197 * configure.ac: Check for libdl. If it is not available link against
14198 static libthread_db.
14199 * configure: Regenerate.
14201 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14205 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14206 handing a read watchpoint.
14207 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14209 2010-02-12 Doug Evans <dje@google.com>
14211 * linux-low.c (linux_supports_tracefork_flag): Document.
14212 (linux_look_up_symbols): Add comment.
14214 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14216 * regcache.c (supply_register): Clear regcache if buf is NULL.
14218 2010-02-02 Nicolas Roche <roche@sourceware.org>
14219 Joel Brobecker <brobecker@adacore.com>
14221 * inferiors.c (find_inferior): Add function documentation.
14222 (unloaded_dll): Handle the case where the unloaded dll has not
14223 been previously registered in the dll list.
14225 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14227 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14228 (thumb2_breakpoint): New.
14229 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14231 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14233 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14234 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14237 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14239 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14241 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14243 * linux-s390-low.c (s390_collect_ptrace_register)
14244 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14246 2010-01-21 Doug Evans <dje@google.com>
14248 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14249 (PTRACE_ARG4_TYPE): New macro.
14250 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14251 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14252 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14253 (usr_store_inferior_registers): Ditto.
14254 (linux_read_memory, linux_write_memory): Ditto.
14255 (linux_test_for_tracefork): Ditto.
14257 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14258 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14260 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14262 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14265 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14267 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14268 prototype to take a regcache. Adjust.
14270 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14272 * regcache.h (struct thread_info): Forward declare.
14273 (struct regcache): New.
14274 (new_register_cache): Adjust prototype.
14275 (get_thread_regcache): Declare.
14276 (free_register_cache): Adjust prototype.
14277 (registers_to_string, registers_from_string): Ditto.
14278 (supply_register, supply_register_by_name, collect_register)
14279 (collect_register_as_string, collect_register_by_name): Ditto.
14280 * regcache.c (struct inferior_regcache_data): Delete.
14281 (get_regcache): Rename to ...
14282 (get_thread_regcache): ... this. Adjust. Switch inferior before
14283 fetching registers.
14284 (regcache_invalidate_one): Adjust.
14285 (regcache_invalidate): Fix prototype.
14286 (new_register_cache): Return the new register cache.
14287 (free_register_cache): Change prototype.
14288 (realloc_register_cache): Adjust.
14289 (registers_to_string): Change prototype to take a regcache. Adjust.
14290 (registers_from_string): Ditto.
14291 (register_data): Ditto.
14292 (supply_register): Ditto.
14293 (supply_register_by_name): Ditto.
14294 (collect_register): Ditto.
14295 (collect_register_as_string): Ditto.
14296 (collect_register_by_name): Ditto.
14297 * server.c (process_serial_event): Adjust.
14298 * linux-low.h (regset_fill_func, regset_store_func): Change
14300 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14302 * linux-low.c (get_stop_pc): Adjust.
14303 (check_removed_breakpoint): Adjust.
14304 (linux_wait_for_event): Adjust.
14305 (linux_resume_one_lwp): Adjust.
14306 (fetch_register): Add regcache parameter. Adjust.
14307 (usr_store_inferior_registers): Ditto.
14308 (regsets_fetch_inferior_registers): Ditto.
14309 (regsets_store_inferior_registers): Ditto.
14310 (linux_fetch_registers, linux_store_registers): Ditto.
14311 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14313 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14315 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14316 prototype to take a regcache.
14317 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14318 * remote-utils.c (convert_ascii_to_int, outreg)
14319 (prepare_resume_reply): Change prototype to take a regcache.
14321 * target.h (struct target_ops) <fetch_registers, store_registers>:
14322 Change prototype to take a regcache.
14323 (fetch_inferior_registers, store_inferior_registers): Change
14324 prototype to take a regcache. Adjust.
14325 * proc-service.c (ps_lgetregs): Adjust.
14326 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14327 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14328 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14329 take a regcache. Adjust.
14330 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14331 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14332 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14333 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14334 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14335 (cris_cannot_fetch_register):
14336 (cris_breakpoint_at): Change prototype to take a regcache.
14338 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14339 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14340 to take a regcache. Adjust.
14341 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14343 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14344 take a regcache. Adjust.
14345 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14346 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14347 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14348 * linux-mips-low.c (mips_get_pc):
14349 (mips_set_pc): Change prototype to take a regcache. Adjust.
14350 (mips_reinsert_addr): Adjust.
14351 (mips_collect_register): Change prototype to take a regcache.
14353 (mips_supply_register):
14354 (mips_collect_register_32bit, mips_supply_register_32bit)
14355 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14356 (mips_store_fpregset): Ditto.
14357 * linux-ppc-low.c (ppc_supply_ptrace_register)
14358 (ppc_supply_ptrace_register): Ditto.
14359 (parse_spufs_run): Adjust.
14360 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14361 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14362 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14363 take a regcache. Adjust.
14364 * linux-s390-low.c (s390_collect_ptrace_register)
14365 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14366 (s390_set_pc): Change prototype to take a regcache. Adjust.
14367 (s390_arch_setup): Adjust.
14368 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14369 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14370 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14371 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14372 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14374 (sparc_breakpoint_at): Adjust.
14375 * linux-xtensa-low.c (xtensa_fill_gregset):
14376 (xtensa_store_gregset):
14377 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14378 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14379 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14380 prototype to take a regcache. Adjust.
14381 * win32-arm-low.c (arm_fetch_inferior_register)
14382 (arm_store_inferior_register): Change prototype to take a
14384 * win32-i386-low.c (i386_fetch_inferior_register)
14385 (i386_store_inferior_register): Change prototype to take a
14387 * win32-low.c (child_fetch_inferior_registers)
14388 (child_store_inferior_registers): Change prototype to take a
14390 (win32_wait): Adjust.
14391 (win32_fetch_inferior_registers): Change prototype to take a
14393 (win32_store_inferior_registers): Adjust.
14394 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14395 store_inferior_register>: Change prototype to take a regcache.
14397 2010-01-20 Doug Evans <dje@google.com>
14399 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14401 (linux_wait_for_event1, linux_init_signals): Ditto.
14402 (W_STOPCODE): Provide definition if missing.
14404 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14406 * linux-low.c (linux_core_of_thread): New.
14407 (compare_ints, show_process, list_threads): New.
14408 (linux_qxfer_osdata): Report threads and cores.
14409 (linux_target_op): Register linux_core_of_thread.
14410 * remote-utils.c (prepare_resume_reply): Report the core.
14411 (buffer_xml_printf): Support %d specifier.
14412 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14414 (handle_query): Handle qXfer:threads. Announce availability
14416 * target.h (struct target_ops): New field core_of_thread.
14418 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14420 * Makefile.in (clean): Remove new generated files.
14421 (reg-s390.o, reg-s390.c): Remove rules.
14422 (reg-s390x.o, reg-s390x.c): Likewise.
14423 (s390-linux32.o, s390-linux32.c): Add rules.
14424 (s390-linux64.o, s390-linux64.c): Likewise.
14425 (s390x-linux64.o, s390x-linux64.c): Likewise.
14426 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14427 * linux-s390-low.c: Include <elf.h>.
14428 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14429 (init_registers_s390): Remove prototype.
14430 (init_registers_s390x): Likewise.
14431 (init_registers_s390_linux32): Add prototype.
14432 (init_registers_s390_linux64): Likewise.
14433 (init_registers_s390x_linux64): Likewise.
14434 (s390_num_regs_3264): New define.
14435 (s390_regmap_3264): New global variable.
14436 (s390_cannot_fetch_register): Remove obsolete check.
14437 (s390_cannot_store_register): Likewise.
14438 (s390_collect_ptrace_register): Handle upper/lower register halves.
14439 (s390_supply_ptrace_register): Likewise.
14440 (s390_fill_gregset): Update to register number changes.
14441 (s390_get_hwcap): New routine.
14442 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14443 Install appropriate regmap and register set.
14445 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14447 * server.c (gdbserver_version): Update copyright year to 2010.
14448 * gdbreplay.c (gdbreplay_version): Likewise.
14450 2009-12-28 Doug Evans <dje@google.com>
14452 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14453 elf/external.h. Include <elf.h> instead but only if necessary.
14455 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14457 * linux-low.c (linux_remove_process): Remove `detaching'
14458 parameter. Don't release/detach from thread_db here.
14459 (linux_kill): Release/detach from thread_db here, ...
14460 (linux_detach): ... and here, before actually detaching.
14461 (linux_wait_1): ... and here, when a process exits.
14462 * thread-db.c (any_thread_of): New.
14463 (thread_db_free): Switch the current inferior to a thread of the
14466 2009-12-21 Doug Evans <dje@google.com>
14468 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14470 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14471 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14472 warning ifndef __NR_tkill. Move setting of errno there too.
14473 Delete unnecessary resetting of errno after syscall.
14474 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14476 * configure.ac: Check for dladdr.
14477 * config.in: Regenerate.
14478 * configure: Regenerate.
14479 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14480 (try_thread_db_load): Update.
14482 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14484 2009-12-18 Doug Evans <dje@google.com>
14486 * event-loop.c: Include unistd.h if it exists.
14488 * linux-low.c (my_waitpid): Move definition away from being in
14489 between linux_tracefork_child/linux_test_for_tracefork.
14491 * gdb_proc_service.h (psaddr_t): Fix type.
14492 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14493 signature to match glibc.
14495 2009-12-16 Doug Evans <dje@google.com>
14497 * linux-low.c (linux_read_memory): Fix argument to read.
14499 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14501 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14502 events, don't leave current_inferior pointing at null.
14504 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14506 * win32-low.c (LOG): Delete.
14507 (OUTMSG): Output to stderr.
14508 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14509 on compile time LOG macro.
14510 (win32_wait): Fix debug output.
14512 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14514 * win32-low.c (win32_add_one_solib): If the dll name is
14515 "ntdll.dll", prepend the system directory to the dll path.
14517 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14519 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14521 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14522 Vladimir Prus <vladimir@codesourcery.com>
14524 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14525 * configure.ac: Check for __mcoldfire__ and set
14526 gdb_cv_m68k_is_coldfire.
14527 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14528 reg-cf.o and reg-m68k.o.
14529 * configure: Regenerated.
14531 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14533 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14534 Pass it to thread_db_free.
14535 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14536 proper `detaching' argument to linux_remove_process.
14537 * linux-low.h (thread_db_free): Add `detaching' parameter.
14538 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14540 (thread_db_free): Add `detaching' parameter. Only
14541 call td_ta_clear_event if detaching from process.
14543 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14545 * thread-db.c (thread_db_free): Fix typo.
14547 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14550 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14552 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14554 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14555 with an i686 compiler.
14556 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14558 * configure: Rebuilt.
14560 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14564 * server.c (handle_search_memory_1): Correct read_addr initialization
14565 in loop for searching subsequent chunks.
14567 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14569 * configure.ac: New --with-libthread-db option.
14570 * thread-db.c: Allow direct dependence on libthread_db.
14571 (thread_db_free): Adjust.
14572 * config.in: Regenerate.
14573 * configure: Likewise.
14575 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14578 * thread-db.c (attach_thread): New function.
14579 (maybe_attach_thread): Return success/failure.
14580 (find_new_threads_callback): Adjust.
14581 (thread_db_find_new_threads): Loop until no new threads.
14583 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14585 * proc-service.c (ps_lgetregs): Formatting.
14587 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14589 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14590 * configure.ac: Adjust.
14591 * linux-low.h (struct process_info_private): Move members to struct
14593 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14594 * linux-low.c (linux_remove_process): Adjust.
14595 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14596 * server.c (handle_query): Move code ...
14597 (handle_monitor_command): ... here. New function.
14598 * target.h (struct target_ops): New member.
14599 * thread-db.c (struct thread_db): New.
14600 (libthread_db_search_path): New variable.
14601 (thread_db_create_event, thread_db_enable_reporting)
14602 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14603 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14604 (try_thread_db_load_1, dladdr_to_soname): New functions.
14605 (try_thread_db_load, thread_db_load_search): New functions.
14606 (thread_db_init): Search for libthread_db.
14607 (thread_db_free): New function.
14608 (thread_db_handle_monitor_command): Likewise.
14609 * config.in: Regenerate.
14610 * configure: Regenerate.
14612 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14614 * spu-low.c (spu_kill): Wait for inferior to terminate.
14615 Call clear_inferiors.
14616 (spu_detach): Call clear_inferiors.
14618 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14620 * aclocal.m4: Regenerate.
14621 * config.in: Likewise.
14622 * configure: Likewise.
14624 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14626 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14627 (parse_spufs_run): New function.
14628 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14629 (ppc_breakpoint_at): Handle SPU breakpoints.
14631 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14633 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14634 (SPUFS_MAGIC): Define.
14635 (spu_enumerate_spu_ids): New function.
14636 (linux_qxfer_spu): New function.
14637 (linux_target_ops): Install linux_qxfer_spu.
14639 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14641 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14642 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14643 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14644 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14645 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14646 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14647 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14648 (init_registers_powerpc_cell32l): Add prototype.
14649 (init_registers_powerpc_cell64l): Likewise.
14650 (ppc_arch_setup): Detect Cell/B.E. architecture.
14652 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14654 * Makefile.in (datarootdir): New variable.
14656 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14658 * linux-low.c (linux_write_memory): Update debugging output.
14659 * Makefile.in (clean): Add new descriptions.
14660 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14661 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14662 * configure.srv: Add new files for arm*-*-linux*.
14663 * linux-arm-low.c: Add new declarations.
14664 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14665 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14666 (HWCAP_VFPv3D16): New.
14667 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14668 instead of __IWMMXT__.
14669 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14670 (arm_arch_setup): New.
14671 (target_regsets): Remove #ifdef. Add VFP regset.
14672 (the_low_target): Use arm_arch_setup.
14674 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14676 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14677 the main thread again.
14679 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14681 Adding Neutrino gdbserver.
14682 * configure: Regenerated.
14683 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14684 * configure.srv (i[34567]86-*-nto*): New target.
14685 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14686 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14687 (nto_comctrl) [__QNX__]: New function.
14688 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14690 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14692 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14695 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14696 Pedro Alves <pedro@codesourcery.com>
14698 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14699 don't support CONTEXT_EXTENDED_REGISTERS.
14700 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14701 (the_low_target): Install them.
14702 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14703 failing with ERROR_PIPE_NOT_CONNECTED.
14705 2009-06-30 Doug Evans <dje@google.com>
14706 Pierre Muller <muller@ics.u-strasbg.fr>
14708 Add h/w watchpoint support to x86-linux, win32-i386.
14709 * Makefile.in (SFILES): Add i386-low.c
14710 (i386_low_h): Define.
14711 (i386-low.o): Add dependencies.
14712 (linux-x86-low.o): Add i386-low.h dependency.
14713 (win32-i386-low.o): Ditto.
14714 * i386-low.c: New file.
14715 * i386-low.h: New file.
14716 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14717 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14718 * linux-low.c (linux_add_process): Initialize arch_private.
14719 (linux_remove_process): Free arch_private.
14720 (add_lwp): Initialize arch_private.
14721 (delete_lwp): Free arch_private.
14722 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14724 * linux-low.h (process_info_private): New member arch_private.
14725 (lwp_info): New member arch_private.
14726 (linux_target_ops): New members new_process, new_thread,
14728 (ptid_of): New macro.
14729 * linux-x86-low.c: Include stddef.h, i386-low.h.
14730 (arch_process_info): New struct.
14731 (arch_lwp_info): New struct.
14732 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14733 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14734 (i386_dr_low_get_status): New function.
14735 (x86_insert_point, x86_remove_point): New functions.
14736 (x86_stopped_by_watchpoint): New function.
14737 (x86_stopped_data_address): New function.
14738 (x86_linux_new_process, x86_linux_new_thread): New functions.
14739 (x86_linux_prepare_to_resume): New function.
14740 (the_low_target): Add entries for insert_point, remove_point,
14741 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14743 * server.c (debug_hw_points): New global.
14744 (monitor_show_help): Document set debug-hw-points.
14745 (handle_query): Process "set debug-hw-points".
14746 * server.h (debug_hw_points): Declare.
14747 (paddress): Declare.
14748 * utils.c (NUMCELLS, CELLSIZE): New macros.
14749 (get_sell, xsnprintf, paddress): New functions.
14750 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14751 remove_point, stopped_by_watchpoint, stopped_data_address.
14752 * win32-i386-low.c: Include i386-low.h.
14753 (debug_reg_state): Replaces dr.
14754 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14755 (i386_dr_low_get_status): New function.
14756 (i386_insert_point, i386_remove_point): New functions.
14757 (i386_stopped_by_watchpoint): New function.
14758 (i386_stopped_data_address): New function.
14759 (i386_initial_stuff): Update.
14760 (get_thread_context,set_thread_context,i386_thread_added): Update.
14761 (the_low_target): Add entries for insert_point,
14762 remove_point, stopped_by_watchpoint, stopped_data_address.
14763 * win32-low.c (win32_insert_watchpoint): New function.
14764 (win32_remove_watchpoint): New function.
14765 (win32_stopped_by_watchpoint): New function.
14766 (win32_stopped_data_address): New function.
14767 (win32_target_ops): Add entries for insert_watchpoint,
14768 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14769 * win32-low.h (win32_target_ops): New members insert_point,
14770 remove_point, stopped_by_watchpoint, stopped_data_address.
14772 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14774 * server.c (process_serial_event): Re-return unsupported, not
14775 error, if the type isn't recognized. Re-allow supporting only
14776 insert or remove packets. Also call require_running for
14777 breakpoints. Add missing break statement to default case. Tidy.
14778 * target.h (struct target_ops): Rename insert_watchpoint to
14779 insert_point, and remove_watchpoint to remove_point.
14781 * linux-low.h (struct linux_target_ops): Likewise.
14782 * linux-low.c (linux_insert_watchpoint): Rename to ...
14783 (linux_insert_point): ... this. Adjust.
14784 (linux_remove_watchpoint): Rename to ...
14785 (linux_remove_point): ... this. Adjust.
14786 (linux_target_ops): Adjust.
14787 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14788 (cris_insert_point): ... this.
14789 (cris_remove_watchpoint): Rename to ...
14790 (cris_remove_point): ... this.
14791 (the_low_target): Adjust.
14793 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14795 * server.c (handle_v_kill): Pass signal_pid to
14796 kill_inferior if multi_process is zero.
14798 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14800 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14801 * target.h (target_ops): Comment for *_watchpoint to make it clear
14802 the functions can get types '0' and '1'.
14804 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14806 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14807 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14808 * regcache.c (get_regcache): Likewise.
14809 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14810 * win32-low.c (child_fetch_inferior_registers): Remove check for
14813 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14814 Pedro Alves <pedro@codesourcery.com>
14816 * target.h (struct target_ops) <supports_multi_process>: New
14818 (target_supports_multi_process): New.
14819 * server.c (handle_query): Even if GDB reports support, only
14820 enable multi-process if the target also supports it. Report
14821 multi-process support only if the target backend supports it.
14822 * linux-low.c (linux_supports_multi_process): New function.
14823 (linux_target_ops): Install it as target_supports_multi_process
14826 2009-05-24 Doug Evans <dje@google.com>
14828 Global renaming of find_thread_pid to find_thread_ptid.
14829 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14830 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14831 All callers updated.
14833 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14834 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14837 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14838 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14839 (linux_resume_one_lwp): Ditto.
14841 2009-05-23 Doug Evans <dje@google.com>
14843 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14844 from struct inferior_list_entry * to struct lwp_info *.
14845 All callers updated.
14847 2009-05-13 Doug Evans <dje@google.com>
14849 * linux-x86-low.c: Don't include assert.h.
14850 (x86_siginfo_fixup): Use fatal, not assert.
14851 (x86_arch_setup): Fix comment.
14853 2009-05-12 Doug Evans <dje@google.com>
14855 Biarch support for i386/amd64 gdbserver.
14856 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14857 Add linux-x86-low.c.
14858 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14859 (linux-x86-low.o): Add.
14860 * linux-x86-64-low.c: Delete.
14861 * linux-i386-low.c: Delete.
14862 * linux-x86-low.c: New file.
14863 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14865 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14867 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14868 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14869 (linux_child_pid_to_exec_file): New function.
14870 (elf_64_header_p, elf_64_file_p): New functions.
14871 (siginfo_fixup): New function.
14872 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14873 give target a chance to convert layout.
14874 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14875 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14877 2009-05-07 Doug Evans <dje@google.com>
14879 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14880 (regsets_store_inferior_registers): Ditto.
14882 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14886 * linux-low.c (must_set_ptrace_flags): Delete.
14887 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14889 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14890 `lwp->must_set_ptrace_flags' instead.
14891 (linux_wait_for_event_1): Set ptrace options here.
14892 (linux_wait_1): ... not here.
14894 2009-04-30 Doug Evans <dje@google.com>
14896 * inferiors.c (started_inferior_callback): New function.
14897 (attached_inferior_callback): New function.
14898 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14899 * server.c (print_started_pid, print_attached_pid): New functions.
14900 (detach_or_kill_for_exit): New function.
14901 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14902 * server.h (have_started_inferiors_p): Declare.
14903 (have_attached_inferiors_p): Declare.
14905 * inferiors.c (remove_process): Fix memory leak, free process.
14906 * linux-low.c (linux_remove_process): New function.
14907 (linux_kill): Call it instead of remove_process.
14908 (linux_detach, linux_wait_1): Ditto.
14910 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14912 * configure.srv: Add x86 Windows CE target.
14914 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14916 * inferiors.c (get_thread_process): Make global.
14917 * server.h (get_thread_process): Add prototype.
14918 * thread-db.c (find_one_thread): Use get_thread_process
14919 instead of current_process.
14920 (thread_db_get_tls_address): Do not crash if called when
14921 thread layer is not yet initialized.
14923 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14925 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14926 * spu-low.c (current_tid): Rename to ...
14927 (current_ptid): ... this.
14928 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14929 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14930 ptid_get_lwp (current_ptid) instead of current_tid.
14931 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14932 instead of current_tid. Use find_process_pid to verify pid
14933 argument is valid. Pass proper argument to remove_process.
14934 (spu_thread_alive): Compare current_ptid instead of current_tid.
14935 (spu_resume): Likewise.
14937 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14939 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14942 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14944 Implement the multiprocess extensions, and add linux multiprocess
14947 * server.h (ULONGEST): Declare.
14948 (struct ptid, ptid_t): New.
14949 (minus_one_ptid, null_ptid): Declare.
14950 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14951 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14952 (struct inferior_list_entry): Change `id' type from unsigned from
14954 (struct sym_cache, struct breakpoint, struct
14955 process_info_private): Forward declare.
14956 (struct process_info): Declare.
14957 (current_process): Declare.
14958 (all_processes): Declare.
14959 (initialize_inferiors): Declare.
14960 (add_thread): Adjust to use ptid_t.
14961 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14962 (add_process, remove_process, find_thread_pid): Declare.
14963 (find_inferior_id): Adjust to use ptid_t.
14964 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14965 (multi_process): Declare.
14966 (push_event): Adjust to use ptid_t.
14967 (read_ptid, write_ptid): Declare.
14968 (prepare_resume_reply): Adjust to use ptid_t.
14969 (clear_symbol_cache): Declare.
14970 * inferiors.c (all_processes): New.
14971 (null_ptid, minus_one_ptid): New.
14972 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14973 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14974 (add_thread): Change unsigned long to ptid. Remove gdb_id
14976 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14977 (gdb_id_to_thread): Rename to ...
14978 (find_thread_pid): ... this. Change unsigned long to ptid.
14979 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14980 (loaded_dll, pull_pid_from_list): Adjust.
14981 (add_process, remove_process, find_process_pid)
14982 (get_thread_process, current_process, initialize_inferiors): New.
14983 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14984 (struct target_waitstatus) <related_pid>: Ditto.
14985 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14986 return type to int.
14987 (struct target_ops) <join>: Add `pid' argument.
14988 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14989 (struct target_ops) <wait>: Add `ptid' field. Change return type
14991 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14992 (mywait): Add `ptid' argument. Change return type to ptid_t.
14993 (target_pid_to_str): Declare.
14994 * target.c (set_desired_inferior): Adjust to use ptids.
14995 (mywait): Add new `ptid' argument. Adjust.
14996 (target_pid_to_str): New.
14997 * mem-break.h (free_all_breakpoints): Declare.
14998 * mem-break.c (breakpoints): Delelete.
14999 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15000 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15001 to use per-process breakpoint list.
15002 (free_all_breakpoints): New.
15003 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15004 (symbol_cache, all_symbols_looked_up): Delete.
15006 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15008 (prepare_resume_reply): Change ptid argument's type from unsigned
15009 long to ptid_t. Adjust. Implement W;process and X;process.
15010 (free_sym_cache, clear_symbol_cache): New.
15011 (look_up_one_symbol): Adjust to per-process symbol cache. *
15012 * server.c (cont_thread, general_thread, step_thread): Change type
15014 (attached): Delete.
15015 (multi_process): New.
15016 (last_ptid): Change type to ptid_t.
15017 (struct vstop_notif) <ptid>: Change type to ptid_t.
15018 (queue_stop_reply, push_event): Change `ptid' argument's type to
15020 (discard_queued_stop_replies): Add `pid' argument.
15021 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15022 changes. Don't reference the `attached' global.
15023 (attach_inferior): Adjust to mywait interface changes.
15024 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15025 features. Handle and report "multiprocess+". Handle
15027 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15029 (handle_v_kill): New.
15030 (handle_v_stopped): Adjust to use target_pid_to_str.
15031 (handle_v_requests): Allow multiple attaches and runs when
15032 multiprocess extensions are in effect. Handle "vKill".
15033 (myresume): Adjust to use ptids.
15034 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15035 (handle_status): Adjust to discard_queued_stop_replies interface
15037 (first_thread_of, kill_inferior_callback)
15038 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15039 (main): Call initialize_inferiors. Adjust to use ptids, killing
15040 and detaching from all inferiors. Handle multiprocess packet
15042 * linux-low.h: Include gdb_proc_service.h.
15043 (struct process_info_private): New.
15044 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15045 <lwpid_of>: Use ptid_get_lwp.
15046 (get_lwp_thread): Adjust.
15047 (struct lwp_info): Add `dead' member.
15048 (find_lwp_pid): Declare.
15049 * linux-low.c (thread_db_active): Delete.
15050 (new_inferior): Adjust comment.
15051 (inferior_pid): Delete.
15052 (linux_add_process): New.
15053 (handle_extended_wait): Adjust.
15054 (add_lwp): Change unsigned long to ptid.
15055 (linux_create_inferior): Add process to processes table. Adjust
15056 to use ptids. Don't set new_inferior here.
15057 (linux_attach_lwp): Rename to ...
15058 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15059 it. Adjust to use ptids.
15060 (linux_attach_lwp): New.
15061 (linux_attach): Add process to processes table. Don't set
15063 (struct counter): New.
15064 (second_thread_of_pid_p, last_thread_of_process_p): New.
15065 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15066 multiple processes.
15067 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15068 processes. Remove process from process table.
15069 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15070 to multiple processes.
15071 (any_thread_of): New.
15072 (linux_detach): Add `pid' argument, and handle it. Remove process
15073 from processes table.
15074 (linux_join): Add `pid' argument. Handle it.
15075 (linux_thread_alive): Change unsighed long argument to ptid_t.
15076 Consider dead lwps as not being alive.
15077 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15078 threads we're not interested in.
15079 (same_lwp, find_lwp_pid): New.
15080 (linux_wait_for_lwp): Change `pid' argument's type from int to
15082 (linux_wait_for_event): Rename to ...
15083 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15084 from int to ptid_t. Adjust.
15085 (linux_wait_for_event): New.
15086 (linux_wait_1): Add `ptid' argument. Change return type to
15087 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15088 that exit from the process table.
15089 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15091 (mark_lwp_dead): New.
15092 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15093 stopping all threads, mark its main lwp as dead.
15094 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15096 (fetch_register, usr_store_inferior_registers)
15097 (regsets_fetch_inferior_registers)
15098 (regsets_store_inferior_registers, linux_read_memory)
15099 (linux_write_memory): Inline `inferior_pid'.
15100 (linux_look_up_symbols): Adjust to use per-process
15101 `thread_db_active'.
15102 (linux_request_interrupt): Adjust to use ptids.
15103 (linux_read_auxv): Inline `inferior_pid'.
15104 (initialize_low): Don't reference thread_db_active.
15105 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15106 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15107 (ps_getpid): Return the pid of the current inferior.
15108 * thread-db.c (proc_handle, thread_agent): Delete.
15109 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15111 (find_one_thread): Change argument type to ptid_t. Adjust to
15113 (maybe_attach_thread): Adjust to per-process data and ptids.
15114 (thread_db_find_new_threads): Ditto.
15115 (thread_db_init): Ditto.
15116 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15117 processes table. Adjust to use ptids.
15118 (spu_kill, spu_detach): Adjust interface. Remove process from
15120 (spu_join, spu_thread_alive): Adjust interface.
15121 (spu_wait): Adjust interface. Remove process from processes
15122 table. Adjust to use ptids.
15123 * win32-low.c (current_inferior_tid): Delete.
15124 (current_inferior_ptid): New.
15125 (debug_event_ptid): New.
15126 (thread_rec): Take a ptid. Adjust.
15127 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15128 (child_delete_thread): Ditto.
15129 (do_initial_child_stuff): Add `attached' argument. Add process to
15131 (child_fetch_inferior_registers, child_store_inferior_registers):
15133 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15134 (win32_attach): Pass 1 to do_initial_child_stuff.
15135 (win32_kill): Adjust interface. Remove process from processes
15137 (win32_detach): Ditto.
15138 (win32_join): Adjust interface.
15139 (win32_thread_alive): Take a ptid.
15140 (win32_resume): Adjust to use ptids.
15141 (get_child_debug_event): Ditto.
15142 (win32_wait): Adjust interface. Remove exiting process from
15145 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15147 Non-stop mode support.
15149 * server.h (non_stop): Declare.
15150 (gdb_client_data, handler_func): Declare.
15151 (delete_file_handler, add_file_handler, start_event_loop):
15153 (handle_serial_event, handle_target_event, push_event)
15154 (putpkt_notif): Declare.
15155 * target.h (enum resume_kind): New.
15156 (struct thread_resume): Replace `step' field by `kind' field.
15157 (TARGET_WNOHANG): Define.
15158 (struct target_ops) <wait>: Add `options' argument.
15159 <supports_non_stop, async, start_non_stop>: New fields.
15160 (target_supports_non_stop, target_async): New.
15161 (start_non_stop): Declare.
15162 (mywait): Add `options' argument.
15163 * target.c (mywait): Add `options' argument. Print child exit
15164 notifications here.
15165 (start_non_stop): New.
15166 * server.c (non_stop, own_buf, mem_buf): New globals.
15167 (struct vstop_notif): New.
15168 (notif_queue): New global.
15169 (queue_stop_reply, push_event, discard_queued_stop_replies)
15170 (send_next_stop_reply): New.
15171 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15173 (attach_inferior): In non-stop mode, don't wait for the target
15175 (handle_general_set): Handle QNonStop.
15176 (handle_query): When handling qC, return the current general
15177 thread, instead of the first thread of the list.
15178 (handle_query): If the backend supports non-stop mode, include
15179 QNonStop+ in the qSupported query response.
15180 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15182 (handle_v_attach, handle_v_run): Handle non-stop mode.
15183 (handle_v_stopped): New.
15184 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15185 (myresume): Adjust to use resume_kind. Handle non-stop.
15186 (queue_stop_reply_callback): New.
15187 (handle_status): Handle non-stop mode.
15188 (main): Clear non_stop flag on reconnection. Use the event-loop.
15189 Refactor serial protocol handling from here ...
15190 (process_serial_event): ... to this new function. When GDB
15191 selects any thread, select one here. In non-stop mode, wait until
15192 GDB acks all pending events before exiting.
15193 (handle_serial_event, handle_target_event): New.
15194 * remote-utils.c (remote_open): Install remote_desc in the event
15196 (remote_close): Remove remote_desc from the event loop.
15197 (putpkt_binary): Rename to...
15198 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15199 (putpkt_binary): New as wrapper around putpkt_binary_1.
15200 (putpkt_notif): New.
15201 (prepare_resume_reply): In non-stop mode, don't change the
15203 * event-loop.c: New.
15204 * Makefile.in (OBJ): Add event-loop.o.
15205 (event-loop.o): New rule.
15207 * linux-low.h (pid_of): Moved here.
15209 (get_lwp_thread): Use lwpid_of.
15210 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15211 * linux-low.c (pid_of): Delete.
15212 (inferior_pid): Use lwpid_of.
15213 (linux_event_pipe): New.
15214 (target_is_async_p): New.
15216 (handle_extended_wait): Use lwpid_of.
15217 (add_lwp): Don't set lwpid field.
15218 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15219 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15220 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15221 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15222 first. Adjust to linux_wait_for_event interface changes. Use
15224 (linux_detach): Don't delete the main lwp here.
15225 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15226 (status_pending_p): Don't consider explicitly suspended lwps.
15227 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15228 pointer. Add OPTIONS argument. Change return type to int. Use
15229 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15230 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15231 pointer. Add status pointer argument. Return a pid instead of a
15232 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15233 changes. In non-stop mode, don't switch to a random thread.
15234 (linux_wait): Rename to...
15235 (linux_wait_1): ... this. Add target_options argument, and handle
15236 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15237 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15238 clean exit and signal exit code. Don't stop all threads in
15239 non-stop mode. In all-stop mode, only stop all threads when
15240 reporting a stop to GDB. Handle explicit thread stop requests.
15241 (async_file_flush, async_file_mark): New.
15243 (send_sigstop): Use lwpid_of.
15244 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15245 interface changes. In non-stop mode, don't switch to a random
15247 (linux_resume_one_lwp): Use lwpid_of.
15248 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15249 (linux_resume_one_thread): ... this. Handle resume_stop. In
15250 non-stop mode, don't look for pending flag in all threads.
15251 (resume_status_pending_p): Don't consider explicitly suspended
15253 (my_waitpid): Reimplement. Emulate __WALL.
15254 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15256 (sigchld_handler, linux_supports_non_stop, linux_async)
15257 (linux_start_non_stop): New.
15258 (linux_target_ops): Register linux_supports_non_stop, linux_async
15259 and linux_start_non_stop.
15260 (initialize_low): Install SIGCHLD handler.
15261 * thread-db.c (thread_db_create_event, find_one_thread)
15262 (thread_db_get_tls_address): Use lwpid_of.
15263 * win32-low.c (win32_detach): Adjust to use resume_kind.
15264 (win32_wait): Add `options' argument.
15265 * spu-low.c (spu_resume): Adjust to use resume_kind.
15266 (spu_wait): Add `options' argument.
15268 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15270 Decouple target code from remote protocol.
15272 * target.h (enum target_waitkind): New.
15273 (struct target_waitstatus): New.
15274 (struct target_ops) <wait>: Return an unsigned long. Take a
15275 target_waitstatus pointer instead of a char pointer.
15276 (mywait): Likewise.
15277 * target.c (mywait): Change prototype to return an unsigned long.
15278 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15279 * server.h (thread_from_wait, old_thread_from_wait): Delete
15281 (prepare_resume_reply): Change prototype to take a
15283 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15284 (last_status, last_ptid): New.
15285 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15286 pid instead of a signal.
15287 (attach_inferior): Remove "status" and "signal" parameters.
15289 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15291 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15292 (handle_v_requests, myresume): Remove "status" and "signal"
15293 parameters. Adjust.
15294 (handle_status): New.
15295 (main): Delete local `status'. Adjust.
15296 * remote-utils.c: Include target.h.
15297 (prepare_resume_reply): Change prototype to take a
15298 target_waitstatus. Adjust.
15300 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15302 * spu-low.c (spu_wait): Adjust.
15303 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15305 (win32_wait): Adjust.
15307 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15309 * target.h (struct thread_resume): Delete leave_stopped member.
15310 (struct target_ops): Add a `n' argument to the `resume' callback.
15311 * server.c (start_inferior): Adjust.
15312 (handle_v_cont, myresume): Adjust.
15313 * linux-low.c (check_removed_breakpoint): Adjust to resume
15314 interface change, and to removed leave_stopped field.
15315 (resume_ptr): Delete.
15316 (struct thread_resume_array): New.
15317 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15318 resume interface change.
15319 (linux_continue_one_thread, linux_queue_one_thread)
15320 (resume_status_pending_p): Check if the resume field is NULL
15321 instead of checking the leave_stopped member.
15322 (linux_resume): Adjust to the target resume interface change.
15323 * spu-low.c (spu_resume): Adjust to the target resume interface
15325 * win32-low.c (win32_detach, win32_resume): Ditto.
15327 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15329 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15331 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15333 (linux_continue_one_thread): Only preserve the stepping flag if
15334 there's a pending breakpoint.
15336 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15338 * server.c (main): After the inferior having exited, call
15339 remote_close before exiting gdbserver.
15341 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15343 Fix size of FPSCR in Power 7 processors.
15344 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15345 (PPC_FEATURE_HAS_DFP): New #define.
15346 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15349 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15351 * server.c (handle_query) Whitespace and formatting.
15353 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15355 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15356 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15357 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15358 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15359 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15360 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15361 Makefile.in, configure.ac: Fix whitespace throughout.
15362 * configure: Regenerate.
15364 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15366 * inferiors.c (find_inferior): Make it safe for the callback
15367 function to delete the currently iterated inferior.
15369 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15371 * Makefile.in (linuw_low_h): Move higher.
15372 (thread-db.o): Depend on $(linux_low_h).
15374 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15376 Rename "process" to "lwp" throughout.
15378 * linux-low.c (all_processes): Rename to...
15379 (all_lwps): ... this.
15380 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15381 (add_process): Rename to ...
15382 (add_lwp): ... this. Adjust.
15383 (linux_create_inferior): Adjust.
15384 (linux_attach_lwp): Adjust.
15385 (linux_attach): Adjust.
15386 (linux_kill_one_process): Rename to ...
15387 (linux_kill_one_lwp): ... this. Adjust.
15388 (linux_kill): Adjust.
15389 (linux_detach_one_process): Rename to ...
15390 (linux_detach_one_lwp): ... this. Adjust.
15391 (linux_detach): Adjust.
15392 (check_removed_breakpoint): Adjust.
15393 (status_pending_p): Adjust.
15394 (linux_wait_for_process): Rename to ...
15395 (linux_wait_for_lwp): ... this. Adjust.
15396 (linux_wait_for_event): Adjust.
15397 (send_sigstop): Adjust.
15398 (wait_for_sigstop): Adjust.
15399 (stop_all_processes): Rename to ...
15400 (stop_all_lwps): ... this.
15401 (linux_resume_one_process): Rename to ...
15402 (linux_resume_one_lwp): ... this. Adjust.
15403 (linux_set_resume_request, linux_continue_one_thread)
15404 (linux_queue_one_thread, resume_status_pending_p)
15405 (usr_store_inferior_registers, regsets_store_inferior_registers)
15406 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15408 * linux-low.h (get_process): Rename to ...
15409 (get_lwp): ... this. Adjust.
15410 (get_thread_process): Rename to ...
15411 (get_thread_lwp): ... this. Adjust.
15412 (get_process_thread): Rename to ...
15413 (get_lwp_thread): ... this. Adjust.
15414 (struct process_info): Rename to ...
15415 (struct lwp_info): ... this.
15416 (all_processes): Rename to ...
15417 (all_lwps): ... this.
15418 * proc-service.c (ps_lgetregs): Adjust.
15419 * thread-db.c (thread_db_create_event, find_one_thread)
15420 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15422 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15424 * server.c (handle_query): Handle "qAttached".
15426 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15428 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15429 GPLv3, update license URL.
15431 2009-03-01 Doug Evans <dje@google.com>
15433 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15434 (server_h): Add gdb_signals.h.
15435 (signals.o): Update.
15436 * server.h (target_signal_from_host,target_signal_to_host_p)
15437 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15439 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15441 * remote-utils.c (getpkt): Also generate remote-debug
15442 information if noack_mode is set.
15444 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15446 * server.c (handle_query): Report qXfer:siginfo:read and
15447 qXfer:siginfo:write as supported and handle them.
15448 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15449 * linux-low.c (linux_xfer_siginfo): New.
15450 (linux_target_ops): Set it.
15452 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15454 * server.c (gdbserver_usage): Mention --remote-debug.
15455 (main): Accept '--remote-debug' switch.
15457 2009-01-18 Doug Evans <dje@google.com>
15459 * regcache.c (new_register_cache): No need to check result of xcalloc.
15460 * server.c (handle_search_memory): Back out calls to xmalloc,
15461 result is checked and error is returned to user upon failure.
15462 (handle_query): Ditto. Add more checks for result of malloc.
15463 (handle_v_cont): Check result of malloc, report error back to
15465 (handle_v_run): Ditto. Call freeargv.
15466 * server.h (freeargv): Declare.
15467 * utils.c (freeargv): New fn.
15469 2009-01-15 Doug Evans <dje@google.com>
15471 * gdbreplay.c (perror_with_name): Make arg const char *.
15472 * server.h (target_signal_to_name): Make return type const char *.
15473 * thread-db.c (thread_db_err_str): Make return type const char *.
15474 * utils.c (perror_with_name): Make arg const char *.
15476 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15478 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15479 when handling a EXIT_PROCESS_DEBUG_EVENT.
15481 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15483 * gdbreplay.c (gdbreplay_version): Update copyright year.
15484 * server.c (gdbserver_version): Likewise.
15486 2009-01-05 Doug Evans <dje@google.com>
15488 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15489 (handle_extended_wait): Improve comment.
15491 2008-12-13 Doug Evans <dje@google.com>
15493 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15494 * server.h (ATTR_MALLOC): New macro.
15495 (xmalloc,xcalloc,xstrdup): Declare.
15496 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15497 * inferiors.c: Ditto.
15498 * linux-low.c: Ditto.
15499 * mem-break.c: Ditto.
15500 * regcache.c: Ditto.
15501 * remote-utils.c: Ditto.
15504 * win32-low.c: Ditto.
15506 2008-12-12 Doug Evans <dje@google.com>
15508 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15509 in debugging printf.
15511 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15513 2008-12-09 Doug Evans <dje@google.com>
15515 * linux-low.h (struct process_info): Delete member tid, unused.
15516 * thread-db.c (find_one_thread): Update.
15517 (maybe_attach_thread): Update.
15519 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15521 * target.h (struct target_ops): Add qxfer_osdata member.
15522 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15524 (linux_qxfer_osdata): New functions.
15525 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15527 * server.c (handle_query): Handle "qXfer:osdata:read:".
15528 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15529 (buffer_xml_printf): New functions.
15530 * server.h (struct buffer): New.
15531 (buffer_grow_str, buffer_grow_str0): New macros.
15532 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15533 (buffer_xml_printf): Declare.
15535 2008-11-24 Doug Evans <dje@google.com>
15537 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15539 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15541 * server.c (handle_v_run): Always use the supplied argument list.
15543 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15545 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15546 (xtensa_regmap_table): Add entry for scompare1.
15548 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15550 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15551 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15552 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15553 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15554 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15555 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15556 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15557 XML target descriptions.
15558 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15559 when inferior is running on an ISA 2.05 or later processor. Add
15560 special case to return offset for full 64-bit slot of FPSCR when
15563 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15565 * Makefile.in (SFILES, clean): Added sparc64 files.
15566 (reg-sparc64.o, reg-sparc64.c): New.
15567 * configure.srv (sparc*-*-linux*): New configuration.
15568 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15569 syscall arguments for SPARC.
15570 (regsets_store_inferior_registers): Likewise.
15571 * linux-sparc-low.c: New file.
15573 2008-10-21 Doug Evans <dje@google.com>
15575 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15576 (READLINE_DIR,READLINE_DEP): Delete.
15577 (INTERNAL_CFLAGS): Update.
15578 (LINTFLAGS): Update.
15580 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15582 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15583 whole argv from the last run, not just argv[0].
15585 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15587 * regcache.c (new_register_cache): Return NULL if the register
15588 cache size isn't known yet.
15589 (free_register_cache): Avoid dereferencing a NULL regcache.
15591 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15593 * configure.srv: Merge MIPS and MIPS64.
15595 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15597 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15599 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15601 * Makefile.in: Add required vsx dependencies.
15603 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15604 Declare init_registers_powerpc_vsx32l.
15605 Declare init_registers_powerpc_vsx64l.
15606 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15607 (ppc_arch_setup): Check for VSX in hwcap.
15608 (ppc_fill_vsxregset): New function.
15609 (ppc_store_vsxregset): New function.
15610 Add new VSX entry in regset_info target_regsets.
15612 * configure.srv: Add new VSX dependencies.
15614 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15616 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15617 (remote_open): Set or clear transport_is_reliable.
15618 (putpkt_binary): Don't expect acks in noack mode.
15619 (getpkt): Don't send ack/nac in noack mode.
15620 * server.c (handle_general_set): Handle QStartNoAckMode.
15621 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15623 (main): Reset noack_mode on every connection.
15624 * server.h (noack_mode): Declare.
15626 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15628 * Makefile.in (GDBREPLAY_OBS): New variable.
15629 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15631 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15632 Daniel Jacobowitz <dan@codesourcery.com>
15634 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15635 (usr_store_inferior_registers): Likewise.
15636 (regsets_store_inferior_registers): Likewise.
15638 2008-07-31 Rolf Jansen <rj@surtec.com>
15639 Pedro Alves <pedro@codesourcery.com>
15641 * configure.ac: Check for memmem declaration.
15642 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15643 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15644 (disable_packet_qfThreadInfo): Unconditionally compile.
15645 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15646 * configure, config.in: Regenerate.
15648 2008-07-28 Doug Kwan <dougkwan@google.com>
15650 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15651 (linux_write_memory): Remove declaration of errno.
15653 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15655 * linux-low.c (handle_extended_wait): Do not use "status"
15656 variable uninitialized.
15658 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15660 * server.c (handle_v_attach): Inhibit reporting dll changes.
15662 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15664 * remote-utils.c (prepare_resume_reply): If requested, don't
15665 output "thread:TID" in the T stop reply.
15667 * server.c (disable_packet_vCont, disable_packet_Tthread)
15668 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15669 (handle_query): If requested, disable support for qC, qfThreadInfo
15671 (handle_v_requests): If requested, disable support for vCont.
15672 (gdbserver_show_disableable): New.
15673 (main): Handle --disable-packet and --disable-packet=LIST.
15675 * server.h (disable_packet_vCont, disable_packet_Tthread)
15676 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15678 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15680 * server.c (gdbserver_usage): Mention --version.
15682 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15684 * Makefile.in (gdbreplay.o): New rule.
15686 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15688 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15689 message, not gdbserver.
15691 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15692 Nathan Sidwell <nathan@codesourcery.com>
15693 Joseph Myers <joseph@codesourcery.com>
15695 * acinclude.m4: Include ../../config/acx.m4.
15696 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15697 * configure, config.in: Regenerate.
15698 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15699 * server.c (gdbserver_version): Print PKGVERSION.
15700 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15701 (main): Adjust gdbserver_usage calls.
15702 * gdbreplay.c (version, host_name): Add declarations.
15703 (gdbreplay_version, gdbreplay_usage): New.
15704 (main): Accept --version and --help options.
15706 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15708 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15709 (arm_breakpoint_at): Handle Thumb.
15710 (the_low_target): Add comment.
15712 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15714 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15716 2008-05-09 Doug Evans <dje@google.com>
15718 * server.h (decode_search_memory_packet): Declare.
15719 * remote-utils.c (decode_search_memory_packet): New fn.
15720 * server.c (handle_search_memory_1): New fn.
15721 (handle_search_memory): New fn.
15722 (handle_query): Process qSearch:memory packets.
15724 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15726 * regcache.c (registers_length): Remove.
15727 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15728 full register packet.
15729 * regcache.h (registers_length): Remove prototype.
15730 * server.h (PBUFSIZ): Define to 16384.
15732 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15734 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15735 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15736 powerpc-64l.o, and powerpc-altivec64l.o.
15737 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15738 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15739 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15740 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15741 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15744 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15745 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15746 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15747 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15748 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15749 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15750 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15751 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15752 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15753 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15756 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15757 (init_registers_powerpc_32l): ... this new prototype.
15758 (init_registers_powerpc_32): Remove, replace by ...
15759 (init_registers_powerpc_altivec32l): ... this new prototype.
15760 (init_registers_powerpc_e500): Remove, replace by ...
15761 (init_registers_powerpc_e500l): ... this new prototype.
15762 (init_registers_ppc64): Remove, replace by ...
15763 (init_registers_powerpc_64l): ... this new prototype.
15764 (init_registers_powerpc_64): Remove, replace by ...
15765 (init_registers_powerpc_altivec64l): ... this new prototype.
15766 (ppc_num_regs): Set to 73.
15767 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15768 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15769 (ppc_cannot_store_register): Handle orig_r3 and trap.
15770 (ppc_arch_setup): Update init_registers_... calls.
15771 (ppc_fill_gregset): Handle orig_r3 and trap.
15773 * inferiors.c (clear_inferiors): Reset current_inferior.
15775 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15777 * acinclude.m4: Add override.m4.
15778 * configure: Regenerate.
15780 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15782 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15783 initial call to init_register_ppc64.
15785 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15787 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15788 single powerpc*-*-linux* case.
15789 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15791 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15793 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15794 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15796 * linux-ppc-low.c: Include <elf.h>.
15797 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15798 (ppc_hwcap): New global variable.
15799 (ppc_regmap): Remove __SPE__ #ifdef sections.
15800 (ppc_regmap_e500): New global variable.
15801 (ppc_cannot_store_register): Update __SPE__ special case.
15802 (ppc_get_hwcap): New function.
15803 (ppc_arch_setup): Use it to determine whether inferior supports
15804 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15805 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15806 Do not access registers if target does not support AltiVec.
15807 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15808 Do not access registers if target does not support SPE.
15809 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15811 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15813 * linux-low.c (disabled_regsets, num_regsets): New.
15814 (use_regsets_p): Delete.
15815 (linux_wait_for_process): Clear disabled_regsets.
15816 (regsets_fetch_inferior_registers): Check and set it.
15817 (regsets_store_inferior_registers): Likewise.
15818 (linux_fetch_registers, linux_store_registers): Do not use
15820 (initialize_low): Allocate disabled_regsets.
15822 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15824 * Makefile.in (LIBOBJS): New.
15825 (OBS): Use LIBOBJS.
15826 (memmem.o): New rule.
15827 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15828 * configure: Regenerated.
15830 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15832 * server.c (handle_query): Never return "unsupported" for
15833 qXfer:features:read queries.
15835 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15837 * server.c (get_features_xml): Fix inverted condition.
15838 (handle_query): Always support qXfer:feature:read.
15840 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15842 * server.c (wrapper_argv): New.
15843 (start_inferior): Handle wrapper_argv. If set, expect an extra
15845 (gdbserver_usage): Document --wrapper.
15846 (main): Parse --wrapper.
15848 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15850 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15851 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15852 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15853 (ppc_set_pc): Likewise.
15854 (ppc_arch_setup): New function.
15855 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15856 of collect_register.
15857 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15859 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15861 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15862 instead of linux-ppc64-low.o.
15863 * linux-ppc64-low.c: Remove file.
15864 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15865 (linux-ppc64-low.o): Remove rule.
15867 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15868 (init_registers_powerpc_64): Likewise.
15869 (ppc_regmap): Conditionally define depending on __powerpc64__.
15870 (ppc_cannot_store_register): Do not special-case "fpscr" when
15871 compiled on __powerpc64__.
15872 (ppc_collect_ptrace_register): New function.
15873 (ppc_supply_ptrace_register): New function.
15874 (ppc_breakpoint): Change type to "unsigned int".
15875 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15876 (the_low_target): Conditionally provide initializers for the
15877 arch_setup member depending on __powerpc64__. Install
15878 collect_ptrace_register and supply_ptrace_register members.
15880 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15882 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15883 * server.c (gdbserver_xmltarget): Define.
15884 (get_features_xml): Use it to replace "target.xml" and arch_string.
15886 * configure.srv: Remove srv_xmltarget. Add XML files that were
15887 mentioned there to srv_xmlfiles instead. Remove conditional tests
15888 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15889 srv_xmlfiles and srv_regobj to include all possible choices.
15890 * configure.ac (srv_xmltarget): Remove.
15891 (srv_xmlfiles): Do not add "target.xml".
15892 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15893 checks for supplementary target information.
15894 * configure: Regenerate.
15895 * Makefile.in (XML_TARGET): Remove.
15896 (target.xml): Remove rule.
15897 (clean): Do not clean up target.xml.
15898 (.PRECIOUS): Do not mention target.xml.
15900 * target.h (struct target_ops): Remove arch_string member.
15901 * linux-low.c (linux_arch_string): Remove.
15902 (linux_target_ops): Remove arch_string initializer.
15903 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15904 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15905 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15906 * spu-low.c (spu_arch_string): Remove.
15907 (spu_target_ops): Remove arch_string initializer.
15908 * win32-low.c (win32_arch_string): Remove.
15909 (win32_target_ops): Remove arch_string initializer.
15910 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15911 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15912 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15914 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15916 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15917 by collect_ptrace_register and supply_ptrace_register hooks.
15918 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15919 instead of checking for the_low_target.left_pad_xfer.
15920 (usr_store_inferior_registers): Use collect_ptrace_register callback
15921 instead of checking for the_low_target.left_pad_xfer.
15923 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15924 (s390_supply_ptrace_register): Likewise.
15925 (s390_fill_gregset): Call s390_collect_ptrace_register.
15926 (the_low_target): Update.
15928 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15929 (ppc_supply_ptrace_register): Likewise.
15930 (the_low_target): Update.
15932 * linux-i386-low.c (the_low_target): Update.
15933 * linux-x86-64-low.c (the_low_target): Update.
15935 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15937 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15938 reg-s390.o and reg-s390x.o.
15940 * linux-low.c (new_inferior): New global variable.
15941 (linux_create_inferior, linux_attach): Set it.
15942 (linux_wait_for_process): Call the_low_target.arch_setup after the
15943 target has stopped for the first time.
15944 (initialize_low): Do not call the_low_target.arch_setup.
15946 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15947 (s390_set_pc): Likewise.
15948 (s390_arch_setup): New function.
15949 (the_low_target): Use s390_arch_setup as arch_setup routine.
15951 * regcache.c (realloc_register_cache): New function.
15952 (set_register_cache): Call it for each existing regcache.
15954 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15956 * server.h (init_registers): Remove prototype.
15958 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15959 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15960 instead of init_registers ().
15961 * linux-arm-low.c (init_registers_arm): Add prototype.
15962 (init_registers_arm_with_iwmmxt): Likewise.
15963 (the_low_target): Add initializer for arch_setup field.
15964 * linux-cris-low.c (init_registers_cris): Add prototype.
15965 (the_low_target): Add initializer for arch_setup field.
15966 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15967 (the_low_target): Add initializer for arch_setup field.
15968 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15969 (the_low_target): Add initializer for arch_setup field.
15970 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15971 (the_low_target): Add initializer for arch_setup field.
15972 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15973 (the_low_target): Add initializer for arch_setup field.
15974 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15975 (the_low_target): Add initializer for arch_setup field.
15976 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15977 (init_registers_mips64_linux): Likewise.
15978 (the_low_target): Add initializer for arch_setup field.
15979 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15980 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15981 (the_low_target): Add initializer for arch_setup field.
15982 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15983 (init_registers_powerpc_64): Likewise.
15984 (the_low_target): Add initializer for arch_setup field.
15985 * linux-s390-low.c (init_registers_s390): Add prototype.
15986 (init_registers_s390x): Likewise.
15987 (the_low_target): Add initializer for arch_setup field.
15988 * linux-sh-low.c (init_registers_sh): Add prototype.
15989 (the_low_target): Add initializer for arch_setup field.
15990 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15991 (the_low_target): Add initializer for arch_setup field.
15992 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15993 (the_low_target): Add initializer for arch_setup field.
15995 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15996 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15997 instead of init_registers ().
15998 * win32-arm-low.c (init_registers_arm): Add prototype.
15999 (the_low_target): Add initializer for arch_setup field.
16000 * win32-i386-low.c (init_registers_i386): Add prototype.
16001 (the_low_target): Add initializer for arch_setup field.
16003 * spu-low.c (init_registers_spu): Add prototype.
16004 (initialize_low): Call initialie_registers_spu () instead of
16005 initialize_registers ().
16007 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16009 * server.c (handle_v_requests): When handling the vRun and vAttach
16010 packets, if already debugging a process, don't kill it. Return an
16013 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16015 * server.c (handle_query): Correct length check.
16017 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16019 * win32-low.c (do_initial_child_stuff): Add process handle
16020 parameter. Set current_process_handle and current_process_id from the
16021 parameters. Clear globals.
16022 (win32_create_inferior): Don't set current_process_handle and
16023 current_process_id here. Instead pass them on the call to
16024 do_initial_child_stuff.
16025 (win32_attach): Likewise.
16026 (win32_clear_inferiors): New.
16027 (win32_kill): Don't close the current process handle or the
16028 current thread handle here. Instead call win32_clear_inferiors.
16029 (win32_detach): Don't open a new handle to the process. Call
16030 win32_clear_inferiors.
16031 (win32_join): Don't rely on current_process_handle; open a new
16032 handle using the process id.
16033 (win32_wait): Call win32_clear_inferiors when the inferior process
16036 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16038 * server.c (monitor_show_help): Add "exit".
16040 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16042 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16043 (clean): Add reg-xtensa.c.
16044 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16045 * configure.srv (xtensa*-*-linux*) New target.
16046 * linux-xtensa-low.c: New.
16047 * xtensa-xtregs.c: New.
16049 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16051 * hostio.c: Don't include errno.h.
16052 (errno_to_fileio_errno): Move to hostio-errno.
16053 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16054 error number outputting to the target->hostio_last_error callback.
16055 (hostio_packet_error): Use FILEIO_EINVAL directly.
16056 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16057 calls to hostio_error.
16058 * hostio-errno.c: New.
16059 * server.h (hostio_last_error_from_errno): Declare.
16060 * target.h (target_ops): Add hostio_last_error member.
16061 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16062 as hostio_last_error handler.
16063 * spu-low.c (spu_target_ops): Likewise.
16064 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16065 (wince_hostio_last_error): New functions.
16066 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16067 as hostio_last_error handler.
16068 (win32_target_ops) [!_WIN32_WCE]: Register
16069 hostio_last_error_from_errno as hostio_last_error handler.
16070 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16071 (hostio-errno.o): New rule.
16072 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16073 * configure.srv (srv_hostio_err_objs): New variable. Default to
16075 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16076 * configure: Regenerate.
16078 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16080 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16081 (linux_kill, linux_detach): Clean up the process list.
16082 * remote-utils.c (remote_open): Improve port number parsing.
16083 (putpkt_binary, input_interrupt): Only send interrupts if the target
16085 * server.c (extended_protocol): Make static.
16086 (attached): Define earlier.
16087 (exit_requested, response_needed, program_argv): New variables.
16088 (target_running): New.
16089 (start_inferior): Clear attached here.
16090 (attach_inferior): Set attached here.
16091 (require_running): Define.
16092 (handle_query): Use require_running and target_running. Implement
16094 (handle_v_attach, handle_v_run): New.
16095 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16096 (gdbserver_usage): Update.
16097 (main): Redo argument parsing. Handle --debug and --multi. Handle
16098 --attach along with other options or after the port. Save
16099 program_argv. Support no initial program. Resynchronize
16100 communication with GDB after an error. Handle "monitor exit".
16101 Use require_running and target_running. Always allow the extended
16102 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16103 restart in extended mode.
16104 * README: Refer to the GDB manual. Update --attach usage.
16106 2007-12-20 Andreas Schwab <schwab@suse.de>
16108 * linux-low.c (STACK_SIZE): Define.
16109 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16110 (linux_test_for_tracefork): Likewise.
16112 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16114 * linux-low.c (linux_wait_for_event): Update messages. Do not
16115 reinsert auto-delete breakpoints.
16116 * mem-break.c (struct breakpoint): Change return type of handler to
16118 (set_breakpoint_at): Update handler type.
16119 (reinsert_breakpoint_handler): Return 1 instead of calling
16121 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16123 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16124 * mem-break.h (set_breakpoint_at): Update handler type.
16125 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16126 * win32-low.c (auto_delete_breakpoint): New.
16127 (get_child_debug_event): Use it.
16129 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16131 * configure.ac: Check for pread and pwrite.
16132 * hostio.c (handle_pread): Fall back to lseek and read.
16133 (handle_pwrite): Fall back to lseek and write.
16134 * config.in, configure: Regenerated.
16136 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16138 * server.c (myresume): Add own_buf argument.
16139 (main): Update calls.
16141 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16143 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16144 * remote-utils.c (remote_open): Do not call disable_async_io.
16145 (block_async_io): Delete.
16146 (unblock_async_io): Make static.
16147 (initialize_async_io): New.
16148 * server.c (handle_v_cont): Handle async I/O here.
16149 (myresume): Likewise. Move other common resume tasks here...
16150 (main): ... from here. Call initialize_async_io. Disable async
16151 I/O before the main loop.
16152 * server.h (initialize_async_io): Declare.
16153 (block_async_io, unblock_async_io): Delete prototypes.
16154 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16156 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16158 * remote-utils.c (readchar): Allow binary data in received messages.
16160 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16162 * win32-low.c (attaching): New global.
16163 (win32_create_inferior): Clear the `attaching' global.
16164 (win32_attach): Set the `attaching' global.
16165 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16166 attaching. Only set a breakpoint at the entry point if not
16169 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16171 * server.c (main): Don't report dll events on the initial
16172 connection on attaches.
16174 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16176 * server.c (main): Relax numerical bases supported for the pid of
16177 the --attach command line argument.
16179 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16181 * win32-low.c (win32_attach): Call OpenProcess before
16182 DebugActiveProcess, not after. Add last error output to error
16185 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16187 * win32-low.c (win32_get_thread_context)
16188 (win32_set_thread_context): New functions.
16189 (thread_rec): Use win32_get_thread_context.
16190 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16191 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16194 2007-12-03 Leo Zayas
16195 Pedro Alves <pedro_alves@portugalmail.pt>
16197 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16199 (child_add_thread): Minor cleanup.
16200 (child_continue): Resume artificially suspended threads before
16201 calling ContinueDebugEvent.
16202 (suspend_one_thread): New.
16203 (fake_breakpoint_event): New.
16204 (get_child_debug_event): Change return type to int. Check here if
16205 gdb sent an interrupt request. If a soft interrupt was requested,
16206 fake a breakpoint event. Return 0 if there is no event to handle,
16208 (win32_wait): Don't check here if gdb sent an interrupt request.
16209 Ensure there is a valid event to handle.
16210 (win32_request_interrupt): Add soft interruption method as last
16213 2007-12-03 Leo Zayas
16214 Pedro Alves <pedro_alves@portugalmail.pt>
16216 * win32-low.h (win32_thread_info): Add descriptions to the
16217 structure members. Replace `suspend_count' counter by a
16219 * win32-low.c (thread_rec): Update condition of when to get the
16220 context from the inferior. Rely on ContextFlags being set if it
16221 has already been retrieved. Only suspend the inferior thread if
16222 we haven't already. Warn if that fails.
16223 (continue_one_thread): s/suspend_count/suspended/. Only call
16224 ResumeThread once. Warn if that fails.
16226 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16228 * win32-low.c (win32_wait): Don't read from the inferior when it
16229 has already exited.
16231 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16233 * Makefile.in (win32_low_h): New variable.
16234 (win32-low.o): Add dependency on $(win32_low_h).
16235 (win32-arm-low.o, win32-i386-low.o): New rules.
16237 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16239 * hostio.c: Correct copyright year.
16241 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16243 * Makefile.in (OBS): Add hostio.o.
16244 (hostio.o): New rule.
16245 * server.h (handle_vFile): Declare.
16246 * hostio.c: New file.
16247 * server.c (handle_v_requests): Take packet_len and new_packet_len
16248 for binary packets. Call handle_vFile.
16249 (main): Update call to handle_v_requests.
16251 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16253 * linux-low.c: Include <sched.h>.
16255 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16257 * linux-low.c (linux_tracefork_grandchild): New.
16258 (linux_tracefork_child): Use clone.
16259 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16261 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16263 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16265 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16267 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16269 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16271 * inferiors.c (change_inferior_id): Delete.
16272 (add_pid_to_list, pull_pid_from_list): New.
16273 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16274 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16275 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16276 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16277 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16278 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16279 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16280 (using_threads): Always set to 1.
16281 (handle_extended_wait): New.
16282 (add_process): Do not set TID.
16283 (linux_create_inferior): Set must_set_ptrace_flags.
16284 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16285 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16286 (linux_thread_alive): Rename TID argument to LWPID.
16287 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16288 (linux_wait_for_event): Do not use TID or check using_threads. Update
16289 call to dead_thread_notify. Call handle_extended_wait.
16290 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16291 (send_sigstop): Delete sigstop_sent.
16292 (wait_for_sigstop): Avoid TID.
16293 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16294 (linux_test_for_tracefork): New.
16295 (linux_lookup_signals): Use thread_db_active and
16296 linux_supports_tracefork_flag.
16297 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16298 * linux-low.h (get_process_thread): Avoid TID.
16299 (struct process_ifo): Move thread_known and tid to the end. Remove
16301 (linux_attach_lwp, thread_db_init): Update prototypes.
16302 * server.h (change_inferior_id): Delete prototype.
16303 (add_pid_to_list, pull_pid_from_list): New prototypes.
16304 * thread-db.c (thread_db_use_events): New.
16305 (find_first_thread): Rename to...
16306 (find_one_thread): ...this. Update callers and messages. Do not
16307 call fatal. Check thread_db_use_events. Do not call
16308 change_inferior_id or new_thread_notify.
16309 (maybe_attach_thread): Update. Do not call new_thread_notify.
16310 (thread_db_init): Set thread_db_use_events. Check use_events.
16311 * utils.c (fatal, warning): Correct message prefix.
16313 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16315 * Makefile.in (clean): Remove new files.
16316 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16317 (powerpc-64.o, powerpc-64.c): New rules.
16318 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16319 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16321 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16323 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16324 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16325 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16326 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16327 (target_regsets): Add AltiVec and SPE register sets.
16328 * configure.ac: Check for AltiVec and SPE.
16329 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16330 (ppc_fill_vrregset, ppc_store_vrregset): New.
16331 (target_regsets): Add AltiVec register set.
16332 * configure: Regenerated.
16334 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16336 * linux-low.c (O_LARGEFILE): Define.
16337 (linux_read_memory): Use /proc/PID/mem.
16338 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16339 * configure, config.in: Regenerated.
16341 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16343 * linux-low.c (linux_wait_for_event): Do not pass signals while
16346 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16348 * win32-low.c (create_process): New.
16349 (win32_create_inferior): Use create_process instead of
16350 CreateProcess. If create_process failed retry appending an ".exe"
16351 suffix. Store the GetLastError result immediatelly after
16352 create_process calls and use it on the call to error.
16354 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16356 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16358 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16360 * configure.ac: Switch license to GPLv3.
16362 2007-08-01 Michael Snyder <msnyder@access-company.com>
16364 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16366 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16368 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16370 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16371 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16372 CloseToolhelp32Snapshot.
16373 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16374 CloseToolhelp32Snapshot.
16376 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16378 * server.c (main): Check for inferior exit before main loop.
16380 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16382 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16383 instead of on tmp_desc.
16385 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16386 Daniel Jacobowitz <dan@codesourcery.com>
16388 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16389 (add_thread): Minor cleanups.
16390 (clear_inferiors): Move lower in the file. Clear the DLL
16392 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16393 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16394 (xml_escape_text): New.
16395 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16397 (handle_v_cont): Report errors.
16398 (gdbserver_version): Update.
16399 (main): Correct size of own_buf. Do not report initial DLL events.
16400 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16401 (unloaded_dll, xml_escape_text): New.
16402 * win32-low.c (enum target_waitkind): Update comments.
16403 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16404 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16405 (win32_EnumProcessModules, win32_GetModuleInformation)
16406 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16407 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16408 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16409 (win32_Module32First, win32_Module32Next, load_toolhelp)
16410 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16411 (get_child_debug_event): Handle DLL events.
16412 (win32_wait): Likewise.
16414 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16416 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16417 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16419 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16421 * win32-low.c (handle_output_debug_string): Ignore event if not
16424 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16426 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16428 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16430 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16432 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16434 * inferiors.c (change_inferior_id): Add comment.
16435 * linux-low.c (check_removed_breakpoint): Add an early
16436 prototype. Improve debug output.
16437 (linux_attach): Doc update.
16438 (linux_detach_one_process, linux_detach): Clean up before releasing
16440 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16441 * linux-low.h (struct process_info): Doc improvement.
16442 * mem-break.c (delete_all_breakpoints): New.
16443 * mem-break.h (delete_all_breakpoints): New prototype.
16444 * thread-db.c (find_first_thread): New.
16445 (thread_db_create_event): Call it instead of
16446 thread_db_find_new_threads. Clean up unused variables.
16447 (maybe_attach_thread): Remove first thread handling.
16448 (thread_db_find_new_threads): Use find_first_thread.
16449 (thread_db_get_tls_address): Likewise.
16451 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16453 * thread-db.c (thread_db_find_new_threads): Add prototype.
16454 (thread_db_create_event): Check for the main thread before adding
16456 (maybe_attach_thread): Only enable event reporting if TID == 0.
16457 (thread_db_get_tls_address): Check for new threads.
16459 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16461 * linux-low.c (linux_create_inferior): Try execv before execvp.
16462 * spu-low.c (spu_create_inferior): Likewise.
16464 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16466 * linux-low.c (linux_create_inferior): Change execv to execvp.
16467 * spu-low.c (spu_create_inferior): Likewies.
16469 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16471 * Makefile.in (clean): Clean new files instead of deleted ones.
16472 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16473 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16475 * configure.srv: Specify XML files and new regformats for MIPS and
16477 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16478 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16479 an entry for the restart register.
16480 (mips_cannot_fetch_register, mips_cannot_store_register)
16481 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16482 register names to match the XML descriptions.
16483 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16484 restart register instead of $0.
16486 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16487 Markus Deuling <deuling@de.ibm.com>
16489 * remote-utils.c (decode_xfer_write): New function.
16490 * server.h (decode_xfer_write): Add prototype.
16491 * server.c (handle_query): Add PACKET_LEN argument. Support
16492 qXfer:spu:read and qXfer:spu:write packets.
16493 (main): Pass packet_len to handle_query.
16494 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16495 * target.h (target_ops): Add qxfer_spu.
16497 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16499 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16500 accessing non-seekable spufs files.
16502 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16504 * server.c (handle_query): Add reply for qC packet.
16506 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16507 Leo Zayas <lerele@champenstudios@com>
16509 * server.h (check_remote_input_interrupt_request): New function.
16510 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16511 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16512 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16513 (check_remote_input_interrupt_request): New function.
16514 * server.h (check_remote_input_interrupt_request): Declare.
16515 * win32-low.c (winapi_DebugBreakProcess,
16516 winapi_GenerateConsoleCtrlEvent): New typedefs.
16517 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16519 (win32_wait): Check for remote interrupt request
16520 with check_remote_input_interrupt_request.
16521 (win32_request_interrupt): New function.
16522 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16524 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16526 * win32-low.c (debug_registers_changed,
16527 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16528 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16529 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16530 (thread_rec): Get context using the low target.
16531 (child_add_thread): Call thread_added on the low target,
16532 which does the same thing.
16534 (do_initial_child_stuff): Remove debug registers references.
16535 Set context using the low target. Resume threads after
16536 setting the contexts.
16537 (child_continue): Remove dead variable. Remove debug
16538 registers references.
16539 (child_fetch_inferior_registers): Go through the low target.
16540 (do_child_store_inferior_registers): Remove.
16541 (child_store_inferior_registers): Go through the low target.
16542 (win32_resume): Remove debug registers references.
16543 Set context using the low target.
16544 (handle_exception): Change return type to void. Don't record
16545 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16546 first chance exception.
16547 (get_child_debug_event): Change return type to void. Remove
16548 goto loop. Always return after waiting for debug event.
16549 (win32_wait): Convert to switch statement. Handle spurious
16552 * win32-i386-low.c (debug_registers_changed,
16553 debug_registers_used): New.
16554 (initial_stuff): Rename to ...
16555 (i386_initial_stuff): ... this. Clear debug registers
16557 (store_debug_registers): Delete.
16558 (i386_get_thread_context): New.
16559 (load_debug_registers): Delete.
16560 (i386_set_thread_context): New.
16561 (i386_thread_added): New.
16562 (single_step): Rename to ...
16563 (i386_single_step): ... this.
16564 (do_fetch_inferior_registers): Rename to ...
16565 (i386_fetch_inferior_register): ... this.
16566 (i386_store_inferior_register): New.
16567 (the_low_target): Adapt to new interface.
16569 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16570 (arm_get_thread_context): New.
16571 (arm_set_thread_context): New.
16573 (do_fetch_inferior_registers): Rename to ...
16574 (arm_fetch_inferior_register): ... this.
16575 (arm_store_inferior_register): New.
16576 (arm_wince_breakpoint): Reimplement as unsigned long.
16577 (arm_wince_breakpoint_len): Define.
16578 (the_low_target): Adapt to new interface.
16580 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16581 load_debug_registers. Add get_thread_context, set_thread_context,
16582 thread_added and store_inferior_register. Rename
16583 fetch_inferior_registers to fetch_inferior_register.
16584 (regptr): Remove declaration.
16586 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16588 * linux-low.c (linux_detach): Change return type to int. Return 0.
16589 * spu-low.c (spu_detach): Likewise.
16591 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16593 * target.h (target_ops): Change return type of detach to int.
16595 (join_inferior): New.
16596 * server.c (main): Don't skip detach support on mingw32.
16597 If the inferior doesn't support detaching return error.
16598 Call join_inferior instead of using waitpid.
16599 * linux-low.c (linux_join): New.
16600 (linux_target_op): Add linux_join.
16601 * spu-low.c (spu_join): New.
16602 (spu_target_ops): Add spu_join.
16603 * win32-low.c (win32_detach): Adapt to new interface.
16604 Reopen current_process_handle before detaching. Issue a child
16605 resume before detaching.
16607 (win32_target_op): Add win32_join.
16609 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16611 * win32-low.c (win32-attach): Fix return value.
16612 * target.h (target_ops): Describe ATTACH return values.
16614 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16616 * win32-low.c (GETPROCADDRESS): Define.
16617 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16618 (winapi_DebugSetProcessKillOnExit): Likewise.
16619 (win32_create_inferior): Force usage of ansi CreateProcessA.
16620 (win32_attach): Use GETPROCADDRESS.
16621 (win32_detach): Likewise.
16623 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16625 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16627 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16629 * win32-low.c: Commit leftover changes from 2007-03-29.
16631 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16633 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16634 fields short instead of int. Add explicit padding.
16635 (i387_cache_to_fsave): Remove unnecessary casts.
16636 (i387_fsave_to_cache): Doc fix.
16637 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16639 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16641 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16642 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16644 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16646 * configure.srv (arm*-*-mingw32ce*): Move near the other
16649 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16651 * configure.ac: Add errno checking.
16652 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16653 sys/file.h and malloc.h.
16654 (AC_CHECK_DECLS): Add perror.
16655 (srv_mingwce): Handle.
16656 * configure.srv (i[34567]86-*-cygwin*): Add
16657 win32-i386-low.o to srv_tgtobj.
16658 (i[34567]86-*-mingw*): Likewise.
16659 (arm*-*-mingw32ce*): Add case.
16660 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16661 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16662 [__MINGW32CE__] (strerror): New function.
16663 [__MINGW32CE__] (errno): Define to GetLastError.
16664 [__MINGW32CE__] (COUNTOF): New macro.
16665 (remote_open): Remove extra close call.
16666 * mem-break.c (delete_breakpoint_at): New function.
16667 * mem-break.h (delete_breakpoint_at): Declare.
16668 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16669 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16670 [USE_WIN32API] (read, write): Add char* casts.
16671 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16672 * server.h: Include wincecompat.h on Windows CE.
16673 [HAVE_ERRNO_H]: Check.
16674 (perror): Declare if not declared.
16675 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16676 (perror_with_name): Remove errno declaration.
16677 * wincecompat.h: New.
16678 * wincecompat.c: New.
16679 * win32-low.h: New.
16680 * win32-arm-low.c: New.
16681 * win32-i386-low.c: New.
16682 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16683 (OUTMSG2): Make it safe.
16685 (COUNTOF): New macro.
16686 (NUM_REGS): Get it from the low target.
16687 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16688 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16689 (thread_rec): Let low target handle debug registers.
16690 (child_add_thread): Likewise.
16691 (child_init_thread_list): Likewise.
16692 (continue_one_thread): Likewise.
16694 (do_child_fetch_inferior_registers): Move to ...
16695 * win32-i386-low.c: ... here, and rename to ...
16696 (do_fetch_inferior_registers): ... this.
16697 * win32-low.c (child_fetch_inferior_registers):
16698 Go through the low target.
16699 (do_child_store_inferior_registers): Use regptr.
16700 (strwinerror): New function.
16701 (win32_create_inferior): Handle Windows CE.
16702 Use strwinerror instead of strerror on Windows error
16703 codes. Add program to the error output.
16704 Don't close the main thread handle on Windows CE.
16705 (win32_attach): Use coredll.dll on Windows CE.
16706 (win32_kill): Close current process and current
16708 (win32_detach): Use coredll.dll on Windows CE.
16709 (win32_resume): Let low target handle debug registers, and
16711 (handle_exception): Add/Remove initial breakpoint. Avoid
16712 non-existant WSTOPSIG on Windows CE.
16713 (win32_read_inferior_memory): Cast to remove warning.
16714 (win32_arch_string): Go through the low target.
16715 (initialize_low): Call set_breakpoint_data with the low
16716 target's breakpoint.
16717 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16718 FOP_REGNUM, mappings): Move to ...
16719 * win32-i386-low.c: ... here.
16720 * win32-low.c (win32_thread_info): Move to ...
16721 * win32-low.h: ... here.
16722 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16723 win32-arm-low.c and wincecompat.c.
16724 (all:): Add $EXEEXT.
16725 (install-only:): Likewise.
16726 (gdbserver:): Likewise.
16727 (gdbreplay:): Likewise.
16728 * config.in: Regenerate.
16729 * configure: Regenerate.
16731 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16733 * win32-low.c: Rename typedef thread_info to
16734 win32_thread_info throughout.
16736 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16738 * win32-i386-low.c: Rename to ...
16739 * win32-low.c: ... this.
16740 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16741 * Makefile.in: Likewise.
16743 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16745 * remote-utils.c (monitor_output): Constify msg parameter.
16746 * server.h (monitor_output): Likewise.
16747 * win32-i386-low.c (handle_output_debug_string): New.
16748 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16749 handle_output_debug_string.
16750 (get_child_debug_event): Likewise.
16752 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16754 * server.c (main): Correct strtoul check.
16756 2007-03-27 Jon Ringle <jon@ringle.org>
16758 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16760 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16762 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16764 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16766 * terminal.h: Check HAVE_SGTTY_H.
16768 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16770 * remote-utils.c (remote_open): Print out the assigned port number.
16772 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16774 * remote-utils.c (monitor_output): New function.
16775 * server.c (debug_threads): Define here.
16776 (monitor_show_help): New function.
16777 (handle_query): Handle qRcmd.
16778 (main): Do not handle 'd' packet.
16779 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16780 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16783 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16785 * Makefile.in (EXEEXT): New.
16786 (clean): Use $(EXEEXT).
16788 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16790 * target.h (target_ops): Rename send_signal to request_interrupt,
16791 and remove enum target_signal parameter.
16792 * linux-low.c (linux_request_interrupt): Rename from
16793 linux_send_signal, and always send SIGINT.
16794 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16795 and always send SIGINT.
16796 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16798 (input_interrupt): Likewise.
16800 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16802 * server.c (get_features_xml): Check if target implemented
16804 * win32-i386-low.c (win32_arch_string): New.
16805 (win32_target_ops): Add win32_arch_string as arch_string member.
16807 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16809 * spu-low.c (spu_arch_string): New.
16810 (spu_target_ops): Add spu_arch_string.
16812 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16814 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16815 * configure.ac: Do not check for terminal.h.
16816 * configure, config.in: Regenerated.
16818 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16820 * Makefile.in (OBS): Add $(XML_BUILTIN).
16821 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16823 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16824 (arm-with-iwmmxt.c): New.
16825 * config.in, configure: Regenerate.
16826 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16827 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16828 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16829 (arm*-*-linux*): Add iWMMXt and regset support.
16830 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16831 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16832 (arm_store_wmmxregset, target_regsets): New.
16833 * server.c (get_features_xml): Take annex argument. Check builtin
16835 (handle_query): Handle multiple annexes.
16837 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16839 * remote-utils.c [USE_WIN32API] (read, write): Define.
16840 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16843 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16845 * linux-i386-low.c (the_low_target): Set arch_string.
16846 * linux-x86-64-low.c (the_low_target): Likewise.
16847 * linux-low.c (linux_arch_string): New.
16848 (linux_target_ops): Add it.
16849 * linux-low.h (struct linux_target_ops): Add arch_string.
16850 * server.c (write_qxfer_response): Use const void * for DATA.
16851 (get_features_xml): New.
16852 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16853 * target.h (struct target_ops): Add arch_string method.
16855 2007-01-03 Denis Pilat <denis.pilat@st.com>
16856 Daniel Jacobowitz <dan@codesourcery.com>
16858 * linux-low.c (linux_kill): Handle being called with no threads.
16859 * win32-i386-low.c (win32_kill): Likewise.
16860 (get_child_debug_event): Clear current_process_handle.
16862 2006-12-30 Denis PILAT <denis.pilat@st.com>
16863 Daniel Jacobowitz <dan@codesourcery.com>
16865 * remote-utils.c (remote_open): Check the type of specified
16866 serial port devices before opening them.
16867 * server.c (main): Kill the inferior if an error occurs during
16868 the first remote_open.
16870 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16872 * README: Update supported targets.
16874 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16876 * Makefile.in (clean): Remove reg-mips64.c.
16877 (reg-mips64.c, reg-mips64.o): New rules.
16878 * configure.srv: Handle mips64. Include regset support for mips.
16879 * linux-mips-low.c (union mips_register): New.
16880 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16881 (mips_breakpoint, mips_breakpoint_at): Use int.
16882 (mips_collect_register, mips_supply_register)
16883 (mips_collect_register_32bit, mips_supply_register_32bit)
16884 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16885 (mips_store_fpregset, target_regsets): New.
16886 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16888 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16890 * configure.srv: Add target "spu*-*-*".
16891 * Makefile.in (clean): Remove reg-spu.c.
16892 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16893 * spu-low.c: New file.
16895 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16897 * configure.ac: Correct td_thr_tls_get_addr test.
16898 * configure: Regenerated.
16900 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16902 * linux-low.c (linux_wait_for_event): Reformat. Use the
16903 pass_signals array.
16904 * remote-utils.c (decode_address_to_semicolon): New.
16905 * server.c (pass_signals, handle_general_set): New.
16906 (handle_query): Mention QPassSignals for qSupported.
16907 (main): Call handle_general_set.
16908 * server.h (pass_signals, decode_address_to_semicolon): New.
16910 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16912 * server.c (handle_query): Correct error handling for read_auxv.
16914 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16916 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16917 and srv_linux_thread_db to yes.
16918 * linux-s390-low.c (s390_fill_gregset): New function.
16919 (target_regsets): Define data structure.
16921 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16923 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16924 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16925 * config.in, configure: Regenerated.
16926 * inferiors.c (gdb_id_to_thread): New function.
16927 (gdb_id_to_thread_id): Use it.
16928 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16929 * linux-low.h (struct process_info): Add th member.
16930 (thread_db_get_tls_address): New prototype.
16931 * remote-utils.c (decode_address): Make non-static.
16932 * server.c (handle_query): Handle qGetTLSAddr.
16933 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16934 * target.h (struct target_ops): Add get_tls_address.
16935 * thread-db.c (maybe_attach_thread): Save the thread handle.
16936 (thread_db_get_tls_address): New.
16938 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16940 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16941 (linux_resume_one_process): Take a siginfo_t *. Update all
16942 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16943 (struct pending_signals): Add a siginfo_t.
16944 (linux_wait_for_process): Always set last_status.
16945 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16946 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16947 * linux-low.h (struct process_info): Add last_status.
16949 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16951 * remote-utils.c (try_rle): New function.
16952 (putpkt_binary): Use it.
16954 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16956 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16957 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16958 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16959 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16960 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16963 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16965 * server.c (terminal_fd): New variable.
16966 (old_foreground_pgrp): Likewise.
16967 (restore_old_foreground_pgrp): New function.
16968 (start_inferior): Record the terminal file descriptor in terminal_fd
16969 and its original foreground group in old_foreground_pgrp. Register
16970 restore_old_foreground_pgrp with atexit().
16972 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16974 * server.c (handle_query): Correct qPart to qXfer.
16976 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16978 * configure.ac: Check for more headers which are missing on
16979 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16980 * configure.srv: Add Cygwin and mingw32.
16981 * remote-utils.c: Don't include headers unconditionally which
16982 are missing on mingw32. Include <winsock.h> for mingw32.
16983 (remote_open): Adjust for mingw32 support. Flush
16984 standard error after writing to it.
16985 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16986 (unblock_async_io, enable_async_io, disable_async_io)
16987 (readchar, getpkt): Update for Winsock support.
16988 (prepare_resume_reply): Expect a protocol signal number.
16989 * server.c: Disable <sys/wait.h> on mingw32.
16990 (start_inferior): Adjust for mingw32 support. Flush
16991 standard error after writing to it.
16992 (attach_inferior): Likewise. Use protocol signal
16994 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16996 * win32-i386-low.c: New file.
16997 * Makefile.in (XM_CLIBS): Set.
16998 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16999 (win32-i386-low.o): New dependency rule.
17000 * linux-low.c (linux_wait): Use target signal numbers.
17001 * target.h (struct target_ops): Doc fix.
17002 * server.h (target_signal_to_name): New prototype.
17003 * gdbreplay.c: Don't include headers unconditionally which
17004 are missing on mingw32. Include <winsock.h> for mingw32.
17005 (remote_close, remote_open): Adjust for Winsock support.
17006 * configure, config.in: Regenerated.
17008 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17010 * server.c (decode_xfer_read, write_qxfer_response): New.
17011 (handle_query): Take a packet length argument. Handle
17012 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17013 the qSupported response.
17014 (main): Update call to handle_query.
17016 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17018 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17019 (putpkt_binary): Renamed from putpkt and adjusted for binary
17021 (putpkt): New wrapper for putpkt_binary.
17022 (readchar): Don't mask off the high bit.
17023 (decode_X_packet): New function.
17024 * server.c (main): Call putpkt_binary if a handler sets the packet
17025 length. Save the length of the incoming packet. Handle 'X'.
17026 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17028 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17030 * server.c (handle_query): Handle qSupported.
17032 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17034 * remote-utils.c (all_symbols_looked_up): New variable.
17035 (look_up_one_symbol): Check it.
17036 * server.h (look_up_one_symbol): New declaration.
17037 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17039 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17041 * Makefile.in (linux-arm-low.o): Update dependencies.
17042 * linux-arm-low.c: Include "gdb_proc_service.h".
17043 (PTRACE_GET_THREAD_AREA): Define.
17044 (ps_get_thread_area): New function.
17046 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17048 * configure.srv (m68k*-*-uclinux*): New target.
17049 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17050 (linux_resume_one_process): Remove extraneous cast.
17051 (linux_read_offsets): New.
17052 (linux_target_op): Add linux_read_offsets on mmuless systems.
17053 * server.c (handle_query): Add qOffsets logic.
17054 * target.h (struct target_ops): Add read_offsets.
17056 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17058 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17059 (PTRACE_GET_THREAD_AREA): Define.
17060 (ps_get_thread_area): New function.
17061 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17062 (linux-x86-64-low.o): Update.
17064 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17066 * configure.ac: Remove checks for prfpregset_t.
17067 * gdb_proc_service.h: New file.
17068 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17069 new "gdb_proc_service.h".
17070 * proc-service.c: Likewise.
17071 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17072 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17073 * Makefile.in (gdb_proc_service_h): Updated.
17074 * configure, config.in: Regenerated.
17076 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17078 * remote-utils.c (prepare_resume_reply): Move declaration
17079 of gdb_id_from_wait to the top of the block.
17081 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17083 * linux-low.c (regsets_store_inferior_registers): Read the regset
17084 from the target before filling it.
17086 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17088 * server.c (attach_inferior): Return SIGTRAP for a successful
17091 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17093 * Makefile.in (OBS): Add version.o.
17094 (STAGESTUFF): Delete.
17095 (version.o): Add dependencies.
17096 (version.c): Replace rule.
17097 (clean): Remove version.c.
17098 * server.c (gdbserver_version): New.
17099 (gdbserver_usage): Use printf.
17100 (main): Handle --version and --help.
17101 * server.h (version, host_name): Add declarations.
17103 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17115 * linux-x86-64-low.c:
17117 * linux-s390-low.c:
17118 * linux-ppc64-low.c:
17120 * linux-mips-low.c:
17121 * linux-m68k-low.c:
17122 * linux-m32r-low.c:
17125 * linux-ia64-low.c:
17126 * linux-i386-low.c:
17127 * linux-crisv32-low.c:
17139 * gdbserver.1: Add (C) after Copyright. Update the FSF
17142 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17144 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17145 (arm_breakpoint_at): Recognize both breakpoints.
17146 (the_low_target): Use the correct breakpoint instruction.
17148 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17150 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17151 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17152 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17153 (the_low_target): Update.
17155 2005-10-25 Andreas Schwab <schwab@suse.de>
17157 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17159 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17160 (ia64_num_regs): Reduce to 462.
17162 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17164 * acinclude.m4: Correct quoting.
17165 * aclocal.m4: Regenerated.
17167 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17168 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17169 (thread_db_init): Call thread_db_err_str.
17170 * configure.ac: Check for TD_VERSION.
17171 * config.in, configure: Regenerated.
17173 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17175 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17177 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17179 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17180 is not available. Define HAVE_PTRACE_GETREGS if it is.
17181 * config.in, configure: Regenerated.
17182 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17183 * linux-i386-low.c, linux-m68k-low.c: Update to use
17184 HAVE_PTRACE_GETREGS.
17185 * linux-low.c (regsets_fetch_inferior_registers)
17186 (regsets_store_inferior_registers): Only return 0 if we processed
17188 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17189 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17191 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17193 * inferiors.c (struct thread_info): Add gdb_id.
17194 (add_thread): Add gdb_id argument.
17195 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17196 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17197 calls to add_thread.
17198 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17199 * server.c (handle_query): Use thread_to_gdb_id.
17200 (handle_v_cont, main): Use gdb_id_to_thread_id.
17201 * server.h (add_thread): Update prototype.
17202 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17205 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17207 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17208 left-padded registers.
17209 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17210 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17212 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17214 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17215 * configure: Regenerate.
17216 * config.in: Regenerate.
17217 * server.h (NEED_DECLARATION_STRERROR):
17218 Replace with !HAVE_DECL_STRERROR.
17220 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17222 * linux-low.c (linux_wait, linux_send_signal): Don't test
17223 an unsigned long variable for > 0 if it could be MAX_ULONG.
17224 * server.c (myresume): Likewise.
17225 * target.c (set_desired_inferior): Likewise.
17227 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17229 * configure.ac: Simplify and improve check for socklen_t.
17230 * configure, config.in: Regenerate.
17232 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17234 * acconfig.h: Remove.
17235 * configure.ac: Add a test for socklen_t. Use three-argument
17236 AC_DEFINE throughout.
17237 * config.in: Regenerated using autoheader 2.59.
17238 * configure: Regenerated.
17240 * gdbreplay.c (socklen_t): Provide a default.
17241 (remote_open): Use socklen_t.
17242 * remote-utils.c (socklen_t): Provide a default.
17243 (remote_open): Use socklen_t.
17244 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17247 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17249 * linux-low.c (linux_read_memory, linux_write_memory)
17250 (linux_read_auxv): Likewise.
17251 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17252 (check_mem_write): Likewise.
17253 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17255 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17256 (registers_from_string, register_data): Likewise.
17257 * server.c (handle_query, main): Likewise.
17258 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17259 (decode_M_packet): Likewise.
17260 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17261 * target.h (struct target_ops): Update read_memory, write_memory,
17263 (read_inferior_memory, write_inferior_memory): Update.
17264 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17265 to unsigned char *.
17266 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17267 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17268 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17269 linux-s390-low.c, linux-sh-low.c: Update for changes in
17270 read_inferior_memory and the_low_target->breakpoint.
17272 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17274 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17275 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17276 * configure.srv: Add powerpc64-*-linux*.
17277 * linux-ppc64-low.c: New file.
17279 2005-05-23 Orjan Friberg <orjanf@axis.com>
17281 * linux-cris-low.c: New file with support for CRIS.
17282 * linux-crisv32-low.c: Ditto for CRISv32.
17283 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17284 (clean): Add reg-cris.c and reg-crisv32.c.
17285 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17286 reg-crisv32.o, and reg-crisv32.c to make rules.
17287 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17288 recognized targets.
17290 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17292 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17293 of sizeof (PTRACE_XFER_TYPE).
17294 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17296 2005-05-12 Orjan Friberg <orjanf@axis.com>
17298 * target.h (struct target_ops): Add insert_watchpoint,
17299 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17300 pointers for hardware watchpoint support.
17301 * linux-low.h (struct linux_target_ops): Ditto.
17302 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17303 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17304 to linux_target_ops.
17305 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17307 * server.c (main): Recognize 'Z' and 'z' packets.
17309 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17311 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17312 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17313 (the_low_target): Add new members.
17315 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17317 * proc-service.c (ps_lgetregs): Search all_processes instead of
17320 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17322 * server.c (start_inferior): Change return type to int.
17323 (attach_inferior): Change sigptr to int *.
17324 (handle_v_cont, handle_v_requests): Change signal to int *.
17325 (main): Change signal to int.
17327 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17329 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17330 * configure.srv: Add m32r*-*-linux*.
17331 * linux-m32r-low.c: New file.
17333 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17335 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17337 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17339 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17340 Take unsigned long arguments for PIDs.
17341 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17342 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17343 (wait_for_sigstop, linux_resume_one_process)
17344 (regsets_fetch_inferior_registers, linux_send_signal)
17345 (linux_read_auxv): Likewise. Update the types of variables holding
17346 PIDs. Update format string specifiers.
17347 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17348 * remote-utils.c (prepare_resume_reply): Likewise.
17349 * server.c (cont_thread, general_thread, step_thread)
17350 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17352 (handle_query): Update format specifiers.
17353 (handle_v_cont, main): Use strtoul for thread IDs.
17354 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17355 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17356 (general_thread, step_thread, thread_from_wait)
17357 (old_thread_from_wait): Update.
17358 * target.h (struct thread_resume): Use unsigned long for THREAD.
17359 (struct target_ops): Use unsigned long for arguments to attach and
17362 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17364 * acinclude.m4: Include bfd/bfd.m4 directly.
17365 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17366 <agriffis@toolchain.org>.
17367 * aclocal.m4, configure: Regenerated.
17369 2005-01-07 Andrew Cagney <cagney@gnu.org>
17371 * configure.ac: Rename configure.in, require autoconf 2.59.
17372 * configure: Re-generate.
17374 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17376 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17377 LIBS when finished.
17378 * aclocal.m4: Regenerated.
17379 * configure: Regenerated.
17381 2004-11-21 Andreas Schwab <schwab@suse.de>
17383 * linux-m68k-low.c (m68k_num_gregs): Define.
17384 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17385 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17386 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17387 (m68k_breakpoint_at): New. Add to the_low_target.
17389 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17390 srv_linux_thread_db to yes.
17392 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17394 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17395 (ARCH_SET_FS): Likewise.
17396 (ARCH_GET_FS): Likewise.
17397 (ARCH_GET_GS): Likewise.
17399 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17401 * linux-i386-low.c (ps_get_thread_area): New.
17402 * linux-x86-64-low.c (ps_get_thread_area): New.
17403 * linux-low.c: Include <sys/syscall.h>.
17404 (linux_kill_one_process): Don't kill the first thread here.
17405 (linux_kill): Kill the first thread here.
17406 (kill_lwp): New function.
17407 (send_sigstop, linux_send_signal): Use it.
17408 * proc-service.c: Clean up #ifdefs.
17409 (fpregset_info): Delete.
17410 (ps_lgetregs): Update and enable implementation.
17411 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17413 * remote-utils.c (struct sym_cache, symbol_cache): New.
17414 (input_interrupt): Print a clearer message.
17415 (async_io_enabled): New variable.
17416 (enable_async_io, disable_async_io): Use it. Update comments.
17417 (look_up_one_symbol): Use the symbol cache.
17418 * thread-db.c (thread_db_look_up_symbols): New function.
17419 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17421 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17423 * configure.in: Test for -rdynamic.
17424 * configure: Regenerated.
17425 * Makefile (INTERNAL_LDFLAGS): New.
17426 (gdbserver, gdbreplay): Use it.
17428 2004-09-02 Andrew Cagney <cagney@gnu.org>
17430 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17432 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17434 * linux-low.c (linux_wait): Clear all_processes list also.
17436 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17438 * linux-low.c: Include <errno.h>. Remove extern declaration of
17441 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17443 * gdbreplay.c, server.h, utils.c: Update copyright years.
17445 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17447 * server.c (main): Print child status or termination signal from
17448 variable 'signal', not 'sig'.
17450 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17452 * linux-low.c (linux_read_memory): Change return type to
17453 int. Check for and return error from ptrace().
17454 * target.c (read_inferior_memory): Change return type to int. Pass
17455 back return status from the_target->read_memory().
17456 * target.h (struct target_ops): Adapt *read_memory() prototype.
17458 (read_inferior_memory): Adapt prototype.
17459 * server.c (main): Return an error packet if
17460 read_inferior_memory() returns an error.
17462 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17464 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17465 Unify with other clean targets.
17467 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17469 * server.c (handle_v_cont): Call set_desired_inferior.
17471 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17473 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17475 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17477 * linux-low.c (linux_wait): Unblock async I/O.
17478 (linux_resume): Block and enable async I/O.
17479 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17480 * server.h (block_async_io, unblock_async_io): Add prototypes.
17482 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17484 * remote-utils.c (remote_open): Print a status notice after
17485 opening a TCP port.
17486 * server.c (attach_inferior): Print a status notice after
17489 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17491 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17493 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17495 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17497 * server.c, target.h: Update copyright years.
17499 2004-02-25 Roland McGrath <roland@redhat.com>
17501 * target.h (struct target_ops): New member `read_auxv'.
17502 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17503 * linux-low.c (linux_read_auxv): New function.
17504 (linux_target_ops): Initialize `read_auxv' member to that.
17506 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17508 Committed by Jim Blandy <jimb@redhat.com>.
17510 * linux-s390-low.c (s390_num_regs): Update.
17511 (s390_regmap): Remove control registers. Use __s390x__ predefine
17512 instead of GPR_SIZE to distiguish s390 and s390x targets.
17514 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17516 * linux-low.c: Update copyright year.
17517 (check_removed_breakpoint): Clear pending_is_breakpoint.
17518 (linux_set_resume_request, linux_queue_one_thread)
17519 (resume_status_pending_p): New functions.
17520 (linux_continue_one_thread): Use process->resume.
17521 (linux_resume): Only resume threads if there are no pending events.
17522 * linux-low.h (struct process_info): Add resume request
17525 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17527 * regcache.c (new_register_cache): Clear the allocated register
17528 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17530 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17532 * linux-low.c (linux_resume): Take a struct thread_resume *
17534 (linux_wait): Update call.
17535 (resume_ptr): New static variable.
17536 (linux_continue_one_thread): Renamed from
17537 linux_continue_one_process. Use resume_ptr.
17538 (linux_resume): Use linux_continue_one_thread.
17539 * server.c (handle_v_cont, handle_v_requests): New functions.
17540 (myresume): New function.
17541 (main): Handle 'v' case.
17542 * target.h (struct thread_resume): New type.
17543 (struct target_ops): Change argument of "resume" to struct
17545 (myresume): Delete macro.
17547 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17549 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17550 (uninstall): Support DESTDIR.
17552 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17554 * configure.srv: Add xscale*linux copy of arm*linux entry.
17556 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17558 * linux-arm-low.c (arm_reinsert_addr): New function.
17559 (the_low_target): Add arm_reinsert_addr.
17561 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17563 * mem-break.c: Remove whitespace at end of file.
17565 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17567 * configure.in: Check whether we need to prototype strerror.
17568 * server.h: Optionally prototype strerror.
17569 * gdbreplay.c (perror_with_name): Use strerror.
17570 * linux-low.c (linux_attach_lwp): Use strerror.
17571 * utils.c (perror_with_name): Use strerror.
17572 * config.in, configure: Regenerated.
17574 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17576 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17577 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17579 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17581 * Makefile.in (SFILES): Update.
17582 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17583 low-sun3.c: Remove files.
17585 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17587 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17588 (linux_detach_one_process, linux_detach): New functions.
17589 (linux_target_ops): Add linux_detach.
17590 * server.c (main): Handle 'D' packet.
17591 * target.h (struct target_ops): Add "detach" member.
17592 (detach_inferior): Define.
17594 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17596 From Kelley Cook <kelleycook@wideopenwest.com>:
17597 * configure.srv: Accept i[34567]86 variants.
17599 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17601 * linux-low.c (linux_wait_for_event): Correct comment typos.
17602 (linux_resume_one_process): Call check_removed_breakpoint.
17603 (linux_send_signal): New function.
17604 (linux_target_ops): Add linux_send_signal.
17605 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17607 * target.h (struct target_ops): Add send_signal.
17609 2003-05-29 Jim Blandy <jimb@redhat.com>
17611 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17612 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17613 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17614 away part of the register's value.
17616 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17618 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17619 (linux_wait_for_event, linux_init_signals): Likewise.
17621 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17623 * configure.in: Check for stdlib.h.
17624 * configure: Regenerated.
17625 * config.in: Regenerated.
17627 2003-01-04 Andreas Schwab <schwab@suse.de>
17629 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17631 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17633 * Makefile.in: Remove obsolete code.
17635 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17637 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17638 defined(PT_FPR0_HI).
17640 2002-11-17 Stuart Hughes <seh@zee2.com>
17642 * linux-arm-low.c (arm_num_regs): Increase.
17643 (arm_regmap): Include status register.
17645 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17647 * linux-low.c (register_addr): Remove incorrect -1 check.
17649 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17651 * linux-low.c (linux_create_inferior): Call setpgid. Return
17653 (unstopped_p, linux_signal_pid): Remove.
17654 (linux_target_ops): Remove linux_signal_pid.
17655 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17656 global instead of target method.
17657 * target.h (struct target_ops): Remove signal_pid. Update comment
17658 for create_inferior.
17659 * server.c (signal_pid): New variable.
17660 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17661 gdbserver. Set the child to be the foreground process group.
17662 (attach_inferior): Set signal_pid.
17664 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17666 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17668 2002-08-20 Jim Blandy <jimb@redhat.com>
17670 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17673 2002-08-01 Andrew Cagney <cagney@redhat.com>
17675 * Makefile.in: Make chill references obsolete.
17677 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17679 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17680 * configure: Regenerate.
17681 * config.in: Regenerate.
17683 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17685 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17686 (perror_with_name, remote_close, remote_open, expect, play): Static.
17688 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17690 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17691 byte offsets instead of an array of indexes.
17692 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17694 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17696 * regcache.c: Add comment.
17698 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17700 * thread-db.c: New file.
17701 * proc-service.c: New file.
17702 * acinclude.m4: New file.
17703 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17704 proc-service.o, and thread-db.o.
17705 (linux-low.o): Add USE_THREAD_DB.
17706 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17707 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17708 * aclocal.m4: Regenerated.
17709 * config.in: Regenerated.
17710 * configure: Regenerated.
17711 * configure.in: Check for proc_service.h, sys/procfs.h,
17712 thread_db.h, and linux/elf.h headrs.
17713 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17714 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17715 Check for -lthread_db and thread support.
17716 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17717 PowerPC, and SuperH.
17718 * i387-fp.c: Constify arguments.
17719 * i387-fp.h: Likewise.
17720 * inferiors.c: (struct thread_info): Renamed from
17721 `struct inferior_info'. Remove PID member. Use generic inferior
17722 list header. All uses updated.
17723 (inferiors, signal_pid): Removed.
17724 (all_threads): New variable.
17725 (get_thread): Define.
17726 (add_inferior_to_list): New function.
17727 (for_each_inferior): New function.
17728 (change_inferior_id): New function.
17729 (add_inferior): Removed.
17730 (remove_inferior): New function.
17731 (add_thread): New function.
17732 (free_one_thread): New function.
17733 (remove_thread): New function.
17734 (clear_inferiors): Use for_each_inferior and free_one_thread.
17735 (find_inferior): New function.
17736 (find_inferior_id): New function.
17737 (inferior_target_data): Update argument type.
17738 (set_inferior_target_data): Likewise.
17739 (inferior_regcache_data): Likewise.
17740 (set_inferior_regcache_data): Likewise.
17741 * linux-low.c (linux_bp_reinsert): Remove.
17742 (all_processes, stopping_threads, using_thrads)
17743 (struct pending_signals, debug_threads, pid_of): New.
17744 (inferior_pid): Replace with macro.
17745 (struct inferior_linux_data): Remove.
17746 (get_stop_pc, add_process): New functions.
17747 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17748 Use add_process and add_thread.
17749 (linux_attach_lwp): New function, based on old linux_attach. Use
17750 add_process and add_thread. Set stop_expected for new threads.
17751 (linux_attach): New function.
17752 (linux_kill_one_process): New function.
17753 (linux_kill): Kill all LWPs.
17754 (linux_thread_alive): Use find_inferior_id.
17755 (check_removed_breakpoints, status_pending_p): New functions.
17756 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17757 Update. Use WNOHANG. Wait for cloned processes also. Update process
17758 struct for the found process.
17759 (linux_wait_for_event): New function.
17760 (linux_wait): Use it. Support LWPs.
17761 (send_sigstop, wait_for_sigstop, stop_all_processes)
17762 (linux_resume_one_process, linux_continue_one_process): New functions.
17763 (linux_resume): Support LWPs.
17764 (REGISTER_RAW_SIZE): Remove.
17765 (fetch_register): Use register_size instead. Call supply_register.
17766 (usr_store_inferior_registers): Likewise. Call collect_register.
17767 Fix recursive case.
17768 (regsets_fetch_inferior_registers): Improve error message.
17769 (regsets_store_inferior_registers): Add debugging.
17770 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17771 (unstopped_p, linux_signal_pid): New functions.
17772 (linux_target_ops): Add linux_signal_pid.
17773 (linux_init_signals): New function.
17774 (initialize_low): Call it. Initialize using_threads.
17775 * regcache.c (inferior_regcache_data): Add valid
17777 (get_regcache): Fetch registers lazily. Add fetch argument
17778 and update all callers.
17779 (regcache_invalidate_one, regcache_invalidate): New
17781 (new_register_cache): Renamed from create_register_cache.
17782 Return the new regcache.
17783 (free_register_cache): Change argument to a void *.
17784 (registers_to_string, registers_from_string): Call get_regcache
17785 with fetch flag set.
17786 (register_data): Make static. Pass fetch flag to get_regcache.
17787 (supply_register): Call get_regcache with fetch flag clear.
17788 (collect_register): Call get_regcache with fetch flag set.
17789 (collect_register_as_string): New function.
17790 * regcache.h: Update.
17791 * remote-utils.c (putpkt): Flush after debug output and use
17793 Handle input interrupts while waiting for an ACK.
17794 (input_interrupt): Use signal_pid method.
17795 (getpkt): Flush after debug output and use stderr.
17796 (outreg): Use collect_register_as_string.
17797 (new_thread_notify, dead_thread_notify): New functions.
17798 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17799 and general_thread.
17800 (look_up_one_symbol): Flush after debug output.
17801 * server.c (step_thread, server_waiting): New variables.
17802 (start_inferior): Don't use signal_pid. Update call to mywait.
17803 (attach_inferior): Update call to mywait.
17804 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17805 (main): Don't fetch/store registers explicitly. Use
17806 set_desired_inferior. Support proposed ``Hs'' packet. Update
17808 * server.h: Update.
17809 (struct inferior_list, struct_inferior_list_entry): New.
17810 * target.c (set_desired_inferior): New.
17811 (write_inferior_memory): Constify.
17812 (mywait): New function.
17813 * target.h: Update.
17814 (struct target_ops): New signal_pid method.
17815 (mywait): Removed macro, added prototype.
17817 * linux-low.h (regset_func): Removed.
17818 (regset_fill_func, regset_store_func): New.
17819 (enum regset_type): New.
17820 (struct regset_info): Add type field. Use new operation types.
17821 (struct linux_target_ops): stop_pc renamed to get_pc.
17822 Add decr_pc_after_break and breakpoint_at.
17823 (get_process, get_thread_proess, get_process_thread)
17824 (strut process_info, all_processes, linux_attach_lwp)
17825 (thread_db_init): New.
17827 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17828 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17829 (the_low_target): Add new members.
17830 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17831 (i386_store_fpxregset): Constify.
17832 (target_regsets): Add new kind identifier.
17833 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17834 (i386_set_pc): Add debugging.
17835 (i386_breakpoint_at): New function.
17836 (the_low_target): Add new members.
17837 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17838 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17839 (mips_breakpoint_at): New.
17840 (the_low_target): Add new members.
17841 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17842 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17843 (the_low_target): Add new members.
17844 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17845 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17846 (the_low_target): Add new members.
17847 * linux-x86-64-low.c (target_regsets): Add new kind
17850 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17852 From Martin Pool <mbp@samba.org>:
17853 * server.c (gdbserver_usage): New function.
17856 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17858 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17859 stop_at -> stop_pc.
17861 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17863 * Makefile.in: Remove obsolete code.
17865 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17867 * linux-low.c (regsets_fetch_inferior_registers),
17868 (regsets_store_inferior_registers): Removed cast to int from
17870 * regcache.h: Added declaration of struct inferior_info.
17872 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17874 * inferiors.c (struct inferior_info): Add regcache_data.
17875 (add_inferior): Call create_register_cache.
17876 (clear_inferiors): Call free_register_cache.
17877 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17878 * regcache.c (struct inferior_regcache_data): New.
17879 (registers): Remove.
17880 (get_regcache): New function.
17881 (create_register_cache, free_register_cache): New functions.
17882 (set_register_cache): Don't initialize the register cache here.
17883 (registers_to_string, registers_from_string, register_data): Call
17885 * regcache.h: Add prototypes.
17886 * server.h: Likewise.
17888 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17890 * mem-break.c: New file.
17891 * mem-break.h: New file.
17892 * Makefile.in: Add mem-break.o rule; update server.h
17894 * inferiors.c (struct inferior_info): Add target_data
17896 (clear_inferiors): Free target_data member if set.
17897 (inferior_target_data, set_inferior_target_data): New functions.
17898 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17899 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17900 * linux-low.c (linux_bp_reinsert): New variable.
17901 (struct inferior_linux_data): New.
17902 (linux_create_inferior): Use set_inferior_target_data.
17903 (linux_attach): Likewise. Call add_inferior.
17904 (linux_wait_for_one_inferior): New function.
17905 (linux_wait): Call it.
17906 (linux_write_memory): Add const.
17907 (initialize_low): Call set_breakpoint_data.
17908 * linux-low.h (struct linux_target_ops): Add breakpoint
17910 * server.c (attach_inferior): Remove extra add_inferior
17912 * server.h: Include mem-break.h. Update inferior.c
17914 * target.c (read_inferior_memory)
17915 (write_inferior_memory): New functions.
17916 * target.h (read_inferior_memory)
17917 (write_inferior_memory): Change macros to prototypes.
17918 (struct target_ops): Update comments. Add const to write_memory
17921 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17923 * linux-low.c (usr_store_inferior_registers): Support
17924 registers which are allowed to fail to store.
17925 * linux-low.h (linux_target_ops): Likewise.
17926 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17927 (ppc_cannot_store_register): FPSCR may not be storable.
17929 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17931 * server.h: Include <string.h> if HAVE_STRING_H.
17932 * ChangeLog: Correct paths in last ChangeLog entry.
17934 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17936 * linux-low.h: Remove obsolete prototypes.
17937 (struct linux_target_ops): New.
17938 (extern the_low_target): New.
17939 * linux-low.c (num_regs, regmap): Remove declarations.
17940 (register_addr): Use the_low_target explicitly.
17941 (fetch_register): Likewise.
17942 (usr_fetch_inferior_registers): Likewise.
17943 (usr_store_inferior_registers): Likewise.
17944 * linux-arm-low.c (num_regs): Remove.
17945 (arm_num_regs): Define.
17946 (arm_regmap): Renamed from regmap, made static.
17947 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17949 (arm_cannot_store_register): Renamed from cannot_store_register,
17951 (the_low_target): New.
17952 * linux-i386-low.c (num_regs): Remove.
17953 (i386_num_regs): Define.
17954 (i386_regmap): Renamed from regmap, made static.
17955 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17957 (i386_cannot_store_register): Renamed from cannot_store_register,
17959 (the_low_target): New.
17960 * linux-ia64-low.c (num_regs): Remove.
17961 (ia64_num_regs): Define.
17962 (ia64_regmap): Renamed from regmap, made static.
17963 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17965 (ia64_cannot_store_register): Renamed from cannot_store_register,
17967 (the_low_target): New.
17968 * linux-m68k-low.c (num_regs): Remove.
17969 (m68k_num_regs): Define.
17970 (m68k_regmap): Renamed from regmap, made static.
17971 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17973 (m68k_cannot_store_register): Renamed from cannot_store_register,
17975 (the_low_target): New.
17976 * linux-mips-low.c (num_regs): Remove.
17977 (mips_num_regs): Define.
17978 (mips_regmap): Renamed from regmap, made static.
17979 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17981 (mips_cannot_store_register): Renamed from cannot_store_register,
17983 (the_low_target): New.
17984 * linux-ppc-low.c (num_regs): Remove.
17985 (ppc_num_regs): Define.
17986 (ppc_regmap): Renamed from regmap, made static.
17987 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17989 (ppc_cannot_store_register): Renamed from cannot_store_register,
17991 (the_low_target): New.
17992 * linux-s390-low.c (num_regs): Remove.
17993 (s390_num_regs): Define.
17994 (s390_regmap): Renamed from regmap, made static.
17995 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17997 (s390_cannot_store_register): Renamed from cannot_store_register,
17999 (the_low_target): New.
18000 * linux-sh-low.c (num_regs): Remove.
18001 (sh_num_regs): Define.
18002 (sh_regmap): Renamed from regmap, made static.
18003 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18005 (sh_cannot_store_register): Renamed from cannot_store_register,
18007 (the_low_target): New.
18008 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18009 (the_low_target): New.
18011 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18013 * Makefile.in: Add stamp-h target.
18014 * configure.in: Create stamp-h.
18015 * configure: Regenerated.
18017 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18019 * inferiors.c: New file.
18020 * target.c: New file.
18021 * target.h: New file.
18022 * Makefile.in: Add target.o and inferiors.o. Update
18024 * linux-low.c (inferior_pid): New static variable,
18025 moved from server.c.
18026 (linux_create_inferior): Renamed from create_inferior.
18027 Call add_inferior. Return 0 on success instead of a PID.
18028 (linux_attach): Renamed from myattach.
18029 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18030 (linux_thread_alive): Renamed from mythread_alive.
18031 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18033 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18034 (regsets_store_inferior_registers): Correct error message.
18035 Add missing ``return 0''.
18036 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18037 (linux_store_registers): Renamed from store_inferior_registers.
18038 (linux_read_memory): Renamed from read_inferior_memory.
18039 (linux_write_memory): Renamed from write_inferior_memory.
18040 (linux_target_ops): New structure.
18041 (initialize_low): Call set_target_ops ().
18042 * remote-utils.c (unhexify): New function.
18043 (hexify): New function.
18044 (input_interrupt): Send signals to ``signal_pid''.
18045 * server.c (inferior_pid): Remove.
18046 (start_inferior): Update create_inferior call.
18047 (attach_inferior): Call add_inferior.
18048 (handle_query): New function.
18049 (main): Call handle_query for `q' packets.
18050 * server.h: Include "target.h". Remove obsolete prototypes.
18051 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18053 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18055 * Makefile.in: Add WARN_CFLAGS. Update configury
18057 * configure.in: Check for <string.h>
18058 * configure: Regenerate.
18059 * config.in: Regenerate.
18060 * gdbreplay.c: Include needed system headers.
18061 (remote_open): Remove strchr prototype.
18062 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18063 * regcache.c (supply_register): Change buf argument to const void *.
18064 (supply_register_by_name): Likewise.
18065 (collect_register): Change buf argument to void *.
18066 (collect_register_by_name): Likewise.
18067 * regcache.h: Add missing prototypes.
18068 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18069 * server.c (handle_query): New function.
18070 (attached): New static variable, moved out of main.
18071 (main): Quiet longjmp clobber warnings.
18072 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18073 * utils.c (error): Remove NORETURN.