Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350490

Summary: Variables view tries to expand variable with no children after stepping into function
Product: [Tools] CDT Reporter: Norman Yee <normankyee>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: minor    
Priority: P3 CC: cdtdoug, pawel.1.piech
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Source file for reproducing bug none

Description Norman Yee CLA 2011-06-27 15:28:18 EDT
Build Identifier: 20110615-0604

If you have the first N variables expanded in the Variables view, and you step into a different function, the Variables view will try to expand the first N variables in the new function even though the variables may have no children.  Because it's stepping into a different function, I believe it should not be expanding any of the variables.


Reproducible: Always

Steps to Reproduce:
1. Create a new C project
2. Copy the attached file into the new project
3. Build the project
4. Create a debug configuration for the project and launch it
5. Set a breakpoint on line 21:

int c = add(a, b.val1);

6. Run to the breakpoint
7. Open the Variables view.  Note that it should have 3 variables in it: a, b, and c
8. Expand a and b
9. Resize the Variables view so that you can see all of the variables
10. Step into the add() function
11. The first 2 variables in the Variables view are now x and y.  x is expanded.  It also tries to expand y but fails because y is an int.
Comment 1 Norman Yee CLA 2011-06-27 15:29:34 EDT
Created attachment 198679 [details]
Source file for reproducing bug