Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Expressions not always updating
Expressions not always updating [message #821578] Thu, 15 March 2012 14:55 Go to next message
Aero Engineer is currently offline Aero EngineerFriend
Messages: 5
Registered: March 2012
Junior Member
I have several Watch Expressions that I am following through a debug session. However, I noticed that some of the expressions were not updating as they should have in the code. I confirmed this by doing a command line gdb session (which is the same debugger that I am using in CDT: gdb/mi).

All I was following were simple indices in nested for loops, just like below:

for ( int i = 0; i<num_rows; i++ )
{
<code>
for ( int j = 0; j < 4; j++ )
{
<code>
}
}

"i" and "j" were not updating properly in the Expressions view.

I am running eclipse Galileo with CDT Version 6.0.0.200909110608 in a Linux environment. Any idea why the above occurs? Does a later version of CDT solve the problem?
Re: Expressions not always updating [message #822139 is a reply to message #821578] Fri, 16 March 2012 08:07 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
I did not experience the problems you mentioned with Galileo. Do you have any compiler optimization turned on?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Expressions not always updating [message #822498 is a reply to message #822139] Fri, 16 March 2012 18:18 Go to previous messageGo to next message
Aero Engineer is currently offline Aero EngineerFriend
Messages: 5
Registered: March 2012
Junior Member
Yes, there are some optimizer options set for the gcc compiler in the Makefile.
Re: Expressions not always updating [message #825860 is a reply to message #822498] Wed, 21 March 2012 10:50 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Aero Engineer wrote on Fri, 16 March 2012 19:18
Yes, there are some optimizer options set for the gcc compiler in the Makefile.

If optimization is turned you will get funny results during debug. Because the compiler might rearrange your code and omit some variables. I guess the second loop in your example with constant length of 4 will be completely replaced in the optimized code.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Expressions not always updating [message #836613 is a reply to message #825860] Wed, 04 April 2012 17:52 Go to previous messageGo to next message
Aero Engineer is currently offline Aero EngineerFriend
Messages: 5
Registered: March 2012
Junior Member
Thanks for your answer. I just now got back to working on this issue.
Re: Expressions not always updating [message #836829 is a reply to message #836613] Thu, 05 April 2012 00:40 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
Very Happy
Re: Expressions not always updating [message #836830 is a reply to message #836829] Thu, 05 April 2012 00:40 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
Surprised
Re: Expressions not always updating [message #836831 is a reply to message #836830] Thu, 05 April 2012 00:40 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
hytdfhtrshtr
Re: Expressions not always updating [message #836832 is a reply to message #836831] Thu, 05 April 2012 00:43 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
rewarfretgtretg
Re: Expressions not always updating [message #836833 is a reply to message #836832] Thu, 05 April 2012 00:43 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
agree
Re: Expressions not always updating [message #836834 is a reply to message #836833] Thu, 05 April 2012 00:43 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
great
Re: Expressions not always updating [message #836837 is a reply to message #836834] Thu, 05 April 2012 00:44 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
more than words
Re: Expressions not always updating [message #836838 is a reply to message #836837] Thu, 05 April 2012 00:44 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
more than words
Re: Expressions not always updating [message #836839 is a reply to message #836838] Thu, 05 April 2012 00:44 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
Thanks for your post
Re: Expressions not always updating [message #836840 is a reply to message #836839] Thu, 05 April 2012 00:45 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
Great idea!
Re: Expressions not always updating [message #836844 is a reply to message #836840] Thu, 05 April 2012 00:50 Go to previous messageGo to next message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
thanks a lot
Re: Expressions not always updating [message #836847 is a reply to message #836844] Thu, 05 April 2012 00:55 Go to previous message
Lydia Jackson is currently offline Lydia JacksonFriend
Messages: 12
Registered: April 2012
Junior Member
excellent
Previous Topic:How to get rid of old compilers "include paths not found" warnings?
Next Topic:syntax error after including class definition
Goto Forum:
  


Current Time: Fri Mar 29 08:40:59 GMT 2024

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

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

Back to the top