diff options
author | Roland McGrath <roland@gnu.org> | 2005-12-28 05:42:30 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-12-28 05:42:30 +0000 |
commit | db169ed561acef18093cc6739fb159d6274bf5a5 (patch) | |
tree | 18d7b799dd18051b570bcec3826b6392074cde43 /sysdeps/mach/hurd/jmp-unwind.c | |
parent | 0317eaecb1f1a0667a18412b2209f0ae70f94420 (diff) | |
download | glibc-db169ed561acef18093cc6739fb159d6274bf5a5.tar.gz glibc-db169ed561acef18093cc6739fb159d6274bf5a5.tar.xz glibc-db169ed561acef18093cc6739fb159d6274bf5a5.zip |
* 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.
Diffstat (limited to 'sysdeps/mach/hurd/jmp-unwind.c')
-rw-r--r-- | sysdeps/mach/hurd/jmp-unwind.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/jmp-unwind.c b/sysdeps/mach/hurd/jmp-unwind.c index 4624ad9e26..0c9700b739 100644 --- a/sysdeps/mach/hurd/jmp-unwind.c +++ b/sysdeps/mach/hurd/jmp-unwind.c @@ -1,5 +1,5 @@ /* _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 @@ -28,6 +28,15 @@ #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. */ @@ -46,7 +55,7 @@ _longjmp_unwind (jmp_buf env, int val) /* 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); @@ -56,7 +65,7 @@ _longjmp_unwind (jmp_buf env, int val) 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. |