Debugging question
Till Straumann
strauman at slac.stanford.edu
Thu Feb 24 23:35:23 UTC 2005
Peter Dufault wrote:
> Can I ask you directly what debugging setup I should setup for the
> mvme5500, i.e., GDB serial?
AFAIK, there is no support for GDB on this BSP out of the box. In cases
Iike yours,
i.e., when hitting an exception you can trace back manually:
a) disassemble the ELF object (powerpc-rtems-objdump -dr <objfile>)
b) work your way through the stack / register dump
With a cross-gdb [powerpc-eabi target] you can do this symbolically, of
course,
i.e., gdb will find the source code lines corresponding to the PC
addresses on the
stack [list *<pc_address>].
Regarding 'live debugging':
I wrote a GDB stub that can be used on powerpc/shared + derived BSPs.
Unfortunately, I had
no time to write documentation yet but the software as such is somewhat
working.
Here's what you need:
a) a recent [i.e., yet unreleased] version of 'libbspExt'. This library
provides a simple API
to hook/register exception handlers. The GDB stub needs this to
register its handler
which intercepts exceptions.
b) rtems-gdb-stub software package. This provides a GDB helper thread
implementing
the stub [interpreter of the GDB remote protocol]. Should work on
sockets and serial
ports but serial port support is not implemented yet [not hard to
do]. This means that
you need a working TCP/IP stack.
The package consists of generic material and architecture specific
pieces which are
currently implemented only for PPC/shared and pc386.
c) patch for GDB (small bugfix [i.e. fix is small, implications of the
bug are big]
+ support for loadable modules on the target [not an issue if you
don't use the cexp shell])
If you want to experiment with this stuff let me know and send you the
necessary bits...
HTH
-- Till
>
>
> I will research these things myself, but if you're willing to answer
> then I'm willing to ask. I'll be sure to document what I figure out
> on the mailing list and rtems "wiki".
>
> Thanks,
>
> Peter
>
> Peter Dufault
> HD Associates, Inc.
>
More information about the users
mailing list