gdb with librdbg support
nbkolchin at gmail.com
Thu Feb 15 18:44:56 UTC 2007
Many thanks. I was able to make a working gdb server with patched gdb
and stub from Straumann site. Only minor changes for correct
compilation under gcc 4.1.1 were required.
On 2/15/07, Till Straumann <strauman at slac.stanford.edu> wrote:
> Joel Sherrill wrote:
> > Nickolay Kolchin wrote:
> >> Hello,
> >> Where I can get GDB with librdbg support? All gdb versions on
> >> ftp.rtems.com (4.18, 5.2) are build for powerpc-rtems, not
> >> powerpc-RTEMS. So, commands from librdbg manual (setrpcmode,
> >> setdaemontype, target rtems) don't work.
> >> Building GDB from sources (5.2.1 with all Patches applied), fails on
> >> configure stage:
> >> ....
> >> Invalid configuration `powerpc-RTEMS': system `RTEMS' not recognized
> >> Unrecognized target system name powerpc-RTEMS.
> >> ....
> >> Afaik, no rgbd patches for GDB 6.x exist.
> >> So, how librdbg can be used?
> > AFAIK librdbg can't be used with a modern gdb. The internal structure of
> > gdb changed and no one has updated the code. IMO this means that rdbg
> > is becoming obsolete and you are better off using the standard gdb remote
> > protocol and stubs.
> > Till Straumann has some nice support for gdb with dynamically loaded modules
> > at his site. Google for "Till cexp" and it will turn up. Maybe Till
> > will add some
> My gdb server daemon talks the gdb remote protocol over
> TCP (normal use) or a serial link (very useful if you want
> to debug the network stack or drivers).
> It is designed to be 'lightweight' i.e., it doesn't freeze the
> target in its track but only suspends individual threads that
> you either explicitly attach to or that run into a breakpoint.
> This was a design choice - the advantage being that you can
> leave parts of your application running (networking, real-time
> critical tasks) and keep gdb's intrusion minimal.
> This implies, however, that the daemon needs a functional
> OS, i.e., it is not possible to debug exception handling,
> ISRs, context switching code and the like.
> As with all remote debugging, usage requires some learning.
> GDB itself can be confusing because not all commands/options
> supported by GDB itself are supported by all targets or even
> make sense on all targets (e.g., most 'process' related things
> don't apply to RTEMS).
> My daemon supports the new exception PPC, i386 and m68k
> While the package supports the CEXP shell (i.e. it knows
> how to access linkage information for loaded modules)
> you can use it perfectly fine without the CEXP shell.
> Download + documentation can be found here:
More information about the users