[Lldb-commits] [PATCH] D77698: [DWARF] Assign the correct scope to constant variables
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 7 18:00:20 PDT 2020
davide created this revision.
davide added reviewers: jingham, labath.
Herald added subscribers: arphaman, aprantl.
davide added a comment.
davide added a reviewer: friss.
See also https://bugs.llvm.org/show_bug.cgi?id=45471
SymbolFileDWARF::ParseVariableDIE consider all constant variables as "static".
This is incorrect, and causes `frame var` to fail when printing them.
e.g.
volatile int a;
main() {
{
int b = 3;
a;
}
}
const_value variables are more common at `-O1/-O2/..`, so this wasn't noticed by many.
Fixes rdar://problem/61402307
I also need to craft a testcase. Ideas on how to do this are appreciated
https://reviews.llvm.org/D77698
Files:
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77698.255869.patch
Type: text/x-patch
Size: 4342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200408/c5f00862/attachment-0001.bin>
More information about the lldb-commits
mailing list