diff options
author | Andrew Haley <aph@redhat.com> | 2001-05-29 17:50:50 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2001-05-29 17:50:50 +0000 |
commit | c9bffcd53e66fefb4e168c8d57d759fa6475f275 (patch) | |
tree | e8a819f21050f165845bdc2be079418c748fcfae /libjava/include/dwarf2-signal.h | |
parent | 022dae817d1d2f731e3fcaa7b650319983aeea8b (diff) | |
download | gcc-c9bffcd53e66fefb4e168c8d57d759fa6475f275.zip gcc-c9bffcd53e66fefb4e168c8d57d759fa6475f275.tar.gz gcc-c9bffcd53e66fefb4e168c8d57d759fa6475f275.tar.bz2 |
i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame pointer...
2001-05-29 Andrew Haley <aph@redhat.com>
* include/i386-signal.h (MAKE_THROW_FRAME): Don't fix up frame
pointer: the dwarf unwinder in libgcc will do everything that's
needed.
(HANDLE_DIVIDE_OVERFLOW): Tidy. Don't mess with stack frames any
more than we absolutely need to.
* configure.host (EXCEPTIONSPEC): Remove libgcj_sjlj on Alpha.
* configure.in (SIGNAL_HANDLER): Use include/dwarf2-signal.h on
Alpha.
(SIGNAL_HANDLER): Test "$enable_sjlj_exceptions", not
"$libgcj_sjlj".
* configure: Rebuilt.
* include/dwarf2-signal.h (MAKE_THROW_FRAME): Adjust PC
for Alpha.
(SIGNAL_HANDLER): Use siginfo style handler.
(INIT_SEGV): Likewise.
(INIT_FPE): Likewise.
* include/ppc-signal.h: Delete whole file.
From-SVN: r42691
Diffstat (limited to 'libjava/include/dwarf2-signal.h')
-rw-r--r-- | libjava/include/dwarf2-signal.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/libjava/include/dwarf2-signal.h b/libjava/include/dwarf2-signal.h index ec32a7b..3a662ae 100644 --- a/libjava/include/dwarf2-signal.h +++ b/libjava/include/dwarf2-signal.h @@ -4,9 +4,8 @@ This file is part of libgcj. - Use this file for every target for which the dwarf2 unwinder in - libgcc can unwind through signal handlers and no special actions - are needed. + Use this file for a target for which the dwarf2 unwinder in libgcc + can unwind through signal handlers. This software is copyrighted work licensed under the terms of the Libgcj License. Please consult the file "LIBGCJ_LICENSE" for @@ -22,29 +21,43 @@ details. */ #undef HANDLE_FPE #define SIGNAL_HANDLER(_name) \ -static void _Jv_##_name (int) +static void _Jv_##_name (int, siginfo_t *, void *_p) class java::lang::Throwable; // Unwind the stack to the point at which the signal was generated and -// then throw an exception. With the dwarf2 unwinder we don't need to -// do anything. - +// then throw an exception. With the dwarf2 unwinder we don't usually +// need to do anything, with some minor exceptions. + +#ifdef __alpha__ +#define MAKE_THROW_FRAME(_exception) \ +do \ +{ \ + /* Alpha 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. */ \ + struct sigcontext *_sc = (struct sigcontext *)_p; \ + _sc->sc_pc += 4; \ +} \ +while (0) +#else #define MAKE_THROW_FRAME(_exception) \ do \ { \ + (void)_p; \ } \ while (0) - +#endif #define INIT_SEGV \ do \ { \ nullp = new java::lang::NullPointerException (); \ struct sigaction act; \ - act.sa_handler = _Jv_catch_segv; \ + act.sa_sigaction = _Jv_catch_segv; \ sigemptyset (&act.sa_mask); \ - act.sa_flags = 0; \ + act.sa_flags = SA_SIGINFO; \ syscall (SYS_sigaction, SIGSEGV, &act, NULL); \ } \ while (0) @@ -55,9 +68,9 @@ do \ arithexception = new java::lang::ArithmeticException \ (JvNewStringLatin1 ("/ by zero")); \ struct sigaction act; \ - act.sa_handler = _Jv_catch_fpe; \ + act.sa_sigaction = _Jv_catch_fpe; \ sigemptyset (&act.sa_mask); \ - act.sa_flags = 0; \ + act.sa_flags = SA_SIGINFO; \ syscall (SYS_sigaction, SIGFPE, &act, NULL); \ } \ while (0) |