Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: The-Kenny on November 10, 2007, 04:22:55 pm

Title: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
Post by: The-Kenny on November 10, 2007, 04:22:55 pm
Hello,

I'm trying to debug with Code::Blocks, and it works well.
There is only one problem: I can't debug functions which are defined and declined in a header.

Every time I try to set a breakpoint I get the message:
Quote
Breakpoint 2 ("J:/Development/Projekte/OpenGL/src/classes.h:210) pending.
No source file named J:/Development/Projekte/OpenGL/src/classes.h.

And the debugger does simply nothing.
Breakpoints in .cpp-files are working without problems.

Am I simply to stupid for debugging, or is this a normal behaviour? When yes, is there a workaround for this?

Edit:

I tried -g, -gdb, -gstabs and -gstabs+, nothing changed.
Title: Re: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
Post by: The-Kenny on November 11, 2007, 11:42:32 pm
Hm... it won't work if I send the same command Code::Blocks sends, but if I add another '/' before the filename it works...

Works not:
Quote
break "J:/Development/Projekte/OpenGL/src/math.h:143"

Works:
Quote
break "J:/Development/Projekte/OpenGL/src//math.h:143"

The problem only affects header-files.

Is there a chance for a patch?
Title: Re: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
Post by: stahta01 on November 12, 2007, 01:02:11 am
Problem may be in GDB.

See here for confirmation, I am guessing that attach is used by break. This is a wild guess on my part.
http://www.nabble.com/gdb-6.7-t4715626.html

Tim S