2006-01-10 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@gnu.org>
Tue, 10 Jan 2006 08:43:32 +0000 (08:43 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 10 Jan 2006 08:43:32 +0000 (08:43 +0000)
* 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/.

sysdeps/alpha/jmpbuf-unwind.h
sysdeps/mips/jmpbuf-unwind.h

index ca445f8..1faa16f 100644 (file)
 #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)
 
index 1ff8fc8..bfa1a64 100644 (file)
 #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)