Code::Blocks Forums
User forums => Help => Topic started by: carrejans on November 19, 2009, 02:00:49 pm
-
Hi,
When I use the debugger in codeblocks, and I want to open the functions of the stack, I get something like this:
Cannot open file: C:\prog\src\common\event.cpp
Cannot open file: C:\prog\src\common\event.cpp
Cannot open file: C:\prog\src\msw\frame.cpp
Cannot open file: C:\prog\src\msw\window.cpp
Is there something wrong with my debugger settings?
Thanks...
-
Is there something wrong with my debugger settings?
Probably not. But definitely something is wrong with your posting.
What platform, OS, what C::B version, what compiler (version), what debugger (version), please?
-
Sorry.
Here is more info:
Windows XP
CodeBlocks Nightly Build 5911 (the latest one)
Mingw GDB debugger 6.3.2
-
So if I want to open the location (doubleclick on the entry on the stack), it wants to open the cpp files at the wrong directery.
It searches in my project directory: c:\prog, in stead of the directory of the wxwidgets cpp files.
How can I change this?
I already tried to add the wxWidgets directory to "Additional Debugger Search Dirs". But doesn't help.
-
Please update to gdb 6.8 or 7.0+ 6.3 is quite old!!!!!
-
Please update to gdb 6.8 or 7.0+ 6.3 is quite old!!!!!
Still the same problem.
-
It seems you want to step into the wxwidget library(debug version). My question is: How do you build your wxWidget library?
-
It seems you want to step into the wxwidget library(debug version). My question is: How do you build your wxWidget library?
Something likes this:
mingw32-make.exe -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
and
mingw32-make.exe -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1
I have used them, and they work. Don't have any compiler errors either, but my program crashes.
So, I want to debug. But I get the error that they can't find the files. (debugger searches in the wrong directory)
-
Some months ago, I used the wxPack, then I can't debug into the wxWidget's source code.
See my post:
how to debug into wxwidget source code? (http://forums.codeblocks.org/index.php/topic,9744.0.html)
report the Debugger problem about the tracking into wxWidgets source (http://forums.codeblocks.org/index.php/topic,9792.0.html)
I guess this is a issue about the path problem.
You should use the "absolute path" to build your project.
Check this option: settings->compiler and debugger settings-> advanced compiler options -> use full path for source files
-
Some months ago, I used the wxPack, then I can't debug into the wxWidget's source code.
See my post:
how to debug into wxwidget source code? (http://forums.codeblocks.org/index.php/topic,9744.0.html)
report the Debugger problem about the tracking into wxWidgets source (http://forums.codeblocks.org/index.php/topic,9792.0.html)
I guess this is a issue about the path problem.
You should use the "absolute path" to build your project.
Check this option: settings->compiler and debugger settings-> advanced compiler options -> use full path for source files
Good to see I'm not alone with this problem.
So the only solution this far is to have your project in the samples directory of wxWidgets.
Or are you saying that with using an absolute path, it can be solved too?
I can find: settings->compiler and debugger...
But then I can't find the "advanced compiler options"; and neither "use full path for source files".
-
Or are you saying that with using an absolute path, it can be solved too?
But then I can't find the "advanced compiler options"; and neither "use full path for source files".
Yes, the problem was solved.
The "advanced compiler options" is a button in the right bottom.
-
The "advanced compiler options" is a button in the right bottom.
To be more precisely it's called "Advanced options" and you can find it at: "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings" ( the rightmost tab).
-
Ok, it's here. see the image.
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2009-11-20215003.png)
-
After clicking "Advanced Options...".
Is it the last checkbox (see my attachment)?
It was already checked. :?
[attachment deleted by admin]
-
After clicking "Advanced Options...".
Is it the last checkbox (see my attachment)?
It was already checked. :?
yes, you are right.
In my system(Windows XP), I can debug into the wxWdigets source.
Note: I'm not sure how you build wx Debug library. When building the library, you also need to use the "full path" option.
-
I just tested it on vista with a wizard-created standard-project, no special settings, and debugging into wxWidgets works fine.
Self build (of course) C::B from trunk (r5923).
wxWidgets 2.8.10 build the same way as yours.
All build with TDM's gcc 4.4.1-2, debugger is gdb 7.02.
The project is in "c:\new\tmp\testtt", wxWidgets is below "c:\wxwidgets-2.8.10", that's also the base path of the global variable "wx", all other fields of the settings for "wx" are left empty.
-
Still haven't found a solution to my problem.
I make use of wxwidgets 2.9.0 and last nightly build of codeblocks.
-
Still haven't found a solution to my problem.
I make use of wxwidgets 2.9.0 and last nightly build of codeblocks.
Both jens and me have no problem debug into the wx source code. So I still suggest you can use wxWidgets 2.8.10.(because I havn't tried 2.9.0).
The last suspect is : did you have some space between the folder names? such as your wxWidgets library path is :
C:\XXXXX XXXXX\
This may cause some problems in my opinion GDB can't debug into a source file with space in full path names. :D
-
Still haven't found a solution to my problem.
I make use of wxwidgets 2.9.0 and last nightly build of codeblocks.
Both jens and me have no problem debug into the wx source code. So I still suggest you can use wxWidgets 2.8.10.(because I havn't tried 2.9.0).
The last suspect is : did you have some space between the folder names? such as your wxWidgets library path is :
C:\XXXXX XXXXX\
This may cause some problems in my opinion GDB can't debug into a source file with space in full path names. :D
No, no spaces in path.
I use some things from 2.9, that don't exist in 2.8.10. :?
-
After reading this thread again, I can confirm this problems.
I can debug into wWidgets, that means set a breakpoint in my code and then step into wxWidgets code.
Jumping into wxWidgets sources from the callstack does indeed not work.
The problem is, that wxWidgets is not compiled with full, but with relative paths, so C:::B does not know where to look for ../src/xxx.cpp.