[Lldb-commits] [PATCH] D86311: Fix how ValueObjectVariable handles DW_AT_const_value when the DWARFExpression holds the data that represents a constant value
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 20 11:22:50 PDT 2020
shafik created this revision.
shafik added reviewers: aprantl, friss, labath, jingham, vsk.
shafik requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
In some cases when we have a `DW_AT_const_value` and the data can be found in the `DWARFExpression` then `ValueObjectVariable` does not handle it properly and we end up with an `extracting data from value failed` error:
(lldb) target var constant
(U) constant = {
raw = <extracting data from value failed>
= (a = <extracting data from value failed>, b = <extracting data from value failed>, c = <extracting data from value failed>, d = <extracting data from value failed>, e = <extracting data from value failed>, f = <extracting data from value failed>)
}
This should fix that case.
The test is a very stripped down assembly file since reproducing this relies on the results of compiling with `-O1` which may not be stable over time.
https://reviews.llvm.org/D86311
Files:
lldb/source/Core/ValueObjectVariable.cpp
lldb/test/Shell/SymbolFile/DWARF/DW_AT_const_value.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86311.286863.patch
Type: text/x-patch
Size: 20283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200820/5af3b3cf/attachment-0001.bin>
More information about the lldb-commits
mailing list