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
This commit is contained in:
Andrew Haley 2001-05-29 17:50:50 +00:00 committed by Andrew Haley
parent 022dae817d
commit c9bffcd53e
6 changed files with 101 additions and 182 deletions

View file

@ -1,3 +1,23 @@
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.
2001-05-24 Tom Tromey <tromey@redhat.com> 2001-05-24 Tom Tromey <tromey@redhat.com>
* java/lang/natString.cc (init): Throw * java/lang/natString.cc (init): Throw

91
libjava/configure vendored
View file

@ -5871,13 +5871,16 @@ case "${host}" in
powerpc-*-linux*) powerpc-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h SIGNAL_HANDLER=include/dwarf2-signal.h
;; ;;
alpha*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
*) *)
SIGNAL_HANDLER=include/default-signal.h SIGNAL_HANDLER=include/default-signal.h
;; ;;
esac esac
# If we're using sjlj exceptions, forget what we just learned. # If we're using sjlj exceptions, forget what we just learned.
if test "$libgcj_sjlj" = yes; then if test "$enable_sjlj_exceptions" = yes; then
SIGNAL_HANDLER=include/default-signal.h SIGNAL_HANDLER=include/default-signal.h
fi fi
@ -5896,7 +5899,7 @@ fi
# Uses ac_ vars as temps to allow command line to override cache and checks. # Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache. # --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6 echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:5900: checking for X" >&5 echo "configure:5903: checking for X" >&5
# Check whether --with-x or --without-x was given. # Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then if test "${with_x+set}" = set; then
@ -5958,12 +5961,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified. # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5962 "configure" #line 5965 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$x_direct_test_include> #include <$x_direct_test_include>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -6032,14 +6035,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS" LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6036 "configure" #line 6039 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
${x_direct_test_function}() ${x_direct_test_function}()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
# We can link X programs with no special library path. # We can link X programs with no special library path.
@ -6145,17 +6148,17 @@ else
case "`(uname -sr) 2>/dev/null`" in case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*) "SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:6149: checking whether -R must be followed by a space" >&5 echo "configure:6152: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6152 "configure" #line 6155 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_R_nospace=yes ac_R_nospace=yes
else else
@ -6171,14 +6174,14 @@ rm -f conftest*
else else
LIBS="$ac_xsave_LIBS -R $x_libraries" LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6175 "configure" #line 6178 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_R_space=yes ac_R_space=yes
else else
@ -6210,7 +6213,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says # libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist). # the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:6214: checking for dnet_ntoa in -ldnet" >&5 echo "configure:6217: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6218,7 +6221,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS" LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6222 "configure" #line 6225 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6229,7 +6232,7 @@ int main() {
dnet_ntoa() dnet_ntoa()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6251,7 +6254,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:6255: checking for dnet_ntoa in -ldnet_stub" >&5 echo "configure:6258: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6259,7 +6262,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS" LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6263 "configure" #line 6266 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6270,7 +6273,7 @@ int main() {
dnet_ntoa() dnet_ntoa()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6299,12 +6302,12 @@ fi
# The nsl library prevents programs from opening the X display # The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net. # on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:6303: checking for gethostbyname" >&5 echo "configure:6306: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6308 "configure" #line 6311 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */ which can conflict with char gethostbyname(); below. */
@ -6327,7 +6330,7 @@ gethostbyname();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes" eval "ac_cv_func_gethostbyname=yes"
else else
@ -6348,7 +6351,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:6352: checking for gethostbyname in -lnsl" >&5 echo "configure:6355: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6356,7 +6359,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS" LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6360 "configure" #line 6363 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6367,7 +6370,7 @@ int main() {
gethostbyname() gethostbyname()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6397,12 +6400,12 @@ fi
# -lsocket must be given before -lnsl if both are needed. # -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname. # We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6 echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:6401: checking for connect" >&5 echo "configure:6404: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6406 "configure" #line 6409 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */ which can conflict with char connect(); below. */
@ -6425,7 +6428,7 @@ connect();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_connect=yes" eval "ac_cv_func_connect=yes"
else else
@ -6446,7 +6449,7 @@ fi
if test $ac_cv_func_connect = no; then if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:6450: checking for connect in -lsocket" >&5 echo "configure:6453: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6454,7 +6457,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6458 "configure" #line 6461 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6465,7 +6468,7 @@ int main() {
connect() connect()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6489,12 +6492,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6 echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:6493: checking for remove" >&5 echo "configure:6496: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6498 "configure" #line 6501 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */ which can conflict with char remove(); below. */
@ -6517,7 +6520,7 @@ remove();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_remove=yes" eval "ac_cv_func_remove=yes"
else else
@ -6538,7 +6541,7 @@ fi
if test $ac_cv_func_remove = no; then if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:6542: checking for remove in -lposix" >&5 echo "configure:6545: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6546,7 +6549,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS" LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6550 "configure" #line 6553 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6557,7 +6560,7 @@ int main() {
remove() remove()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6581,12 +6584,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:6585: checking for shmat" >&5 echo "configure:6588: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6590 "configure" #line 6593 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */ which can conflict with char shmat(); below. */
@ -6609,7 +6612,7 @@ shmat();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_shmat=yes" eval "ac_cv_func_shmat=yes"
else else
@ -6630,7 +6633,7 @@ fi
if test $ac_cv_func_shmat = no; then if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:6634: checking for shmat in -lipc" >&5 echo "configure:6637: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6638,7 +6641,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS" LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6642 "configure" #line 6645 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6649,7 +6652,7 @@ int main() {
shmat() shmat()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6682,7 +6685,7 @@ fi
# libraries we check for below, so use a different variable. # libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:6686: checking for IceConnectionNumber in -lICE" >&5 echo "configure:6689: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6690,7 +6693,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6694 "configure" #line 6697 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6701,7 +6704,7 @@ int main() {
IceConnectionNumber() IceConnectionNumber()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else

