dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg.
2002-04-19 David S. Miller <davem@redhat.com> * include/dwarf2-signal.h (SIGNAL_HANDLER): Name siginfo_t pointer arg. (MAKE_THROW_FRAME): Define for 32-bit and 64-bit sparc. (INIT_SEGV, INIT_FPE): Use direct __libc_sigaction installation on Sparc too. * include/sparc-signal.h (FLUSH_REGISTER_WINDOWS): Define properly for 64-bit sparc. (MAKE_THROW_FRAME): Use long for sp/retaddr so 64-bit works. * sysdeps/sparc/locks.h: New file. * configure.in (SIGNAL_HANDLER): Set to include/sparc-signal.h on all sparc Solaris configurations. Set to include/dwarf2-signal.h on sparc Linux. * configure: Regenerate * configure.host (can_unwind_signal): sparc*-linux* can do it now. From-SVN: r52575
This commit is contained in:
parent
25c52eacb2
commit
714708c8b1
7 changed files with 204 additions and 8 deletions
|
@ -21,7 +21,7 @@ details. */
|
|||
#undef HANDLE_FPE
|
||||
|
||||
#define SIGNAL_HANDLER(_name) \
|
||||
static void _Jv_##_name (int, siginfo_t *, void *_p)
|
||||
static void _Jv_##_name (int, siginfo_t *_sip, void *_p)
|
||||
|
||||
class java::lang::Throwable;
|
||||
|
||||
|
@ -58,6 +58,53 @@ do \
|
|||
_sc->sc_ip++; \
|
||||
} \
|
||||
while (0)
|
||||
#elif defined(__sparc__)
|
||||
/* We could do the unwind of the signal frame quickly by hand here like
|
||||
sparc-signal.h does under Solaris, but that makes debugging unwind
|
||||
failures almost impossible. */
|
||||
#if !defined(__arch64__)
|
||||
#define MAKE_THROW_FRAME(_exception) \
|
||||
do \
|
||||
{ \
|
||||
/* Sparc-32 leaves PC pointing at a faulting instruction \
|
||||
always. So we adjust the saved PC to point to the following \
|
||||
instruction; this is what the handler in libgcc expects. */ \
|
||||
/* Note that we are lying to the unwinder here, which expects the \
|
||||
faulting pc, not pc+1. But we claim the unwind information can't \
|
||||
be changed by such a ld or st instruction, so it doesn't matter. */ \
|
||||
struct sig_regs { \
|
||||
unsigned int psr, pc, npc, y, u_regs[16]; \
|
||||
} *regp; \
|
||||
unsigned int insn; \
|
||||
__asm__ __volatile__("ld [%%i7 + 8], %0" : "=r" (insn)); \
|
||||
if (insn == 0x821020d8) \
|
||||
regp = (struct sig_regs *) _sip; \
|
||||
else \
|
||||
regp = (struct sig_regs *) (_sip + 1); \
|
||||
regp->pc = regp->npc; \
|
||||
regp->npc += 4; \
|
||||
} \
|
||||
while (0)
|
||||
#else
|
||||
#define MAKE_THROW_FRAME(_exception) \
|
||||
do \
|
||||
{ \
|
||||
/* Sparc-64 leaves PC pointing at a faulting instruction \
|
||||
always. So we adjust the saved PC to point to the following \
|
||||
instruction; this is what the handler in libgcc expects. */ \
|
||||
/* Note that we are lying to the unwinder here, which expects the \
|
||||
faulting pc, not pc+1. But we claim the unwind information can't \
|
||||
be changed by such a ld or st instruction, so it doesn't matter. */ \
|
||||
struct pt_regs { \
|
||||
unsigned long u_regs[16]; \
|
||||
unsigned long tstate, tpc, tnpc; \
|
||||
unsigned int y, fprs; \
|
||||
} *regp = (struct pt_regs *) (_sip + 1); \
|
||||
regp->tpc = regp->tnpc; \
|
||||
regp->tnpc += 4; \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
#else
|
||||
#define MAKE_THROW_FRAME(_exception) \
|
||||
do \
|
||||
|
@ -67,7 +114,7 @@ do \
|
|||
while (0)
|
||||
#endif
|
||||
|
||||
#ifndef __ia64__
|
||||
#if !(defined(__ia64__) || defined(__sparc__))
|
||||
#define INIT_SEGV \
|
||||
do \
|
||||
{ \
|
||||
|
@ -100,7 +147,7 @@ while (0)
|
|||
* go away once all systems have pthreads libraries that are
|
||||
* compiled with full unwind info. */
|
||||
|
||||
#else /* __ia64__ */
|
||||
#else /* __ia64__ || __sparc__ */
|
||||
|
||||
// FIXME: We shouldn't be using libc_sigaction here, since it should
|
||||
// be glibc private. But using syscall here would mean translating to
|
||||
|
@ -136,5 +183,5 @@ do \
|
|||
__libc_sigaction (SIGFPE, &act, NULL); \
|
||||
} \
|
||||
while (0)
|
||||
#endif /* __ia64__ */
|
||||
#endif /* __ia64__ || __sparc__ */
|
||||
#endif /* JAVA_SIGNAL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue