signal hander patch
Andrew Haley
aph@cambridge.redhat.com
Tue Mar 26 05:59:00 GMT 2002
I don't have a PPC system convenient, so please try this ASAP.
Andrew.
2002-03-26 Andrew Haley <aph@cambridge.redhat.com>
(INIT_SEGV, INIT_FPE): Only use __libc_sigaction instead of
syscall on IA-64 systems.
Index: include/dwarf2-signal.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/include/dwarf2-signal.h,v
retrieving revision 1.3.20.1
diff -c -2 -p -r1.3.20.1 dwarf2-signal.h
*** dwarf2-signal.h 2002/03/26 03:28:00 1.3.20.1
--- dwarf2-signal.h 2002/03/26 13:58:22
*************** while (0)
*** 69,72 ****
--- 69,107 ----
#endif
+ #ifndef __ia64__
+ #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; \
+ syscall (SYS_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; \
+ syscall (SYS_sigaction, SIGFPE, &act, NULL); \
+ } \
+ while (0)
+
+ /* We use syscall(SYS_sigaction) in INIT_SEGV and INIT_FPE instead of
+ * sigaction() because on some systems the pthreads wrappers for
+ * signal handlers are not compiled with unwind information, so it's
+ * not possible to unwind through them. This is a problem that will
+ * go away once all systems have pthreads libraries that are
+ * 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
*************** do \
*** 103,113 ****
} \
while (0)
!
! /* We use syscall(SYS_sigaction) in INIT_SEGV and INIT_FPE instead of
! * sigaction() because on some systems the pthreads wrappers for
! * signal handlers are not compiled with unwind information, so it's
! * not possible to unwind through them. This is a problem that will
! * go away once all systems have pthreads libraries that are
! * compiled with full unwind info. */
!
#endif /* JAVA_SIGNAL_H */
--- 138,141 ----
} \
while (0)
! #endif /* __ia64__ */
#endif /* JAVA_SIGNAL_H */
More information about the Java
mailing list