Bug 79370 - problem with structures in Variable and Expressions views
Summary: problem with structures in Variable and Expressions views
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-24 07:23 EST by Petr Chladek CLA
Modified: 2020-09-04 15:20 EDT (History)
4 users (show)

See Also:


Attachments
Proposed fix. (800 bytes, patch)
2008-01-17 14:53 EST, Nobody - feel free to take it CLA
no flags Details | Diff
Fix a leak. (11.58 KB, patch)
2008-01-17 18:13 EST, Nobody - feel free to take it CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Chladek CLA 2004-11-24 07:23:56 EST
I'm using Eclipse 3.0.1 and CDT 2.1.0-RC3. I have problem with views Variables
and Expressions. For example I added an expressions MyStruct - it's a structure.
Because I want to see all items of this structure, I expanded it. But when I
continue with debugging (Step Into, Step Over, Resume), a structure view was
packed and I couldn't see any items. The same situation occurs when I changed
format of variable or when I displayd variable as an array. In Variable view it
occurs only when I changed format of variable or when I displayd variable as an
array. Petr Chladek
Comment 1 Nobody - feel free to take it CLA 2005-07-18 13:58:37 EDT
Deferred.
Comment 2 Nobody - feel free to take it CLA 2008-01-17 14:31:51 EST
We were seeing this problem whenever the struct variable was local to a function.  We fixed it by removing the call to invalidateValue() from CLocalVariable.setChanged().
Comment 3 Nobody - feel free to take it CLA 2008-01-17 14:53:53 EST
Created attachment 87198 [details]
Proposed fix.

Here's the proposed fix.  I made a small error in my previous post: the fix is in CLocalVariable.InternalVariable.setChanged().
Comment 4 Nobody - feel free to take it CLA 2008-01-17 18:13:01 EST
Created attachment 87212 [details]
Fix a leak.

This also brings me to another question.  CVariable.dispose() currently has an intentional leak commented '// Hack: do not destroy'.  The commit message (v1.80) says 'Do not request to dispose local variables when the target is resumed.'  Based on my limited testing, it seems possible that this change was fixing the same problem in CLocalVariable.  Can we remove the hack?
Comment 5 Jonah Graham CLA 2019-12-30 18:54:24 EST
This bug was assigned and targeted at a now released milestone (or Future or Next that isn't being used by CDT). As that milestone has now passed, the milestone field has been cleared. If this bug has been fixed, please set the milestone to the version it was fixed in and mark the bug as resolved.