aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/jmp_buf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/i386/jmp_buf.h b/sysdeps/i386/jmp_buf.h
index 7686c4d2..7949883 100644
--- a/sysdeps/i386/jmp_buf.h
+++ b/sysdeps/i386/jmp_buf.h
@@ -7,3 +7,8 @@ typedef struct
__ptr_t __sp;
__ptr_t __pc;
} __jmp_buf[1];
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((__ptr_t) (address) < (jmpbuf)[0].__sp)