gdb remote stubs
C. M. Heard/VVNET, Inc.
heard@vvnet.com
Thu Feb 5 15:54:00 GMT 1998
On Thu, 5 Feb 1998, Joel Sherrill wrote:
[ ... ]
> > I'm currently trying to learn enough to write such a stub. Any pointers?
>
> Other than whatever source and documentation is included with gdb, I do
> not know of anything. gdb 4.16 has remote stubs for i386, m68k, and the
> sparc. The last gdb snapshot I looked at also included stubs for the sh
> and m32r. It also included support for a much wider variety of ROM
> monitors.
There is also one for the IDT R4600 (a MIPS 4000-series machine) available
by anonymous ftp from
ftp://ftp.cygnus.com/pub/embedded/r46kstub.tar.gz
or, with slightly updated porting hints, at
ftp://ftp.vvnet.com/gdb/r46kstub.tar.gz
There is also a README file available at
ftp://ftp.vvnet.com/gdb/r46kstub.README
This stub differs from the ones in the gdb distribution in that it runs
stand-alone in ROM. I wrote it, in fact, for initial board bring-up (a
logic analyzer was used to debug the stub :-).
> The pc stub over a com port should not be THAT difficult. There is
> already an i386 stub included in the current gdb so it should be a matter
> of doing the IO and integrating it. Then give the world instructions and
> the code. :)
>
> Providing a stub for CPUs like the PowerPC would be more challenging but
> the protocol is well-defined and starting with an example for a cpu you
> understand would help. I suspect many folks would start with the m68k or
> i386. :)
When I wrote the R4600 stub I looked over the all the stubs bundled with
gdb-4.16, especially the i386 stub because I knew that CPU, but decided
in the end to start from the sh stub even though I did not know that CPU
at all. I did so because the sh stub seemed to me to be by far and away
the best organized and easiest to understand.
>
> I hope this helps.
>
Likewise ...
> --joel
Mike
--
C. M. Heard/VVNET, Inc.
heard@vvnet.com
More information about the crossgcc
mailing list