Code::Blocks Forums

User forums => Help => Topic started by: jfwfmt on December 30, 2014, 04:00:40 am

Title: How to associate library sources with debugger
Post by: jfwfmt on December 30, 2014, 04:00:40 am
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.
Title: Re: How to associate library sources with debugger
Post by: oBFusCATed on December 30, 2014, 10:51:13 am
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.