News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How to associate library sources with debugger

Started by jfwfmt, December 30, 2014, 04:00:40 AM

Previous topic - Next topic

jfwfmt

I'm trying to debug a program and seeing stepping through the source for getopt_long() would be useful.
I'm using Code::Blocks 13.12 on latest Ubuntu.  I'm using the clang compiler and has used the Ubuntu Software Center to download the GNU c library sources.
I get a message "cannot open file: getoptl.c" I haven't found an option to the debugger to associate sources files with library routines.

Thanks.

oBFusCATed

You have to check if the ubuntu project provides the source files for the packages they build.
The easiest solution to this problem is to build the library yourself, because stepping through optimized code is rarely useful.
But I don't know how easy it is to replace the libc, probably not very easy.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]