View file

@ -757,13 +757,16 @@ case "${host}" in
powerpc-*-linux*) powerpc-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h SIGNAL_HANDLER=include/dwarf2-signal.h
;; ;;
alpha*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
*) *)
SIGNAL_HANDLER=include/default-signal.h SIGNAL_HANDLER=include/default-signal.h
;; ;;
esac esac
# If we're using sjlj exceptions, forget what we just learned. # If we're using sjlj exceptions, forget what we just learned.
if test "$libgcj_sjlj" = yes; then if test "$enable_sjlj_exceptions" = yes; then
SIGNAL_HANDLER=include/default-signal.h SIGNAL_HANDLER=include/default-signal.h
fi fi

View file

@ -4,9 +4,8 @@
This file is part of libgcj. This file is part of libgcj.
Use this file for every target for which the dwarf2 unwinder in Use this file for a target for which the dwarf2 unwinder in libgcc
libgcc can unwind through signal handlers and no special actions can unwind through signal handlers.
are needed.
This software is copyrighted work licensed under the terms of the This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
@ -22,29 +21,43 @@ details. */
#undef HANDLE_FPE #undef HANDLE_FPE
#define SIGNAL_HANDLER(_name) \ #define SIGNAL_HANDLER(_name) \
static void _Jv_##_name (int) static void _Jv_##_name (int, siginfo_t *, void *_p)
class java::lang::Throwable; class java::lang::Throwable;
// Unwind the stack to the point at which the signal was generated and // 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 // then throw an exception. With the dwarf2 unwinder we don't usually
// do anything. // need to do anything, with some minor exceptions.
#ifdef __alpha__
#define MAKE_THROW_FRAME(_exception) \ #define MAKE_THROW_FRAME(_exception) \
do \ 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) while (0)
#else
#define MAKE_THROW_FRAME(_exception) \
do \
{ \
(void)_p; \
} \
while (0)
#endif
#define INIT_SEGV \ #define INIT_SEGV \
do \ do \
{ \ { \
nullp = new java::lang::NullPointerException (); \ nullp = new java::lang::NullPointerException (); \
struct sigaction act; \ struct sigaction act; \
act.sa_handler = _Jv_catch_segv; \ act.sa_sigaction = _Jv_catch_segv; \
sigemptyset (&act.sa_mask); \ sigemptyset (&act.sa_mask); \
act.sa_flags = 0; \ act.sa_flags = SA_SIGINFO; \
syscall (SYS_sigaction, SIGSEGV, &act, NULL); \ syscall (SYS_sigaction, SIGSEGV, &act, NULL); \
} \ } \
while (0) while (0)
@ -55,9 +68,9 @@ do \
arithexception = new java::lang::ArithmeticException \ arithexception = new java::lang::ArithmeticException \
(JvNewStringLatin1 ("/ by zero")); \ (JvNewStringLatin1 ("/ by zero")); \
struct sigaction act; \ struct sigaction act; \
act.sa_handler = _Jv_catch_fpe; \ act.sa_sigaction = _Jv_catch_fpe; \
sigemptyset (&act.sa_mask); \ sigemptyset (&act.sa_mask); \
act.sa_flags = 0; \ act.sa_flags = SA_SIGINFO; \
syscall (SYS_sigaction, SIGFPE, &act, NULL); \ syscall (SYS_sigaction, SIGFPE, &act, NULL); \
} \ } \
while (0) while (0)

View file

