Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Expressions not always updating
Expressions not always updating [message #821578] Thu, 15 March 2012 10:55 Go to next message
Eclipse UserFriend
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 04:07 Go to previous messageGo to next message
Eclipse UserFriend
I did not experience the problems you mentioned with Galileo. Do you have any compiler optimization turned on?
Re: Expressions not always updating [message #822498 is a reply to message #822139] Fri, 16 March 2012 14:18 Go to previous messageGo to next message
Eclipse UserFriend
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 06:50 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Expressions not always updating [message #836613 is a reply to message #825860] Wed, 04 April 2012 13:52 Go to previous messageGo to next message
Eclipse UserFriend
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] Wed, 04 April 2012 20:40 Go to previous messageGo to next message
Eclipse UserFriend
Very Happy
Re: Expressions not always updating [message #836830 is a reply to message #836829] Wed, 04 April 2012 20:40 Go to previous messageGo to next message
Eclipse UserFriend
Surprised
Re: Expressions not always updating [message #836831 is a reply to message #836830] Wed, 04 April 2012 20:40 Go to previous messageGo to next message
Eclipse UserFriend
hytdfhtrshtr
Re: Expressions not always updating [message #836832 is a reply to message #836831] Wed, 04 April 2012 20:43 Go to previous messageGo to next message
Eclipse UserFriend
rewarfretgtretg
Re: Expressions not always updating [message #836833 is a reply to message #836832] Wed, 04 April 2012 20:43 Go to previous messageGo to next message
Eclipse UserFriend
agree
Re: Expressions not always updating [message #836834 is a reply to message #836833] Wed, 04 April 2012 20:43 Go to previous messageGo to next message
Eclipse UserFriend
great
Re: Expressions not always updating [message #836837 is a reply to message #836834] Wed, 04 April 2012 20:44 Go to previous messageGo to next message
Eclipse UserFriend
more than words
Re: Expressions not always updating [message #836838 is a reply to message #836837] Wed, 04 April 2012 20:44 Go to previous messageGo to next message
Eclipse UserFriend
more than words
Re: Expressions not always updating [message #836839 is a reply to message #836838] Wed, 04 April 2012 20:44 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your post
Re: Expressions not always updating [message #836840 is a reply to message #836839] Wed, 04 April 2012 20:45 Go to previous messageGo to next message
Eclipse UserFriend
Great idea!
Re: Expressions not always updating [message #836844 is a reply to message #836840] Wed, 04 April 2012 20:50 Go to previous messageGo to next message
Eclipse UserFriend
thanks a lot
Re: Expressions not always updating [message #836847 is a reply to message #836844] Wed, 04 April 2012 20:55 Go to previous message
Eclipse UserFriend
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: Tue Jul 01 16:34:44 EDT 2025

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

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

Back to the top