diff options
author | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-20 19:49:08 +0000 |
---|---|---|
committer | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-11-20 19:49:08 +0000 |
commit | c40205b63353f721544bc61758ca588ca84adff0 (patch) | |
tree | 0b8b10e14ec8c024d773738fd4cddb0142e18a7e /libjava | |
parent | 185e3a2746e16d0f4540407e08924d0c33d99d33 (diff) | |
download | gcc-c40205b63353f721544bc61758ca588ca84adff0.tar.gz |
2006-11-20 David Daney <ddaney@avtrex.com>
* include/mips-signal.h (sys/syscall.h): Do not include.
(sig_ucontext_t): Removed.
(MAKE_THROW_FRAME): Changed to be a nop.
(_INIT_SIG_HANDLER): New macro.
(INIT_SEGV): Rewrote to use _INIT_SIG_HANDLER.
(INIT_FPE): Same.
2006-11-20 David Daney <ddaney@avtrex.com>
* config/mips/linux-unwind.h (mips_fallback_frame_state): Adjust
PC to point to following instruction.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119024 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 9 | ||||
-rw-r--r-- | libjava/include/mips-signal.h | 46 |
2 files changed, 15 insertions, 40 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index ee11b279ecc..b768bf9e1f9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,14 @@ 2006-11-20 David Daney <ddaney@avtrex.com> + * include/mips-signal.h (sys/syscall.h): Do not include. + (sig_ucontext_t): Removed. + (MAKE_THROW_FRAME): Changed to be a nop. + (_INIT_SIG_HANDLER): New macro. + (INIT_SEGV): Rewrote to use _INIT_SIG_HANDLER. + (INIT_FPE): Same. + +2006-11-20 David Daney <ddaney@avtrex.com> + * testsuite/libjava.lang/Throw_3.java: New Test. * testsuite/libjava.lang/Throw_3.out: Its expected output. diff --git a/libjava/include/mips-signal.h b/libjava/include/mips-signal.h index 63218ea84a7..478e3a4e23c 100644 --- a/libjava/include/mips-signal.h +++ b/libjava/include/mips-signal.h @@ -18,65 +18,31 @@ details. */ #include <signal.h> #include <unistd.h> -#include <sys/syscall.h> -/* #include <asm/ucontext.h> structures we use are here but clash with - sys/ucontext.h included by java-signal.h from prims.cc */ #define HANDLE_SEGV 1 #define HANDLE_FPE 1 -/* The third parameter to the signal handler points to something with - * this structure defined in asm/ucontext.h, but the name clashes with - * struct ucontext from sys/ucontext.h so this private copy is used. */ -typedef struct _sig_ucontext { - unsigned long uc_flags; - struct _sig_ucontext *uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; -} sig_ucontext_t; - #define SIGNAL_HANDLER(_name) \ static void _name (int _dummy __attribute__ ((__unused__)), \ siginfo_t *_info __attribute__ ((__unused__)), \ void *_arg __attribute__ ((__unused__))) -/* - * MIPS leaves pc pointing at the faulting instruction, but the - * unwinder expects it to point to the following instruction - */ - -#define MAKE_THROW_FRAME(_exception) \ -do \ -{ \ - ((sig_ucontext_t *)_arg)->uc_mcontext.sc_pc += 4; \ - (void)_dummy; \ - (void)_info; \ -} \ -while (0) +#define MAKE_THROW_FRAME(_exception) -#define INIT_SEGV \ +#define _INIT_SIG_HANDLER(_SIG, _ACTION) \ do \ { \ struct sigaction act; \ - act.sa_sigaction = catch_segv; \ + act.sa_sigaction = _ACTION; \ act.sa_flags = SA_SIGINFO | SA_NODEFER; \ sigemptyset (&act.sa_mask); \ - sigaction(SIGSEGV, &act, NULL); \ + sigaction(_SIG, &act, NULL); \ } \ while (0) -#define INIT_FPE \ -do \ - { \ - struct sigaction act; \ - act.sa_sigaction = catch_fpe; \ - act.sa_flags = SA_SIGINFO | SA_NODEFER; \ - sigemptyset (&act.sa_mask); \ - sigaction(SIGFPE, &act, NULL); \ - } \ -while (0) +#define INIT_SEGV _INIT_SIG_HANDLER (SIGSEGV, catch_segv) +#define INIT_FPE _INIT_SIG_HANDLER (SIGFPE, catch_fpe) #undef HANDLE_DIVIDE_OVERFLOW #endif /* JAVA_SIGNAL_H */ |