diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-10-18 21:33:25 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2013-10-18 21:33:25 +0000 |
commit | fe2ed5aaa408e1ab996a9fe1595a05634208a79c (patch) | |
tree | e1027fbc9d8a4a8c33f8149b2b42e8cde89c74f6 /libc/ports/sysdeps/arm/jmpbuf-unwind.h | |
parent | 571c782b982d888565e7d06bfc2f3d47582fe829 (diff) | |
download | eglibc2-fe2ed5aaa408e1ab996a9fe1595a05634208a79c.tar.gz |
Merge changes between r23946 and r24305 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@24306 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/ports/sysdeps/arm/jmpbuf-unwind.h')
-rw-r--r-- | libc/ports/sysdeps/arm/jmpbuf-unwind.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libc/ports/sysdeps/arm/jmpbuf-unwind.h b/libc/ports/sysdeps/arm/jmpbuf-unwind.h index 0863540ce..1b0d0202e 100644 --- a/libc/ports/sysdeps/arm/jmpbuf-unwind.h +++ b/libc/ports/sysdeps/arm/jmpbuf-unwind.h @@ -17,6 +17,7 @@ #include <setjmp.h> #include <stdint.h> +#include <sysdep.h> #include <unwind.h> /* Test if longjmp to JMPBUF would unwind the frame @@ -27,8 +28,18 @@ #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[__JMP_BUF_SP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_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) |