summaryrefslogtreecommitdiffstats
path: root/llvm/lib/XRay/Trace.cpp
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-08-31 19:32:46 +0000
committerDean Michael Berris <dberris@google.com>2018-08-31 19:32:46 +0000
commit4cae04873bcdb5eb629e4e71b36a0a87fe79083c (patch)
tree2ca697e1d698660765cdbf6a1b526d58a21a4b67 /llvm/lib/XRay/Trace.cpp
parentcc8f593d29abe99c2b049097c3c056809bfb0ddd (diff)
downloadbcm5719-llvm-4cae04873bcdb5eb629e4e71b36a0a87fe79083c.tar.gz
bcm5719-llvm-4cae04873bcdb5eb629e4e71b36a0a87fe79083c.zip
[XRay] Use correct type for PID records
Previously we've been reading and writing the wrong types which only worked in little endian implementations. This time we're writing the same typed values the runtime is using, and reading them appropriately as well. llvm-svn: 341241
Diffstat (limited to 'llvm/lib/XRay/Trace.cpp')
-rw-r--r--llvm/lib/XRay/Trace.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/XRay/Trace.cpp b/llvm/lib/XRay/Trace.cpp
index f92385ab4c1..45b266d73f9 100644
--- a/llvm/lib/XRay/Trace.cpp
+++ b/llvm/lib/XRay/Trace.cpp
@@ -396,7 +396,7 @@ Error processFDRPidRecord(FDRState &State, DataExtractor &RecordExtractor,
fdrStateToTwine(State.Expects),
std::make_error_code(std::errc::executable_format_error));
auto PreReadOffset = OffsetPtr;
- State.ProcessId = RecordExtractor.getU32(&OffsetPtr);
+ State.ProcessId = RecordExtractor.getSigned(&OffsetPtr, 4);
if (OffsetPtr == PreReadOffset)
return createStringError(
std::make_error_code(std::errc::executable_format_error),
OpenPOWER on IntegriCloud