Author Topic: How to associate library sources with debugger  (Read 3398 times)

Offline jfwfmt

  • Single posting newcomer
  • *
  • Posts: 2
How to associate library sources with debugger
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How to associate library sources with debugger
« Reply #1 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.
(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!]