Author Topic: Test output of Debugger plugin failing to parse call stack  (Read 5106 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Test output of Debugger plugin failing to parse call stack
« on: August 12, 2009, 02:58:49 pm »
This is not the first time that I encounter this problem, but I will take this opportunity to quickly post it now that I have it at hand.

Sending bt to the Debugger returns this during a debugging session:

#0  RWProperty<int, TBuilding, &(TBuilding::FGetCurrentFloorNumber() const), &(TBuilding::FSetCurrentFloorNumber(int))>::operator= (this=0x22fcbc, value=@0x22fcc8) at inc/Property.h:225
#1  0x0041535f in test () at C:\Programming\TestProperty\src\main.cpp:589
#2  0x00417624 in main () at C:\Programming\TestProperty\src\main.cpp:798


The call stack window only shows frames 1 and 2. Going to the next line seems to go to the right file in the right line, then it sends me back to the file and line in frame #1 (which is not where the debugger really is).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Test output of Debugger plugin failing to parse call stack
« Reply #1 on: August 12, 2009, 05:10:46 pm »
This is not the first time that I encounter this problem, but I will take this opportunity to quickly post it now that I have it at hand.
What happens if you compile with full path's for the debugger? (The switch in the "advanced" settings?)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Test output of Debugger plugin failing to parse call stack
« Reply #2 on: August 13, 2009, 08:15:49 am »
This is not the first time that I encounter this problem, but I will take this opportunity to quickly post it now that I have it at hand.
What happens if you compile with full path's for the debugger? (The switch in the "advanced" settings?)

Well... that option was already set. I re-tried anyway, and the behavior is the same. This is what I get from the Debugger logger:

Debugger name and version: GNU gdb 6.8
Child process PID: 200
At C:\Programming\TestProperty\src\main.cpp:592
At C:/Programming/TestProperty/inc/Property.h:218
At C:\Programming\TestProperty\src\main.cpp:592


The IDE sends me to line 218 in Property.h, then it goes back immediately to line 592 in main.cpp. Thing is, the debugger is still in Property.h, but the IDE thinks it is in main.cpp.

Something worth noting is that for Property.h the path uses forward slashes only, whereas for main.cpp it uses backslashes. I do really think it is a problem with the plugin parsing the output.

Here is what happens when I debug it through the command line:

Quote
C:\Programming\TestProperty\bin\Debug>gdb TestProperty.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) b main.cpp:592
Breakpoint 1 at 0x4153a6: file C:\Programming\TestProperty\src\main.cpp, line 592.
(gdb) r
Starting program: C:\Programming\TestProperty\bin\Debug/TestProperty.exe
[New thread 2820.0xe30]
Breakpoint 1, test () at C:\Programming\TestProperty\src\main.cpp:592
592             building.CurrentFloorNumber = x;
(gdb) s
RWProperty<int, TBuilding, &(TBuilding::FGetCurrentFloorNumber() const), &(TBuilding::FSetCurrentFloorNumber(int))>::operator=  (this=0x22fcb4,    value=@0x22fcc0) at inc/Property.h:218
218                 (m_object->*WM)(value.Get<T>());
(gdb) bt
#0  RWProperty<int, TBuilding, &(TBuilding::FGetCurrentFloorNumber() const), &(TBuilding::FSetCurrentFloorNumber(int))>::operator= (this=0x22fcb4,    value=@0x22fcc0) at inc/Property.h:218
#1  0x004153bc in test () at C:\Programming\TestProperty\src\main.cpp:592
#2  0x00417681 in main () at C:\Programming\TestProperty\src\main.cpp:801
(gdb)