summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2022-04-19 20:06:25 -0700
committerChristopher Ferris <cferris@google.com>2022-04-19 20:06:25 -0700
commite617e49167323ca7b02ead5dba436e5d108f5f6a (patch)
treeecb826146180504383e9e34780ea40b3f611267c
parent4e69dcd3fa12c99aaab490d79f014a6b4291be0a (diff)
downloadextras-e617e49167323ca7b02ead5dba436e5d108f5f6a.tar.gz
Add support for new unwindstack error codes.
Bug: 120606663 Test: Compiles. Change-Id: Ib1b5f31208507dd3911a2b4660e58370c83be70b
-rw-r--r--simpleperf/OfflineUnwinder.cpp3
-rw-r--r--simpleperf/OfflineUnwinder.h5
2 files changed, 7 insertions, 1 deletions
diff --git a/simpleperf/OfflineUnwinder.cpp b/simpleperf/OfflineUnwinder.cpp
index f611ef4d..bbc488b4 100644
--- a/simpleperf/OfflineUnwinder.cpp
+++ b/simpleperf/OfflineUnwinder.cpp
@@ -66,6 +66,9 @@ CHECK_ERROR_CODE(ERROR_INVALID_ELF);
CHECK_ERROR_CODE(ERROR_THREAD_DOES_NOT_EXIST);
CHECK_ERROR_CODE(ERROR_THREAD_TIMEOUT);
CHECK_ERROR_CODE(ERROR_SYSTEM_CALL);
+CHECK_ERROR_CODE(ERROR_BAD_ARCH);
+CHECK_ERROR_CODE(ERROR_MAPS_PARSE);
+CHECK_ERROR_CODE(ERROR_INVALID_PARAMETER);
CHECK_ERROR_CODE(ERROR_MAX);
// Max frames seen so far is 463, in http://b/110923759.
diff --git a/simpleperf/OfflineUnwinder.h b/simpleperf/OfflineUnwinder.h
index b6445577..9eb9e8ff 100644
--- a/simpleperf/OfflineUnwinder.h
+++ b/simpleperf/OfflineUnwinder.h
@@ -39,7 +39,10 @@ enum UnwindStackErrorCode : uint8_t {
// not exist.
ERROR_THREAD_TIMEOUT, // Timeout trying to unwind a local thread.
ERROR_SYSTEM_CALL, // System call failed while unwinding.
- ERROR_MAX = ERROR_SYSTEM_CALL,
+ ERROR_BAD_ARCH, // Arch invalid (none, or mismatched).
+ ERROR_MAPS_PARSE, // Failed to parse maps data.
+ ERROR_INVALID_PARAMETER, // Invalid parameter passed to function.
+ ERROR_MAX = ERROR_INVALID_PARAMETER,
};
struct UnwindingResult {