Bug 278629 - Unable to view uninitialised static variables in Variables view
Summary: Unable to view uninitialised static variables in Variables view
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-01 10:59 EDT by Derek Morris CLA
Modified: 2020-09-04 15:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Morris CLA 2009-06-01 10:59:31 EDT
Build ID: 200905290807

Steps To Reproduce:
In the code below, when trying to "Add Globals" to the variables view, visible_static is listed, but invisible static is not.

Note that this is when using an embedded toolchain (arm-none-eabi-gcc from CodeSourcery, for example). 

Having traced through the code, the problem seems to be in the Elf reader (which is used to populate the list of globals). It is making the assumption that all global variables are in the .data section. But unititalised data is placed in the .bss section.


More information:
static int visible_static = 1 ;
static int invisible_static ;

int main(void) {
	int i = 1 ;
	visible_static = 0 ;
	invisible_static = 0 ;
}