[Lldb-commits] [PATCH] D61182: DWARFExpression: Fix implementation of DW_OP_pick
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 26 04:17:31 PDT 2019
labath created this revision.
labath added reviewers: jasonmolenda, clayborg.
Herald added subscribers: aprantl, mgorny.
The DWARF spec states that the DWARF stack arguments are numbered from
the top. Our implementation of DW_OP_pick was counting them from the
bottom.
This bug probably wasn't noticed because nobody (except my upcoming
postfix-to-DWARF converter) uses DW_OP_pick, but I've cross-checked with
gdb to confirm that counting from the top is the expected behavior.
This patch fixes the implementation to match the spec and gdb behavior
and adds a test.
https://reviews.llvm.org/D61182
Files:
include/lldb/Utility/Scalar.h
source/Expression/DWARFExpression.cpp
source/Utility/Scalar.cpp
unittests/Expression/CMakeLists.txt
unittests/Expression/DWARFExpressionTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61182.196833.patch
Type: text/x-patch
Size: 3890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190426/618914c6/attachment.bin>
More information about the lldb-commits
mailing list