https://llvm.org/bugs/show_bug.cgi?id=25653
Bug ID: 25653
Summary: Cannot inspect const static variable
Product: lldb
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 15359
--> https://llvm.org/bugs/attachment.cgi?id=15359&action=edit
simple test case with a const static
Calling "expr" or "target variable" on a constant static global in C doesn't
work. The error is
error: use of undeclared identifier 'limit'
or
error: can't find global variable 'limit'
It seems the variable is given the 'DW_AT_const_value' DWARF attribute. However
lldb can't find it. If you compile slightly differently so is has a
'DW_AT_location' attribute instead, lldb deals with it okay.
This works in gcc, which produces a 'DW_AT_location' attribute.
To reproduce compile with "clang -g -O0 InspectConstStatic.c"
Then call lldb with the commands:
b main
r
expr limit
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev