News:

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

Main Menu

How to use GDB when project paths in codeblocks differ from make's paths

Started by unilynx, June 11, 2010, 10:33:08 AM

Previous topic - Next topic

unilynx

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:/' ?

oBFusCATed

Can you provide simple test project?

Also what is you cb and gdb versions?
(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!]