aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-fbsd-nat.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-01-28 11:14:37 -0800
committerJohn Baldwin <jhb@FreeBSD.org>2022-01-28 11:14:37 -0800
commit5046f3c8c0cf0a641f25cf0b3f6e3a6969f28dd8 (patch)
tree8da64e4dd784788c5e5d442caa777ef6ff646858 /gdb/amd64-fbsd-nat.c
parentbf84b776bda0945300f40432580156af99c000f6 (diff)
downloadgdb-5046f3c8c0cf0a641f25cf0b3f6e3a6969f28dd8.zip
gdb-5046f3c8c0cf0a641f25cf0b3f6e3a6969f28dd8.tar.gz
gdb-5046f3c8c0cf0a641f25cf0b3f6e3a6969f28dd8.tar.bz2
FreeBSD x86: Remove fallback for detecting signal trampolines by address.
A few FreeBSD releases did not include the page holding the signal code in core dumps. As a workaround, a sysctl was used to fetch the default location of the signal code instead. The youngest affected FreeBSD release is 10.1 released in November 2014 and EOLed in December 2016. The fallback only works for native processes and would require a separate unwinder once the FreeBSD arches are converted to use tramp_frame for signal frames.
Diffstat (limited to 'gdb/amd64-fbsd-nat.c')
-rw-r--r--gdb/amd64-fbsd-nat.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/gdb/amd64-fbsd-nat.c b/gdb/amd64-fbsd-nat.c
index 376e1ff..3c79a40 100644
--- a/gdb/amd64-fbsd-nat.c
+++ b/gdb/amd64-fbsd-nat.c
@@ -278,32 +278,4 @@ Please report this to <bug-gdb@gnu.org>."),
}
SC_RBP_OFFSET = offset;
-
-#ifdef KERN_PROC_SIGTRAMP
- /* Normally signal frames are detected via amd64fbsd_sigtramp_p.
- However, FreeBSD 9.2 through 10.1 do not include the page holding
- the signal code in core dumps. These releases do provide a
- kern.proc.sigtramp.<pid> sysctl that returns the location of the
- signal trampoline for a running process. We fetch the location
- of the current (gdb) process and use this to identify signal
- frames in core dumps from these releases. Note that this only
- works for core dumps of 64-bit (FreeBSD/amd64) processes and does
- not handle core dumps of 32-bit (FreeBSD/i386) processes. */
- {
- int mib[4];
- struct kinfo_sigtramp kst;
- size_t len;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = KERN_PROC_SIGTRAMP;
- mib[3] = getpid ();
- len = sizeof (kst);
- if (sysctl (mib, 4, &kst, &len, NULL, 0) == 0)
- {
- amd64fbsd_sigtramp_start_addr = (uintptr_t) kst.ksigtramp_start;
- amd64fbsd_sigtramp_end_addr = (uintptr_t) kst.ksigtramp_end;
- }
- }
-#endif
}