News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Debugger cannot open files

Started by carrejans, November 19, 2009, 02:00:49 PM

Previous topic - Next topic

carrejans

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...

MortenMacFly

Quote from: carrejans on November 19, 2009, 02:00:49 PM
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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

carrejans

Sorry.
Here is more info:

Windows XP
CodeBlocks Nightly Build 5911 (the latest one)
Mingw GDB debugger 6.3.2

carrejans

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.

oBFusCATed

Please update to gdb 6.8 or 7.0+ 6.3 is quite old!!!!!
(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!]

carrejans

Quote from: oBFusCATed on November 19, 2009, 03:55:09 PM
Please update to gdb 6.8 or 7.0+ 6.3 is quite old!!!!!

Still the same problem.

ollydbg

It seems you want to step into the wxwidget library(debug version). My question is: How do you build your wxWidget library?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

carrejans

Quote from: ollydbg on November 19, 2009, 04:51:37 PM
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)


ollydbg

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?
report the Debugger problem about the tracking into wxWidgets source

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




If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

carrejans

Quote from: ollydbg on November 19, 2009, 05:23:15 PM
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?
report the Debugger problem about the tracking into wxWidgets source

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".











ollydbg

Quote from: carrejans on November 20, 2009, 09:57:39 AM

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Jenna

Quote from: ollydbg on November 20, 2009, 02:31:44 PM
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).

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

carrejans

After clicking "Advanced Options...".
Is it the last checkbox (see my attachment)?
It was already checked.  :?

[attachment deleted by admin]

ollydbg

Quote from: carrejans on November 20, 2009, 03:27:50 PM
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.