@ -31,16 +31,11 @@ do \
void **_p = (void **)&_dummy; \ void **_p = (void **)&_dummy; \
struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p; \ struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p; \
\ \
register unsigned long _ebp = _regs->ebp; \
register unsigned char *_eip = (unsigned char *)_regs->eip; \
\
/* Advance the program counter so that it is after the start of the \ /* Advance the program counter so that it is after the start of the \
instruction: the x86 exception handler expects \ instruction: the x86 exception handler expects \
the PC to point to the instruction after a call. */ \ the PC to point to the instruction after a call. */ \
_eip += 2; \ _regs->eip += 2; \
\ \
asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)" \
: : "r"(_ebp), "r"(_eip)); \
} \ } \
while (0) while (0)
@ -104,6 +99,9 @@ do \
\ \
_eip = (unsigned char *)_ebp[1]; \ _eip = (unsigned char *)_ebp[1]; \
_ebp = (unsigned long *)_ebp[0]; \ _ebp = (unsigned long *)_ebp[0]; \
\
asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)" \
: : "r"(_ebp), "r"(_eip)); \
} \ } \
else \ else \
{ \ { \
@ -111,12 +109,9 @@ do \
of the instruction: this is because the x86 exception \ of the instruction: this is because the x86 exception \
handler expects the PC to point to the instruction after a \ handler expects the PC to point to the instruction after a \
call. */ \ call. */ \
_eip += 2; \ _regs->eip += 2; \
} \ } \
} \ } \
\
asm volatile ("mov %0, (%%ebp); mov %1, 4(%%ebp)" \
: : "r"(_ebp), "r"(_eip)); \
} \ } \
while (0) while (0)

View file

@ -1,115 +0,0 @@
// ppc-signal.h - Catch runtime signals and turn them into exceptions.
/* Copyright (C) 2000 Free Software Foundation
This file is part of libgcj.
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 <ucontext.h>
#define HANDLE_SEGV 1
#undef HANDLE_FPE
#define SIGNAL_HANDLER(_name) \
__asm ("\t.section\t\".text\"\n" \
"\t.align 2\n" \
"_Jv_" #_name ":\n" \
"\tmr 3, 1\n" \
"\tb _Jv_stub_" #_name "\n"); \
extern "C" void _Jv_##_name (int _dummy); \
extern "C" void _Jv_stub_##_name (char *_sp) \
class java::lang::Throwable;
// Unwind the stack to the point at which the signal was generated and
// then throw an exception.
#define MAKE_THROW_FRAME(_exception) \
do \
{ \
struct sigcontext_struct *_context \
= (struct sigcontext_struct *)(_sp + __SIGNAL_FRAMESIZE); \
long int regs [34]; \
memcpy (regs, &_context->regs->gpr[0], 32 * sizeof (long int)); \
regs[32] = _context->regs->nip + sizeof (long int); \
regs[33] = _context->regs->link; \
\
__asm volatile ( \
"\tmr 31,%0\n" \
"\tmr 3,%1 # exception to throw\n" \
"\tlwz 0,128(31) # ip\n" \
"\tmtlr 0\n" \
"\tlwz 1,4(31) # previous r1\n" \
"\tlwz 0,132(31) # previous lr\n" \
"\tlwz 2,0(1) # previous previous r1\n" \
"\tstw 0,4(2) # save previous lr\n" \
"\tlwz 0,0(31)\n" \
"\tlwz 2,8(31)\n" \
"\tlwz 4,16(31)\n" \
"\tlwz 5,20(31)\n" \
"\tlwz 6,24(31)\n" \
"\tlwz 7,28(31)\n" \
"\tlwz 8,32(31)\n" \
"\tlwz 9,36(31)\n" \
"\tlwz 10,40(31)\n" \
"\tlwz 11,44(31)\n" \
"\tlwz 12,48(31)\n" \
"\tlwz 13,52(31)\n" \
"\tlwz 14,56(31)\n" \
"\tlwz 15,60(31)\n" \
"\tlwz 16,64(31)\n" \
"\tlwz 17,68(31)\n" \
"\tlwz 18,72(31)\n" \
"\tlwz 19,76(31)\n" \
"\tlwz 20,80(31)\n" \
"\tlwz 21,84(31)\n" \
"\tlwz 22,88(31)\n" \
"\tlwz 23,92(31)\n" \
"\tlwz 24,96(31)\n" \
"\tlwz 25,100(31)\n" \
"\tlwz 26,104(31)\n" \
"\tlwz 27,108(31)\n" \
"\tlwz 28,112(31)\n" \
"\tlwz 29,116(31)\n" \
"\tlwz 30,120(31)\n" \
"\tlwz 31,124(31)\n" \
"\tb _Jv_ThrowSignal\n" \
: : "r"(regs), "r"(_exception) \
: "r31", "r3"); \
} \
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; \
__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; \
__sigaction (SIGFPE, &act, NULL); \
} \
while (0)
#endif /* JAVA_SIGNAL_H */