2005-12-27 Roland McGrath <roland@redhat.com>

* 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.
This commit is contained in:
Roland McGrath 2005-12-28 05:41:36 +00:00
parent 52abb5ce24
commit bdbd93b5ef
4 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,5 @@
/* 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
@ -80,8 +80,8 @@ typedef long int __jmp_buf[17];
/* 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 */

View File

@ -1,4 +1,4 @@
/* 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
@ -39,7 +39,8 @@ typedef double __jmp_buf[21];
/* 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 */

View File

@ -1,4 +1,4 @@
/* 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
@ -44,7 +44,7 @@ typedef struct
/* 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 */

View File

@ -80,7 +80,7 @@ typedef struct
/* 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 */