llvm-project/lldb/source/Utility
Pavel Labath b07a799752 DWARFExpression: Fix implementation of DW_OP_pick
Summary:
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.

Reviewers: jasonmolenda, clayborg

Subscribers: mgorny, aprantl, lldb-commits

Differential Revision: https://reviews.llvm.org/D61182

llvm-svn: 359436
2019-04-29 10:55:22 +00:00
..
ARM64_DWARF_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ARM64_ehframe_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ARM_DWARF_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ARM_ehframe_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ArchSpec.cpp [Platform] Remove Kalimba Platform 2019-03-27 16:23:50 +00:00
Args.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Baton.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Broadcaster.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [CMake] Move link dependencies where they are used. 2019-03-29 17:47:26 +00:00
CompletionRequest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Connection.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstString.cpp Prevent unnecessary conversion from StringRef to C-string [NFC] 2019-04-14 14:01:49 +00:00
DataBufferHeap.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
DataBufferLLVM.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DataEncoder.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
DataExtractor.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Environment.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Event.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
FileCollector.cpp [Reproducers] Add file provider 2019-01-29 20:36:38 +00:00
FileSpec.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
IOObject.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JSON.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLDBAssert.cpp Don't abort() in lldb_assert and document why. 2019-03-29 16:12:27 +00:00
Listener.cpp Pass ConstString by value (NFC) 2019-03-06 21:22:25 +00:00
Log.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Logging.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
NameMatches.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPC64LE_DWARF_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPC64LE_ehframe_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPC64_DWARF_Registers.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProcessInfo.cpp Move ProcessInfo from Host to Utility. 2019-03-04 21:51:03 +00:00
RegisterValue.cpp [Scalar] Implement support for 512-bit values. 2019-01-30 18:05:36 +00:00
RegularExpression.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Reproducer.cpp [Reproducers] Fix lifetime issue 2019-04-22 20:05:02 +00:00
ReproducerInstrumentation.cpp [Reproducers] Limit logging to calls that cross the API boundary. 2019-04-23 17:44:40 +00:00
Scalar.cpp DWARFExpression: Fix implementation of DW_OP_pick 2019-04-29 10:55:22 +00:00
SelectHelper.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
SharingPtr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
State.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Status.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
Stream.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
StreamCallback.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StreamGDBRemote.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StreamString.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringExtractor.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
StringExtractorGDBRemote.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringList.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StructuredData.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
TildeExpressionResolver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Timer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UUID.cpp Add UUID::SetFromOptionalStringRef, use it in DynamicLoaderDarwin 2019-01-24 22:43:44 +00:00
UriParser.cpp [NFC] Remove ASCII lines from comments 2019-04-10 20:48:55 +00:00
UserID.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UserIDResolver.cpp Refactor user/group name resolving code 2019-03-04 18:48:00 +00:00
UuidCompatibility.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VASprintf.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VMRange.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00