aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-06-07 08:56:03 -0600
committerTom Tromey <tromey@adacore.com>2025-08-04 10:39:20 -0600
commit14de1447c9c52c1bfc52588f8652836f66ac6c47 (patch)
treed6bbaa3041c38883a6be7795395d03ca89e61e13 /gdb/breakpoint.h
parent595daae3c560483c179b3af8645e1fa12fb5e5dd (diff)
downloadbinutils-14de1447c9c52c1bfc52588f8652836f66ac6c47.zip
binutils-14de1447c9c52c1bfc52588f8652836f66ac6c47.tar.gz
binutils-14de1447c9c52c1bfc52588f8652836f66ac6c47.tar.bz2
Call target_can_do_single_step from maybe_software_singlestep
When the PikeOS osabi sniffer was added, Pedro suggested that a target could omit stepping from its vCont? reply packet to tell gdb that software single-step must be used: https://sourceware.org/legacy-ml/gdb-patches/2018-09/msg00312.html This patch implements this idea by moving the call to target_can_do_single_step into maybe_software_singlestep. I've also removed some FIXME comments from gdbarch_components.py, and slightly updated the documentation for gdbarch_software_single_step. I think these comments are somewhat obsolete now that target_can_do_single_step exists -- the current approach isn't exactly what the comments intended, but on the other hand, it exists and works. Following review comments from Andrew, this version changes record-full to use maybe_software_singlestep, and then combines maybe_software_singlestep with insert_single_step_breakpoint. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28440
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 9341112..e9201bc 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -1884,10 +1884,10 @@ extern void insert_single_step_breakpoint (struct gdbarch *,
const address_space *,
CORE_ADDR);
-/* Insert all software single step breakpoints for the current frame.
- Return true if any software single step breakpoints are inserted,
- otherwise, return false. */
-extern int insert_single_step_breakpoints (struct gdbarch *);
+/* Try to setup for software single stepping. Return true if
+ target_resume() should use hardware single step. GDBARCH is the
+ current gdbarch. */
+extern bool maybe_software_singlestep (struct gdbarch *);
/* Check whether any hardware watchpoints have triggered or not,
according to the target, and record it in each watchpoint's