diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-07-12 08:57:36 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-07-12 08:57:36 +0000 |
commit | 6892ec153538b7311bf1e170e78ebaf1366e9519 (patch) | |
tree | 2b3b2a70498fba9a3d80a8f4cd573eca5fcc006f /gnu | |
parent | d1a4c4ce93fc0b8cefe98f308f0903c61fbfaa37 (diff) |
On i386 gdb failed to display the stack trace of a kernel core dump
correctly. The gdb backtrace command did not get over the trap
stack frame. There is a pushl %esp in alltraps() that was not
accounted for. Depending on wheter the analyzed kernel has debugging
symbols or not, the symbol is calltrap or alltraps. Both get special
treatment now.
ok miod@ kettenis@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/i386obsd-tdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c b/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c index 76f4d8f16f2..923e88932e7 100644 --- a/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c +++ b/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c @@ -363,6 +363,10 @@ i386obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache) find_pc_partial_function (func, &name, NULL, NULL); if (name && strncmp (name, "Xintr", 5) == 0) addr = sp + 8; /* It's an interrupt frame. */ + else if (name && strcmp (name, "alltraps") == 0) + addr = sp + 4; /* It's a trap frame. */ + else if (name && strcmp (name, "calltrap") == 0) + addr = sp + 4; /* It's a trap frame with debug symbols. */ else addr = sp; @@ -427,6 +431,7 @@ i386obsd_trapframe_sniffer (const struct frame_unwind *self, find_pc_partial_function (frame_pc_unwind (next_frame), &name, NULL, NULL); return (name && (strcmp (name, "calltrap") == 0 + || strcmp (name, "alltraps") == 0 || strcmp (name, "syscall1") == 0 || strncmp (name, "Xintr", 5) == 0 || strncmp (name, "Xsoft", 5) == 0)); |