mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-26 14:05:58 +08:00
linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Corrected to handle kernels with changed ucontext.
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR) [!__powerpc64__]: Corrected to handle kernels with changed ucontext. * include/powerpc-signal.h: Add #ifndef __powerpc64__ around the header. For __powerpc64__ provide the default-signal.h definitions for now. * include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h instead of the dummy definitions. * configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC. (powerpc64*-*): Remove with_libffi_default. Only add -mminimal-toc for 64-bit compilations. * configure.in: Use powerpc-signal.h on powerpc64 as well. (x86_64-*-linux*): Set SIGNAL_HANDLER_AUX. Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h. * configure: Rebuilt. From-SVN: r76437
This commit is contained in:
parent
0a944ef648
commit
02731d29be
@ -1,3 +1,8 @@
|
||||
2004-01-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
|
||||
[!__powerpc64__]: Corrected to handle kernels with changed ucontext.
|
||||
|
||||
2004-01-23 Eric Botcazou <ebotcazou@act-europe.fr>
|
||||
Olivier Hainque <hainque@act-europe.fr>
|
||||
|
||||
|
@ -550,13 +550,27 @@ while (0)
|
||||
|
||||
#ifdef IN_LIBGCC2
|
||||
#include <signal.h>
|
||||
#ifdef __powerpc64__
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
#ifdef __powerpc64__
|
||||
enum { SIGNAL_FRAMESIZE = 128 };
|
||||
|
||||
#else
|
||||
|
||||
/* During the 2.5 kernel series the kernel ucontext was changed, but
|
||||
the new layout is compatible with the old one, so we just define
|
||||
and use the old one here for simplicity and compatibility. */
|
||||
|
||||
struct kernel_old_ucontext {
|
||||
unsigned long uc_flags;
|
||||
struct ucontext *uc_link;
|
||||
stack_t uc_stack;
|
||||
struct sigcontext_struct uc_mcontext;
|
||||
sigset_t uc_sigmask;
|
||||
};
|
||||
enum { SIGNAL_FRAMESIZE = 64 };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc64__
|
||||
@ -674,7 +688,7 @@ enum { SIGNAL_FRAMESIZE = 64 };
|
||||
struct siginfo *pinfo; \
|
||||
void *puc; \
|
||||
struct siginfo info; \
|
||||
struct ucontext uc; \
|
||||
struct kernel_old_ucontext uc; \
|
||||
} *rt_ = (CONTEXT)->cfa; \
|
||||
sc_ = &rt_->uc.uc_mcontext; \
|
||||
} \
|
||||
@ -698,15 +712,9 @@ enum { SIGNAL_FRAMESIZE = 64 };
|
||||
(FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset \
|
||||
= (long)&(sc_->regs->link) - new_cfa_; \
|
||||
\
|
||||
/* The unwinder expects the IP to point to the following insn, \
|
||||
whereas the kernel returns the address of the actual \
|
||||
faulting insn. We store NIP+4 in an unused register slot to \
|
||||
get the same result for multiple evaluation of the same signal \
|
||||
frame. */ \
|
||||
sc_->regs->gpr[47] = sc_->regs->nip + 4; \
|
||||
(FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET; \
|
||||
(FS)->regs.reg[CR0_REGNO].loc.offset \
|
||||
= (long)&(sc_->regs->gpr[47]) - new_cfa_; \
|
||||
= (long)&(sc_->regs->nip) - new_cfa_; \
|
||||
(FS)->retaddr_column = CR0_REGNO; \
|
||||
goto SUCCESS; \
|
||||
} while (0)
|
||||
|
@ -1,3 +1,18 @@
|
||||
2004-01-21 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
|
||||
header. For __powerpc64__ provide the default-signal.h definitions
|
||||
for now.
|
||||
* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
|
||||
instead of the dummy definitions.
|
||||
* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
|
||||
(powerpc64*-*): Remove with_libffi_default.
|
||||
Only add -mminimal-toc for 64-bit compilations.
|
||||
* configure.in: Use powerpc-signal.h on powerpc64 as well.
|
||||
(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
|
||||
Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
|
||||
* configure: Rebuilt.
|
||||
|
||||
2004-01-23 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* gnu/java/nio/FileLockImpl.java: Compile fixes.
|
||||
|
13
libjava/configure
vendored
13
libjava/configure
vendored
@ -9015,6 +9015,7 @@ test -n "$PERL" || PERL="false"
|
||||
|
||||
|
||||
SYSDEP_SOURCES=
|
||||
SIGNAL_HANDLER_AUX=
|
||||
|
||||
case "${host}" in
|
||||
i?86-*-linux*)
|
||||
@ -9030,7 +9031,7 @@ case "${host}" in
|
||||
ia64-*-linux*)
|
||||
SIGNAL_HANDLER=include/dwarf2-signal.h
|
||||
;;
|
||||
powerpc-*-linux*)
|
||||
powerpc*-*-linux*)
|
||||
SIGNAL_HANDLER=include/powerpc-signal.h
|
||||
;;
|
||||
alpha*-*-linux*)
|
||||
@ -9041,6 +9042,7 @@ case "${host}" in
|
||||
;;
|
||||
x86_64*-*-linux*)
|
||||
SIGNAL_HANDLER=include/x86_64-signal.h
|
||||
SIGNAL_HANDLER_AUX=include/i386-signal.h
|
||||
;;
|
||||
sparc*-*-linux*)
|
||||
SIGNAL_HANDLER=include/dwarf2-signal.h
|
||||
@ -9062,6 +9064,7 @@ esac
|
||||
# If we're using sjlj exceptions, forget what we just learned.
|
||||
if test "$enable_sjlj_exceptions" = yes; then
|
||||
SIGNAL_HANDLER=include/default-signal.h
|
||||
SIGNAL_HANDLER_AUX=
|
||||
fi
|
||||
|
||||
# Define here any compiler flags that you need in order to make backtrace() work.
|
||||
@ -9075,6 +9078,10 @@ esac
|
||||
|
||||
|
||||
|
||||
if test -z "$SIGNAL_HANDLER_AUX"; then
|
||||
SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
@ -9573,8 +9580,8 @@ fi; done
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc gnu/java/nio/natPipeImpl${PLATFORM}.cc gnu/java/nio/natSelectorImpl${PLATFORM}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER"
|
||||
ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc gnu/java/net/natPlainSocketImpl.cc gnu/java/net/natPlainDatagramSocketImpl.cc gnu/java/nio/natPipeImpl.cc gnu/java/nio/natSelectorImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h"
|
||||
ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc java/net/natInetAddress${PLATFORMNET}.cc java/net/natNetworkInterface${PLATFORMNET}.cc gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc gnu/java/nio/natPipeImpl${PLATFORM}.cc gnu/java/nio/natSelectorImpl${PLATFORM}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER $SIGNAL_HANDLER_AUX"
|
||||
ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc java/net/natInetAddress.cc java/net/natNetworkInterface.cc gnu/java/net/natPlainSocketImpl.cc gnu/java/net/natPlainDatagramSocketImpl.cc gnu/java/nio/natPipeImpl.cc gnu/java/nio/natSelectorImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h include/java-signal-aux.h"
|
||||
EOF
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
|
@ -99,11 +99,11 @@ case "${host}" in
|
||||
slow_pthread_self=yes
|
||||
;;
|
||||
x86_64-*)
|
||||
CHECKREFSPEC="%{m32:-fcheck-references}"
|
||||
sysdeps_dir=x86-64
|
||||
libgcj_flags="${libgcj_flags} -ffloat-store -fno-omit-frame-pointer"
|
||||
libgcj_cxxflags=
|
||||
libgcj_cflags=
|
||||
DIVIDESPEC=-f%{m32:no-}use-divide-subroutine
|
||||
enable_hash_synchronization_default=yes
|
||||
slow_pthread_self=yes
|
||||
libgcj_interpreter=yes
|
||||
@ -116,11 +116,11 @@ case "${host}" in
|
||||
IEEESPEC=-mieee
|
||||
;;
|
||||
powerpc64*-*)
|
||||
with_libffi_default=yes
|
||||
libgcj_interpreter=yes
|
||||
libgcj_flags="${libgcj_flags} -mminimal-toc"
|
||||
# this may not be correct
|
||||
sysdeps_dir=powerpc
|
||||
libgcj_interpreter=yes
|
||||
if [ x`$CC -print-multi-os-directory` = x../lib64 ]; then
|
||||
libgcj_flags="${libgcj_flags} -mminimal-toc"
|
||||
fi
|
||||
enable_hash_synchronization_default=yes
|
||||
slow_pthread_self=yes
|
||||
;;
|
||||
|
@ -1128,6 +1128,7 @@ AC_FUNC_MMAP
|
||||
AC_CHECK_PROGS(PERL, perl, false)
|
||||
|
||||
SYSDEP_SOURCES=
|
||||
SIGNAL_HANDLER_AUX=
|
||||
|
||||
case "${host}" in
|
||||
i?86-*-linux*)
|
||||
@ -1143,7 +1144,7 @@ case "${host}" in
|
||||
ia64-*-linux*)
|
||||
SIGNAL_HANDLER=include/dwarf2-signal.h
|
||||
;;
|
||||
powerpc-*-linux*)
|
||||
powerpc*-*-linux*)
|
||||
SIGNAL_HANDLER=include/powerpc-signal.h
|
||||
;;
|
||||
alpha*-*-linux*)
|
||||
@ -1154,6 +1155,7 @@ case "${host}" in
|
||||
;;
|
||||
x86_64*-*-linux*)
|
||||
SIGNAL_HANDLER=include/x86_64-signal.h
|
||||
SIGNAL_HANDLER_AUX=include/i386-signal.h
|
||||
;;
|
||||
sparc*-*-linux*)
|
||||
SIGNAL_HANDLER=include/dwarf2-signal.h
|
||||
@ -1175,6 +1177,7 @@ esac
|
||||
# If we're using sjlj exceptions, forget what we just learned.
|
||||
if test "$enable_sjlj_exceptions" = yes; then
|
||||
SIGNAL_HANDLER=include/default-signal.h
|
||||
SIGNAL_HANDLER_AUX=
|
||||
fi
|
||||
|
||||
# Define here any compiler flags that you need in order to make backtrace() work.
|
||||
@ -1188,7 +1191,12 @@ AC_SUBST(BACKTRACESPEC)
|
||||
|
||||
AC_SUBST(SYSDEP_SOURCES)
|
||||
|
||||
AC_LINK_FILES($SIGNAL_HANDLER, include/java-signal.h)
|
||||
if test -z "$SIGNAL_HANDLER_AUX"; then
|
||||
SIGNAL_HANDLER_AUX=$SIGNAL_HANDLER
|
||||
fi
|
||||
|
||||
AC_LINK_FILES($SIGNAL_HANDLER $SIGNAL_HANDLER_AUX,
|
||||
include/java-signal.h include/java-signal-aux.h)
|
||||
|
||||
if test "${multilib}" = "yes"; then
|
||||
multilib_arg="--enable-multilib"
|
||||
|
@ -13,13 +13,15 @@ details. */
|
||||
#ifndef JAVA_SIGNAL_H
|
||||
# define JAVA_SIGNAL_H 1
|
||||
|
||||
# include <signal.h>
|
||||
# include <sys/syscall.h>
|
||||
# ifndef __powerpc64__
|
||||
|
||||
# define HANDLE_SEGV 1
|
||||
# undef HANDLE_FPE
|
||||
# include <signal.h>
|
||||
# include <sys/syscall.h>
|
||||
|
||||
# define SIGNAL_HANDLER(_name) \
|
||||
# define HANDLE_SEGV 1
|
||||
# undef HANDLE_FPE
|
||||
|
||||
# define SIGNAL_HANDLER(_name) \
|
||||
static void _name (int /* _signal */, struct sigcontext *_sc)
|
||||
|
||||
/* PPC either leaves PC pointing at a faulting instruction or the
|
||||
@ -27,7 +29,7 @@ details. */
|
||||
the former, so we adjust the saved PC to point to the following
|
||||
instruction. This is what the handler in libgcc expects. */
|
||||
|
||||
# define MAKE_THROW_FRAME(_exception) \
|
||||
# define MAKE_THROW_FRAME(_exception) \
|
||||
do \
|
||||
{ \
|
||||
_sc->regs->nip += 4; \
|
||||
@ -58,7 +60,7 @@ struct kernel_old_sigaction {
|
||||
void (*k_sa_restorer) (void);
|
||||
};
|
||||
|
||||
# define INIT_SEGV \
|
||||
# define INIT_SEGV \
|
||||
do \
|
||||
{ \
|
||||
struct kernel_old_sigaction kact; \
|
||||
@ -69,7 +71,7 @@ do \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
# define INIT_FPE \
|
||||
# define INIT_FPE \
|
||||
do \
|
||||
{ \
|
||||
struct kernel_old_sigaction kact; \
|
||||
@ -78,7 +80,15 @@ do \
|
||||
kact.k_sa_flags = 0; \
|
||||
syscall (SYS_sigaction, SIGFPE, &kact, NULL); \
|
||||
} \
|
||||
while (0)
|
||||
while (0)
|
||||
|
||||
# else
|
||||
|
||||
# undef HANDLE_SEGV
|
||||
# undef HANDLE_FPE
|
||||
|
||||
# define INIT_SEGV do {} while (0)
|
||||
# define INIT_FPE do {} while (0)
|
||||
# endif
|
||||
|
||||
#endif /* JAVA_SIGNAL_H */
|
||||
|
||||
|
@ -10,14 +10,14 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
||||
details. */
|
||||
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#ifndef JAVA_SIGNAL_H
|
||||
#define JAVA_SIGNAL_H 1
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifdef __x86_64__
|
||||
|
||||
#define HANDLE_SEGV 1
|
||||
|
||||
#define SIGNAL_HANDLER(_name) \
|
||||
@ -80,16 +80,13 @@ while (0)
|
||||
* go away if all systems ever have pthreads libraries that are
|
||||
* compiled with unwind info. */
|
||||
|
||||
#endif /* JAVA_SIGNAL_H */
|
||||
|
||||
#else /* __x86_64__ */
|
||||
|
||||
/* This is for the 32-bit subsystem on on x86-64. Catching signals
|
||||
doesn't yet work on that target. */
|
||||
/* This is for the 32-bit subsystem on on x86-64. */
|
||||
|
||||
#undef HANDLE_SEGV
|
||||
#undef HANDLE_FPE
|
||||
|
||||
#define INIT_SEGV do {} while (0)
|
||||
#define INIT_FPE do {} while (0)
|
||||
#define sigcontext_struct sigcontext
|
||||
#include <java-signal-aux.h>
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
#endif /* JAVA_SIGNAL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user