mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 10:39:09 +08:00
dwarf2-signal.h: New file.
2001-05-18 Andrew Haley <aph@cambridge.redhat.com> * include/dwarf2-signal.h: New file. * configure.in (SYSDEP_SOURCES): Add dwarf2-signal.h for PPC. * configure.host (EXCEPTIONSPEC): Don't use sjlj on PPC. * configure: Rebuilt. From-SVN: r42400
This commit is contained in:
parent
68981e3a32
commit
01936f3a7d
@ -1,3 +1,10 @@
|
||||
2001-05-18 Andrew Haley <aph@cambridge.redhat.com>
|
||||
|
||||
* include/dwarf2-signal.h: New file.
|
||||
* configure.in (SYSDEP_SOURCES): Add dwarf2-signal.h for PPC.
|
||||
* configure.host (EXCEPTIONSPEC): Don't use sjlj on PPC.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2001-05-21 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||
|
||||
* configure.in: Update boehm-gc include dir for new GC version.
|
||||
|
578
libjava/configure
vendored
578
libjava/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,6 @@ case "${host}" in
|
||||
;;
|
||||
powerpc*-*)
|
||||
libgcj_interpreter=yes
|
||||
libgcj_sjlj=yes
|
||||
;;
|
||||
sparc-*)
|
||||
;;
|
||||
|
@ -734,6 +734,9 @@ case "${host}" in
|
||||
# SYSDEP_SOURCES=sysdep/ia64.c
|
||||
# test -d sysdep || mkdir sysdep
|
||||
# ;;
|
||||
powerpc-*-linux*)
|
||||
SIGNAL_HANDLER=include/dwarf2-signal.h
|
||||
;;
|
||||
*)
|
||||
SIGNAL_HANDLER=include/default-signal.h
|
||||
;;
|
||||
|
72
libjava/include/dwarf2-signal.h
Normal file
72
libjava/include/dwarf2-signal.h
Normal file
@ -0,0 +1,72 @@
|
||||
// dwarf2-signal.h - Catch runtime signals and turn them into exceptions.
|
||||
|
||||
/* Copyright (C) 2000, 2001 Free Software Foundation
|
||||
|
||||
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.
|
||||
|
||||
This software is copyrighted work licensed under the terms of the
|
||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifndef JAVA_SIGNAL_H
|
||||
#define JAVA_SIGNAL_H 1
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#define HANDLE_SEGV 1
|
||||
#undef HANDLE_FPE
|
||||
|
||||
#define SIGNAL_HANDLER(_name) \
|
||||
static void _Jv_##_name (int)
|
||||
|
||||
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.
|
||||
|
||||
#define MAKE_THROW_FRAME(_exception) \
|
||||
do \
|
||||
{ \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
||||
#define INIT_SEGV \
|
||||
do \
|
||||
{ \
|
||||
nullp = new java::lang::NullPointerException (); \
|
||||
struct sigaction act; \
|
||||
act.sa_handler = _Jv_catch_segv; \
|
||||
sigemptyset (&act.sa_mask); \
|
||||
act.sa_flags = 0; \
|
||||
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_handler = _Jv_catch_fpe; \
|
||||
sigemptyset (&act.sa_mask); \
|
||||
act.sa_flags = 0; \
|
||||
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. */
|
||||
|
||||
#endif /* JAVA_SIGNAL_H */
|
Loading…
Reference in New Issue
Block a user