Subject: Re: Cross-debugging using GDB, building retargetted GDB
To: Wayne Knowles <wdk@netbsd.org>
From: Rafal Boni <rafal@mediaone.net>
List: port-sgimips
Date: 04/23/2001 08:15:53
In message <Pine.OSF.4.21.0104232152480.142613-100000@neptune.niwa.cri.nz>, you
 write: 

-> Several people have experienced problems building the toolchain from the
-> netbsd sources.  The bugs are slowly being fixed.  For me I had more
-> success building GDB from the gnu distribution for a MIPSEB target:

It was actually generally pleasant to build other than GDB, though I'm
not so sure the in-tree toolchain produces better kernels than the pkgsrc
cross-mipseb one (this may just be a side effect of the two producing
different code, but the in-tree one builds very crash-prone kernels when
build from x86).

-> You should be able to configure GDB using
-> 
->   configure  --target=mips-netbsd-elf --disable-sim

Cool, I'll do that for now, and maybe when I get a little more time
I'll look at what it would take to beat the in-tree one to be able
to be built for a different target.

-> Out of all the MIPS based ports only the mipsco port has KGDB kernel
-> debugging... and even then there are a few limitations.

Right... Since it seems the GDB end of it is doable, the next thing on
my plate (after getting a few more quirks out of the zs driver that seem
to crop up) is skeletal KGDB support.  I suppose I'll steal lots of it 
from mipsco 8-)

-> As for the sgimips port - most of KGDB is already there since it uses the
-> MI serial port routines.  What the sgimips port lacks is the call to
-> kgdb_attach() at system startup, and the necessary options in the config
-> file.  Both of these should be trivial to fix.

I'm actually interested getting this running on the Indy/Indigo2 hardware,
which uses the zs code, but the story is pretty much the same if you
s;com;zs;g.

Thanks for the hints!
--rafal

----
Rafal Boni                                                  rafal@mediaone.net