[olsr-dev] using gdb on the plugins

Christoffer Andersson (spam-protected)
Mon Nov 15 15:58:40 CET 2004


Hmm.  Are you sure that you are compiling your library with debug information?

My compiler options are : -Wall -fPIC -g

the -g is debug info, and I have no trouble finding line number information in the GDB.

My biggest problem is in fact setting gdb/DDD up so that it finds the file, but I 
have never had problems with the line number information.

Regards,
Christoffer Andersson

-----Original Message-----
From: (spam-protected) [mailto:(spam-protected)]On
Behalf Of Jens Nachtigall
Sent: 15. november 2004 15:40
To: (spam-protected)
Subject: Re: [olsr-dev] using gdb on the plugins


Hi Christoffer,

I said as you told me. However, still the same, that I cannot step line 
by line through the plugin's source code.

I attached a log file showing what I did within gdb. Maybe someone could 
try to reproduce this. I've already been trying to get around this for 
some hours. And google only tells me about a bunch of mail threads, 
which I did not find very helpful so far :(

Kind regards,
Jens


> I have been able to make it work by simply adding a break in the
> olsrd code first and then adding a break in the plugin code.  Olsr
> must be running and have the plugin loaded before the gdb recognises
> the plugins.  Simply adding a break in the plugin code from gdb did
> not work.
>
> First add a break in olsrd, I usually break in net_output,
> when I know OLSR is running and my plugin has been loaded.
>
> Then you can add a breakpoint in your plugin code and tell gdb to
> continue. You may have to tell gdb where your plugin code is or cd to
> it. I use DDD debugger, so I am not a specialist in gdb commands.  I
> quite like the GUI of DDD.
>
> Anyway, this should enable you to break in the plugin code.
>
> Regards,
> Christoffer Andersson
> Thales Norway


More information about the Olsr-dev mailing list