MIPS remote debugging support (Was: Re: [kaffe] mipsel SIGSEGV)
robilad at kaffe.org
Tue Dec 9 07:26:02 PST 2003
Mark and Janice Juszczec wrote:
>> I'm not familiar with uisng gdb over wire, but judging by
>> http://sources.redhat.com/gdb/onlinedocs/gdb_19.html#SEC174 you need
>> to make sure your GDB on the PC was configured and built with
> Yes, it was. Its odd that the html doc you reference says I should be
> able to do:
> target r3900 <dev> to use "Densan DVE-R3900 ROM monitor for Toshiba
> R3900 Mips."
> because when I do help targets from gdb (configured with
> --target=mips-idt-ecoff) r3900 is not in the list.
That sounds like a good question for the gdb mailing list ;)
>> the other choice may be to use the gdbserver program on the mipsel
> I tried this. After stripping, gdbserver is too big to put on the Helio
> with kaffe, rt.jar, the kernel, etc.
I guess there are two more possibilities:
a) using kgdb to debug the kernel. Probably quite slow, if it works at
all. You need a kernel that's compiled with kgdb support.
b) Adding support for gdb stubs for mips to kaffe. There is a
mips-stub.c in the linux kernel sources  and there is some
documentation on using remote stubs .
You'd also have to change kaffe's main() to add
at the beginning.
Note that I have never done this myself, that's basically the
information I gathered by googling around for a while.
 include/asm-mips/gdb-stub.h and arch/mips/kernel/gdb-stub.c,
possibly gdb-low.S as well.
More information about the kaffe