aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-01-10 08:43:32 +0000
committerRoland McGrath <roland@gnu.org>2006-01-10 08:43:32 +0000
commitb0d5e44dc441fafe1863f5998887e16a5de69fd6 (patch)
tree16296280bf588a71f9fdc6cbf91dd8dc5b9444c3
parentf509f30808a482dc5cec2ddfbf63fb4331827852 (diff)
downloadglibc-b0d5e44dc441fafe1863f5998887e16a5de69fd6.tar.xz
glibc-b0d5e44dc441fafe1863f5998887e16a5de69fd6.zip
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/. * sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/.
-rw-r--r--sysdeps/alpha/jmpbuf-unwind.h5
-rw-r--r--sysdeps/mips/jmpbuf-unwind.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h
index ca445f8d24..1faa16fba4 100644
--- a/sysdeps/alpha/jmpbuf-unwind.h
+++ b/sysdeps/alpha/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h
index 1ff8fc8957..bfa1a64537 100644
--- a/sysdeps/mips/jmpbuf-unwind.h
+++ b/sysdeps/mips/jmpbuf-unwind.h
@@ -21,6 +21,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)