mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-22 16:54:48 +08:00
dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
2002-03-25 Andrew Haley <aph@cambridge.redhat.com>, Hans Boehm <Hans_Boehm@hp.com> * include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64. (INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction instead of syscall on IA-64. Add FIXME comment. From-SVN: r51459
This commit is contained in:
parent
5cb27a4697
commit
3cb2054594
@ -1,3 +1,10 @@
|
|||||||
|
2002-03-25 Andrew Haley <aph@cambridge.redhat.com>, Hans Boehm <Hans_Boehm@hp.com>
|
||||||
|
|
||||||
|
* include/dwarf2-signal.h (MAKE_THROW_FRAME): Add for IA-64.
|
||||||
|
(INIT_SEGV, INIT_FPE): Add versions that use __libc_sigaction
|
||||||
|
instead of syscall on IA-64.
|
||||||
|
Add FIXME comment.
|
||||||
|
|
||||||
2002-03-27 Anthony Green <green@redhat.com>
|
2002-03-27 Anthony Green <green@redhat.com>
|
||||||
|
|
||||||
* libgcj.spec.in: Add CHECKREFSPEC.
|
* libgcj.spec.in: Add CHECKREFSPEC.
|
||||||
|
@ -41,6 +41,23 @@ do \
|
|||||||
_sc->sc_pc += 4; \
|
_sc->sc_pc += 4; \
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
|
#elif defined(__ia64__)
|
||||||
|
|
||||||
|
#define MAKE_THROW_FRAME(_exception) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
/* IA-64 either leaves PC pointing at a faulting instruction or the \
|
||||||
|
following instruction, depending on the signal. SEGV always does \
|
||||||
|
the former, so we adjust the saved PC to point to the following \
|
||||||
|
instruction; this is what the handler in libgcc expects. */ \
|
||||||
|
/* Note that we are lying to the unwinder here, which expects the \
|
||||||
|
faulting pc, not pc+1. But we claim the unwind information can't \
|
||||||
|
be changed by such a ld or st instruction, so it doesn't matter. */ \
|
||||||
|
struct sigcontext *_sc = (struct sigcontext *)_p; \
|
||||||
|
_sc->sc_ip++; \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
#else
|
#else
|
||||||
#define MAKE_THROW_FRAME(_exception) \
|
#define MAKE_THROW_FRAME(_exception) \
|
||||||
do \
|
do \
|
||||||
@ -50,6 +67,7 @@ do \
|
|||||||
while (0)
|
while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ia64__
|
||||||
#define INIT_SEGV \
|
#define INIT_SEGV \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
@ -82,4 +100,41 @@ while (0)
|
|||||||
* go away once all systems have pthreads libraries that are
|
* go away once all systems have pthreads libraries that are
|
||||||
* compiled with full unwind info. */
|
* compiled with full unwind info. */
|
||||||
|
|
||||||
|
#else /* __ia64__ */
|
||||||
|
|
||||||
|
// FIXME: We shouldn't be using libc_sigaction here, since it should
|
||||||
|
// be glibc private. But using syscall here would mean translating to
|
||||||
|
// the kernel's struct sigaction and argument sequence, which we
|
||||||
|
// shouldn't either. The right solution is to call sigaction and to
|
||||||
|
// make sure that we can unwind correctly through the pthread signal
|
||||||
|
// wrapper.
|
||||||
|
extern "C" int __libc_sigaction (int __sig,
|
||||||
|
__const struct sigaction *__restrict __act,
|
||||||
|
struct sigaction *__restrict __oact) throw ();
|
||||||
|
|
||||||
|
#define INIT_SEGV \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
nullp = new java::lang::NullPointerException (); \
|
||||||
|
struct sigaction act; \
|
||||||
|
act.sa_sigaction = _Jv_catch_segv; \
|
||||||
|
sigemptyset (&act.sa_mask); \
|
||||||
|
act.sa_flags = SA_SIGINFO; \
|
||||||
|
__libc_sigaction (SIGSEGV, &act, NULL); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
#define INIT_FPE \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
arithexception = new java::lang::ArithmeticException \
|
||||||
|
(JvNewStringLatin1 ("/ by zero")); \
|
||||||
|
struct sigaction act; \
|
||||||
|
act.sa_sigaction = _Jv_catch_fpe; \
|
||||||
|
sigemptyset (&act.sa_mask); \
|
||||||
|
act.sa_flags = SA_SIGINFO; \
|
||||||
|
__libc_sigaction (SIGFPE, &act, NULL); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif /* JAVA_SIGNAL_H */
|
#endif /* JAVA_SIGNAL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user