From: guenther Date: Sun, 9 Apr 2017 21:32:42 +0000 (+0000) Subject: Sync symbol lists for trap/interrupt frame detection with what ddb(4) uses X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3d335f2b9836aa2e22adfcbcba04787e3c4633e4;p=openbsd Sync symbol lists for trap/interrupt frame detection with what ddb(4) uses ok deraadt@ --- diff --git a/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c b/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c index ee822a1f296..2106e00ee70 100644 --- a/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c +++ b/gnu/usr.bin/binutils/gdb/amd64obsd-tdep.c @@ -370,7 +370,11 @@ amd64obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache) sp = frame_unwind_register_unsigned (next_frame, AMD64_RSP_REGNUM); find_pc_partial_function (func, &name, NULL, NULL); - if (name && strncmp(name, "Xintr", 5) == 0) + if (name && ((strncmp(name, "Xintr", 5) == 0) + || (strncmp (name, "Xresume", 7) == 0) + || (strncmp (name, "Xrecurse", 8) == 0) + || (strcmp (name, "Xdoreti") == 0) + || (strncmp (name, "Xsoft", 5) == 0))) addr = sp + 8; /* It's an interrupt frame. */ else addr = sp; @@ -435,9 +439,12 @@ amd64obsd_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, "osyscall1") == 0) || (strcmp (name, "Xsyscall") == 0) - || (strncmp (name, "Xintr", 5) == 0))); + || (strncmp (name, "Xintr", 5) == 0) + || (strncmp (name, "Xresume", 7) == 0) + || (strncmp (name, "Xrecurse", 8) == 0) + || (strcmp (name, "Xdoreti") == 0) + || (strncmp (name, "Xsoft", 5) == 0))); } static const struct frame_unwind amd64obsd_trapframe_unwind = { diff --git a/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c b/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c index 923e88932e7..02a3653375d 100644 --- a/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c +++ b/gnu/usr.bin/binutils/gdb/i386obsd-tdep.c @@ -361,7 +361,13 @@ i386obsd_trapframe_cache(struct frame_info *next_frame, void **this_cache) sp = frame_unwind_register_unsigned (next_frame, I386_ESP_REGNUM); find_pc_partial_function (func, &name, NULL, NULL); - if (name && strncmp (name, "Xintr", 5) == 0) + if (name && (strncmp (name, "Xintr", 5) == 0 + || strncmp (name, "Xresume", 7) == 0 + || strncmp (name, "Xstray", 6) == 0 + || strncmp (name, "Xhold", 5) == 0 + || strncmp (name, "Xrecurse", 8) == 0 + || strcmp (name, "Xdoreti") == 0 + || strncmp (name, "Xsoft", 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. */ @@ -432,8 +438,12 @@ 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, "Xresume", 7) == 0 + || strncmp (name, "Xstray", 6) == 0 + || strncmp (name, "Xhold", 5) == 0 + || strncmp (name, "Xrecurse", 8) == 0 + || strcmp (name, "Xdoreti") == 0 || strncmp (name, "Xsoft", 5) == 0)); }