(PTR_MANGLE): Fix cast.
* sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
DEMANGLE, and pass SP value through it.
* sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise.
* sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline
demangler function to _JMPBUF_UNWINDS.
* sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function.
(_longjmp_unwind): Pass it to _JMPBUF_UNWINDS.
2005-12-27 Roland McGrath <roland@redhat.com>
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+ (PTR_MANGLE): Fix cast.
+
+ * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
+ DEMANGLE, and pass SP value through it.
+ * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise.
+ * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline
+ demangler function to _JMPBUF_UNWINDS.
+ * sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function.
+ (_longjmp_unwind): Pass it to _JMPBUF_UNWINDS.
+
* posix/tst-execle1.c (do_test): Add a const.
* posix/tst-execle2.c (do_test): Likewise.
struct hurd_userlink *link;
+ inline uintptr_t demangle_ptr (uintptr_t x)
+ {
+# ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (x);
+# endif
+ return x;
+ }
+
/* Continue _longjmp_unwind's job of running the unwind
forms for frames being unwound, since we will not
return to its loop like this one, which called us. */
for (link = ss->active_resources;
- link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link);
+ link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link, demangle_ptr);
link = link->thread.next)
if (_hurd_userlink_unlink (link))
{
+2005-12-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
+ (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
+ * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
+ * sysdeps/i386/jmpbuf-unwind.h: Likewise.
+ * sysdeps/mips/jmpbuf-unwind.h: Likewise.
+ * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
+ * sysdeps/s390/jmpbuf-unwind.h: Likewise.
+ * sysdeps/sh/jmpbuf-unwind.h: Likewise.
+ * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
+ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
+
2005-12-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal longjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_GPR1];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <stdint.h>
#include <unwind.h>
#include <bits/wordsize.h>
+#include <sysdep.h>
/* On s390{,x}, CFA is always 96 (resp. 160) bytes above actual
%r15. */
(void *) (_Unwind_GetCFA (_context) \
- 32 - 2 * __WORDSIZE), _adj)
-#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) \
- < (uintptr_t) (_jmpbuf)->__gregs[__JB_GPR15] - (_adj))
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__gregs[__JB_GPR15];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal longjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
- ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__regs[7];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].uc_mcontext.mc_fp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].uc_mcontext.mc_fp - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <stdint.h>
#include <unwind.h>
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- ({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \
- (_cfa < (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
- || (_cfa == (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
- && (uintptr_t) _Unwind_GetBSP (_context) - (_adj) \
- >= (uintptr_t)(((long *)(_jmpbuf))[17]) - (_adj))); \
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs, int i)
+{
+ uintptr_t sp = ((unsigned long int *) regs)[i];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ ({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \
+ (_cfa < _jmpbuf_sp (_jmpbuf, 0) - (_adj) \
+ || (_cfa == (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
+ && ((uintptr_t) _Unwind_GetBSP (_context) - (_adj) \
+ >= _jmpbuf_sp (_jmpbuf, 17) - (_adj)))); \
})
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_RSP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1997, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
#endif
#endif /* bits/setjmp.h */
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *) (_address) > \
+ (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
#endif /* bits/setjmp.h */
-/* Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
#endif /* bits/setjmp.h */
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__sp)
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
#endif /* bits/setjmp.h */
/* _longjmp_unwind -- Clean up stack frames unwound by longjmp. Hurd version.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#error "<bits/setjmp.h> fails to define _JMPBUF_UNWINDS"
#endif
+static inline uintptr_t
+demangle_ptr (uintptr_t x)
+{
+# ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (x);
+# endif
+ return x;
+}
+
/* This function is called by `longjmp' (with its arguments) to restore
active resources to a sane state before the frames code using them are
jumped out of. */
/* Remove local signal preemptors being unwound past. */
while (ss->preemptors &&
- _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors))
+ _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr))
ss->preemptors = ss->preemptors->next;
__spin_unlock (&ss->lock);
in stack frames being unwound by this jump. */
for (link = ss->active_resources;
- link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link);
+ link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link, demangle_ptr);
link = link->thread.next)
/* Remove this link from the resource's users list,
since the frame using the resource is being unwound.
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__sp)
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
#endif /* _MIPS_BITS_SETJMP_H */
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1]))
#endif /* bits/setjmp.h */
-/* Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__gregs[__JB_GPR15])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__gregs[__JB_GPR15]))
#endif /* __S390_SETJMP_H__ */
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__regs[7]))
#endif /* bits/setjmp.h */
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((int) (address) < (jmpbuf)[JB_SP])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((int) (address) < demangle ((jmpbuf)[JB_SP]))
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *) (_address) < (void *) demangle (((long int *) _jmpbuf)[0]))
#endif /* bits/setjmp.h */
# define PTR_DEMANGLE(reg, tmpreg) PTR_MANGLE (reg, tmpreg)
# else
# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
# define PTR_DEMANGLE(var) PTR_MANGLE (var)
# endif
#endif
-/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2000,2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((unsigned long int) (address) < demangle ((jmpbuf)->uc_mcontext.mc_fp))
#else
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((int) (address) < (jmpbuf)[JB_SP])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((int) (address) < demangle ((jmpbuf)[JB_SP]))
#endif
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
# if __WORDSIZE == 64
-# define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
+# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
# else
-# define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_SP])
+# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
# endif
#endif