[lldb-dev] [Bug 45471] New: SymbolFileDWARF::ParseVariableDIE consider all constant variables as "static"
via lldb-dev
lldb-dev at lists.llvm.org
Tue Apr 7 17:50:12 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45471
Bug ID: 45471
Summary: SymbolFileDWARF::ParseVariableDIE consider all
constant variables as "static"
Product: lldb
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: ditaliano at apple.com
CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org
SymbolFileDWARF::ParseVariableDIE has the following code:
if (location_is_const_value_data)
scope = eValueTypeVariableStatic;
else {
scope = eValueTypeVariableLocal;
So every variable that just has a constant value, and isn’t in a location, is
treated as a file static. That means, for instance, if you build this:
volatile int a;
main() {
{
int b = 3;
a;
}
}
Break on line 5 and run to it, you get:
(lldb) frame var
(lldb)
It is a local variable, however, so we should print it.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200408/376693ce/attachment.html>
More information about the lldb-dev
mailing list