Author Topic: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)  (Read 2599 times)

Offline The-Kenny

  • Multiple posting newcomer
  • *
  • Posts: 10
Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
« 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.
« Last Edit: November 10, 2007, 04:32:33 pm by The-Kenny »

Offline The-Kenny

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
« Reply #1 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7130
    • My Best Post
Re: Debugging inline functions (MinGW 4.2.1, GDB 6.6, Windows XP)
« Reply #2 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
« Last Edit: November 12, 2007, 02:04:53 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org