This is the mail archive of the
mailing list for the Java project.
Patch: MIPS support for libjava.
- From: Andrew Haley <aph at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Tue, 9 Sep 2003 14:16:34 +0100
- Subject: Patch: MIPS support for libjava.
- References: <3F5D2000.firstname.lastname@example.org>
David Daney writes:
> Here is a patch against 3.3.1 that adds SIGSEGV handling of
> NullPointerExceptions for a MIPS host. It also contains a custom
> backtrace function as the version we have in our libc is broken.
Do we have copyright assignment papers from you?
I think you can just call your version backtrace() -- link precedence
will sort out the ordering, so you don't need any heavy configury
>From what I can see, you jump to the magic code that restores some
registers form the signal frame and then that code jumps to
The unwinder sees that the return address points to the middle of
__sig2exdummy and unwinds from there. The return address of
__sig2exdummy points just after the faulting insn.
What I can't quite see is how scratch registers that are destroyed by
the signal handler will be restored. As far as I can see there's
nothing to restore them. $16..$23 are restored, but not $12..$15 or
$31, and the compiler won't expect these to be trashed by a faulting
The official way to do this is to define MD_FALLBACK_FRAME_STATE_FOR
in arch/linux.h. See gcc/config/rs6000/linux.h for an example.