diff options
author | James Henderson <james.henderson@sony.com> | 2020-05-22 13:53:47 +0100 |
---|---|---|
committer | James Henderson <james.henderson@sony.com> | 2020-06-01 14:00:01 +0100 |
commit | 8d9070e040d0aa916b3b63c319eabdf3e4a5f9df (patch) | |
tree | 2907230f34335d04a8037e273a7deb6dd3992b7e /llvm/lib/Support/DataExtractor.cpp | |
parent | 54422d21700cfb532c80b22662f7b79d741b21ba (diff) | |
download | llvm-8d9070e040d0aa916b3b63c319eabdf3e4a5f9df.zip llvm-8d9070e040d0aa916b3b63c319eabdf3e4a5f9df.tar.gz llvm-8d9070e040d0aa916b3b63c319eabdf3e4a5f9df.tar.bz2 |
[Support] Add more context to DataExtractor getLEB128 errors
Reviewed by: clayborg, dblaikie, labath
Differential Revision: https://reviews.llvm.org/D80799
Diffstat (limited to 'llvm/lib/Support/DataExtractor.cpp')
-rw-r--r-- | llvm/lib/Support/DataExtractor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/DataExtractor.cpp b/llvm/lib/Support/DataExtractor.cpp index aaf20eb..99265c4 100644 --- a/llvm/lib/Support/DataExtractor.cpp +++ b/llvm/lib/Support/DataExtractor.cpp @@ -206,7 +206,10 @@ static T getLEB128(StringRef Data, uint64_t *OffsetPtr, Error *Err, Decoder(Bytes.data() + *OffsetPtr, &bytes_read, Bytes.end(), &error); if (error) { if (Err) - *Err = createStringError(errc::illegal_byte_sequence, error); + *Err = createStringError(errc::illegal_byte_sequence, + "unable to decode LEB128 at offset 0x%8.8" PRIx64 + ": %s", + *OffsetPtr, error); return T(); } *OffsetPtr += bytes_read; |