mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-17 14:10:10 +00:00
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.
This commit is contained in:
parent
7951fa108f
commit
52abb5ce24
@ -1,4 +1,4 @@
|
||||
/* 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.
|
||||
|
||||
@ -20,12 +20,23 @@
|
||||
#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)
|
||||
|
@ -19,12 +19,23 @@
|
||||
#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)
|
||||
|
Loading…
Reference in New Issue
Block a user