Code::Blocks Forums

User forums => Help => Topic started by: pit on July 01, 2009, 12:40:34 pm

Title: Debugger search directories
Post by: pit on July 01, 2009, 12:40:34 pm
hello
i'm debugging console executable (debian, codeblocks svn 5671)
it is interacting with a library for which i made a debug version and load it when debugging by setting LD_LIBRARY_PATH pointing to the place where debug version exists. It's all good, it loads and when stopping at breakpoint i saw source file names in call stack but when clicking corresponding line i get a message in debugger window:

Code
Cannot open file: /home/pit/src/fvwm-gnomemenu/menu-monitor.c

i.e. codeblocks tries to search source file in main project folder(/home/pit/src/fvwm-gnomemenu/), while the sources of library is realy in another

When opening this file and setting breakpoint manually - all works ok, but it' very unconvenient when it is not possible to use call stack window

i'm nor realy sure, is it right, but i tried to include library sources folder in Debugger search dirs, but is doesn't help
Title: Re: Debugger search directories
Post by: julien on July 13, 2009, 09:08:45 am
I have exactly the same problem.

I'm trying to debug a library build somewhere else by somebody else (i.e. with different source file paths). I adjusted gdb's substitute-path and C::B finds the source files if single steppping into a library function.
However it doesn't find the source when clicking in the stack trace.

It appears like C::B is trying to open the source file with the absolute name, not honoring gdbs substitute-path.
But why does it find the source correctly when single stepping?