Author Topic: Debugger cannot do Step Into command and process system header.  (Read 5143 times)

dememax

  • Guest
Debugger cannot do Step Into command and process system header.
« on: September 17, 2008, 06:05:53 pm »
Why I cannot step into system header (.../4.3.1/include/g++-v4/tr1_impl/functional) from my source code by using Step Into command in Code::Blocks IDE?
The call stack is displayed perfectly but a double-click on a item in the system header doesn't show the source.
I'm using Code::Blocks 8.02 on Gentoo x86 Linux distribution.
GNU gdb 6.7.1, wxGTK 2.8.8.1, gcc 4.3.1.
I wonder why Insight can walk through system headers with the same binary built by Code::Blocks IDE...

Well, it looks like Code::Blocks don't see the header file as a C++ source code file: it has no extension.
But I don't see any reason why not to trust GNU gdb that the item in the stack is a C++ source code file and should be displayed.
« Last Edit: September 19, 2008, 03:42:28 pm by dememax »

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: Debugger cannot do Step Into command and process system header.
« Reply #1 on: September 18, 2008, 06:53:59 pm »
I have a slightly different problem that might be related - on Windows XP using CB SVN 5203 and gdb 6.8.
I am not sure this is a CodeBlocks issue - it might be due to gdb - but perhaps one of you guys can steer me in the right direction.

If I have inline code in a header file and set a break on one of the lines, gdb does not stop at the breakpoint.
I can Step into the function from the calling statement, say from main, but breakpoints and cursor locations are ignored when I do a Continue or Run to cursor inside the function.
The following is a typical debugger log output when I set a breakpoint (on line 84) inside the function:

   Setting breakpoints
   Debugger name and version: GNU gdb 6.8
   No source file named C:/Dev/libs/lib/inc/romberg.h in loaded symbols.
   Breakpoint 2 ("C:/Dev/libs/lib/inc/romberg.h:84) pending.
   Child process PID: 408
   Program exited normally.
   Debugger finished with status 0


From the third line above it appears there may be a symbols issue, but I don't know why.
My project settings include:
          Produce debugging symbols [-g] is set
          Strip all symbols from binary [-s] is not set.
          Also, I have no optimizations set.

I would appreciate any suggestions.

« Last Edit: September 18, 2008, 06:58:16 pm by rhf »

dememax

  • Guest
Re: Debugger cannot do Step Into command and process system header.
« Reply #2 on: September 19, 2008, 03:48:09 pm »
rhf > From the third line above it appears there may be a symbols issue, but I don't know why.

In my case, there is the alternative and I'm sure the problem is in the IDE.
http://sources.redhat.com/insight/ - it works with the same binary and can walk through.