summaryrefslogtreecommitdiff
path: root/libunwindstack/RegsArm64.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2019-11-18 12:36:50 -0800
committerPeter Collingbourne <pcc@google.com>2019-11-18 17:57:37 -0800
commit48984c34ce98f97920b5c0e7d51cec694eacf126 (patch)
treef7995b19d50b737cb1bc8772e64d7b2501267937 /libunwindstack/RegsArm64.cpp
parentb45dad95bf3a4ab522b75efdceb51aa7fc396af6 (diff)
downloadunwinding-48984c34ce98f97920b5c0e7d51cec694eacf126.tar.gz
Include PSTATE in tombstones on arm64.
A thread's PSTATE can sometimes be critical for understanding a crash, especially with MTE and other new features that store per-thread state in PSTATE. Bug: 135772972 Change-Id: I1bee25bffe7eea395f04b6449dc9227298cf866e
Diffstat (limited to 'libunwindstack/RegsArm64.cpp')
-rw-r--r--libunwindstack/RegsArm64.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libunwindstack/RegsArm64.cpp b/libunwindstack/RegsArm64.cpp
index e9787aa..2e8af20 100644
--- a/libunwindstack/RegsArm64.cpp
+++ b/libunwindstack/RegsArm64.cpp
@@ -103,6 +103,7 @@ void RegsArm64::IterateRegisters(std::function<void(const char*, uint64_t)> fn)
fn("sp", regs_[ARM64_REG_SP]);
fn("lr", regs_[ARM64_REG_LR]);
fn("pc", regs_[ARM64_REG_PC]);
+ fn("pst", regs_[ARM64_REG_PSTATE]);
}
Regs* RegsArm64::Read(void* remote_data) {
@@ -113,6 +114,7 @@ Regs* RegsArm64::Read(void* remote_data) {
uint64_t* reg_data = reinterpret_cast<uint64_t*>(regs->RawData());
reg_data[ARM64_REG_PC] = user->pc;
reg_data[ARM64_REG_SP] = user->sp;
+ reg_data[ARM64_REG_PSTATE] = user->pstate;
return regs;
}