Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » gdb does not follow the logical flow of my code(gdb's step in eclipse cdt (Helios) jumps up and down instead of following internal logic)
gdb does not follow the logical flow of my code [message #557045] Fri, 03 September 2010 17:42 Go to next message
Mattia  is currently offline Mattia Friend
Messages: 5
Registered: September 2010
Junior Member
I am debugging c++ code from eclipse cdt helios version with gdb 7.1: The code IS actually executed correctly, but the line highlight behaves in the most schizophrenic way: instead of following the logic in my code, it jumps a few lines up and down or just skips them; it also delays updating variable values in the "Varibales" tab and printing my couts on eclipse's console.
It is really frustrating, especially since the "Varaiables" tab itself seems to be most uninformative: changes in most variables are updated straight away or their values read "<value optimized out>".
I installed support for printing STL containers (see http://sourceware.org/gdb/wiki/STLSupport). Could that be the cause of all this mess?

I am very puzzled.

??

Thank you,
Mattia
Re: gdb does not follow the logical flow of my code [message #557046 is a reply to message #557045] Fri, 03 September 2010 17:56 Go to previous messageGo to next message
Austin Morgan is currently offline Austin MorganFriend
Messages: 42
Registered: July 2009
Member
It sounds like you are debugging an optimized build of your code. Make
sure that you optimizations are turned off -O0 and see if you get the
same issue.
Re: gdb does not follow the logical flow of my code [message #557292 is a reply to message #557046] Mon, 06 September 2010 14:07 Go to previous message
Mattia  is currently offline Mattia Friend
Messages: 5
Registered: September 2010
Junior Member
-O0 fixed it!
Thank you!
Previous Topic:Making a editor like CEditor
Next Topic:HPUSB ICE and Blackfin processor
Goto Forum:
  


Current Time: Fri Nov 28 16:02:26 GMT 2014

Powered by FUDForum. Page generated in 0.01833 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software