aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat/linux-ptrace.h
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2024-04-17 18:20:35 +0100
committerPedro Alves <pedro@palves.net>2024-04-17 18:21:30 +0100
commit5739a1b98daf68fd81fed9af9667a2b9671928f9 (patch)
tree6ff71acf9b30c44b5977f5c320020e2ed165f359 /gdb/nat/linux-ptrace.h
parentc7d73a715775ade814370212726d50ab4b7c6fe0 (diff)
downloadgdb-5739a1b98daf68fd81fed9af9667a2b9671928f9.zip
gdb-5739a1b98daf68fd81fed9af9667a2b9671928f9.tar.gz
gdb-5739a1b98daf68fd81fed9af9667a2b9671928f9.tar.bz2
gdb+gdbserver/Linux: Remove USE_SIGTRAP_SIGINFO fallback
It's been over 9 years (since commit faf09f0119da) since Linux GDB and GDBserver started relying on SIGTRAP si_code to tell whether a breakpoint triggered, which is important for non-stop mode. When that then-new code was added, I had left the then-old code as fallback, in case some architectured still needed it. Given AFAIK there haven't been complaints since, this commit finally removes the fallback code, along with USE_SIGTRAP_SIGINFO. Change-Id: I140a5333a9fe70e90dbd186aca1f081549b2e63d
Diffstat (limited to 'gdb/nat/linux-ptrace.h')
-rw-r--r--gdb/nat/linux-ptrace.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
index a268432..a3b4ca8 100644
--- a/gdb/nat/linux-ptrace.h
+++ b/gdb/nat/linux-ptrace.h
@@ -95,9 +95,9 @@
#define __WALL 0x40000000 /* Wait for any child. */
#endif
-/* True if whether a breakpoint/watchpoint triggered can be determined
- from the si_code of SIGTRAP's siginfo_t (TRAP_BRKPT/TRAP_HWBKPT).
- That is, if the kernel can tell us whether the thread executed a
+/* Whether a breakpoint/watchpoint triggered can be determined from
+ the si_code of SIGTRAP's siginfo_t (TRAP_BRKPT/TRAP_HWBKPT). That
+ is, since the kernel can tell us whether the thread executed a
software breakpoint, we trust it. The kernel will be determining
that from the hardware (e.g., from which exception was raised in
the CPU). Relying on whether a breakpoint is planted in memory at
@@ -110,10 +110,7 @@
architectures. The moribund location mechanism helps with that
somewhat but it is an heuristic, and can well fail. Getting that
information out of the kernel and ultimately out of the CPU is the
- way to go. That said, some architecture may get the si_code wrong,
- and as such we're leaving fallback code in place. We'll remove
- this after a while if no problem is reported. */
-#define USE_SIGTRAP_SIGINFO 1
+ way to go. */
/* The x86 kernel gets some of the si_code values backwards, like
this: