gdb with librdbg support

Till Straumann strauman at
Thu Feb 15 17:04:11 UTC 2007

Joel Sherrill wrote:
> Nickolay Kolchin wrote:
>> Hello,
>> Where I can get GDB with librdbg support? All gdb versions on
>> (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:


-- Till
> comments here. :)
> --joel
>> ---
>> Nickolay
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at
> _______________________________________________
> rtems-users mailing list
> rtems-users at

More information about the users mailing list