[PATCH] D42492: [XRay] clarify error messages when parsing broken traces
Martin Pelikán via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 05:19:04 PST 2018
pelikan updated this revision to Diff 131948.
pelikan added a comment.
sync
Repository:
rL LLVM
https://reviews.llvm.org/D42492
Files:
lib/XRay/Trace.cpp
Index: lib/XRay/Trace.cpp
===================================================================
--- lib/XRay/Trace.cpp
+++ lib/XRay/Trace.cpp
@@ -120,9 +120,10 @@
auto TId = RecordExtractor.getU32(&OffsetPtr);
if (Record.FuncId != FuncId || Record.TId != TId)
return make_error<StringError>(
- Twine("Corrupted log, found payload following non-matching "
- "function + thread record. Record for ") +
- Twine(Record.FuncId) + " != " + Twine(FuncId),
+ Twine("Corrupted log, found arg payload following non-matching "
+ "function + thread record. Record for function ") +
+ Twine(Record.FuncId) + " != " + Twine(FuncId) + "; offset: " +
+ Twine(S.data() - Data.data()),
std::make_error_code(std::errc::executable_format_error));
// Advance another four bytes to avoid padding.
OffsetPtr += 4;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42492.131948.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180130/2f6cbdab/attachment.bin>
More information about the llvm-commits
mailing list