Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: unilynx on June 11, 2010, 10:33:08 am

Title: How to use GDB when project paths in codeblocks differ from make's paths
Post by: unilynx on June 11, 2010, 10:33:08 am
I have an existing makefile project which I'm trying to run under Codeblocks (on WinXP, a mingw project)

Our buildsystem builds openssl, libpng and many other libraries before building our own project, so we use a mingw environment for the build. The effect is that in the debugging information, paths show as:

#7  0x004e0fac in SecureListener (rightend=0x3eaf48) at ../webhare/blex/tests/testnet.cpp:338

(the build is done in a separate directory "Q:/whbuild32/", and it refers to the source tree using "../")

Unfortunately, CodeBlocks is using different paths to set breakpoints. From the debuglog:

> break "Q:/webhare/blex/tests/testnet.cpp:325"
No source file named Q:/webhare/blex/tests/testnet.cpp.
Breakpoint 2 ("Q:/webhare/blex/tests/testnet.cpp:325) pending.

If I type break "../webhare/blex/tests/testnet.cpp:325" myself, the breakpoint is set.

gdb's substitute-path isn't helping to make it recognize the Q:/ path. Is there a way to get CodeBlocks to refer to my files using '../' when talking to GDB, instead of using 'Q:/' ?
Title: Re: How to use GDB when project paths in codeblocks differ from make's paths
Post by: oBFusCATed on June 11, 2010, 07:01:46 pm
Can you provide simple test project?

Also what is you cb and gdb versions?