diff options
author | Peter Collingbourne <pcc@google.com> | 2020-09-19 06:19:39 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-19 06:19:39 +0000 |
commit | 77d4d78d93436ecef3d415a9f549a25f7911f5b7 (patch) | |
tree | 4ff9ad8cb6f14b9f2fe95697830744c4b1ec098a /debuggerd/crash_dump.cpp | |
parent | 8d2df7cafcc3f78416f9d164b4a6f8deec87c191 (diff) | |
parent | 3d54f29163a47f7ca34e6f023e34dc904db19445 (diff) |
Merge "Dump the per-thread TAGGED_ADDR_CTRL value if available." am: 43ebae3e5d am: 3d54f29163
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1427037
Change-Id: Idac612d0bad72f2a35c0873a707ca10a190689c7
Diffstat (limited to 'debuggerd/crash_dump.cpp')
-rw-r--r-- | debuggerd/crash_dump.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index d7cb9725fb..c52c6f7413 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -40,6 +40,7 @@ #include <android-base/stringprintf.h> #include <android-base/strings.h> #include <android-base/unique_fd.h> +#include <bionic/mte_kernel.h> #include <bionic/reserved_signals.h> #include <cutils/sockets.h> #include <log/log.h> @@ -486,6 +487,17 @@ int main(int argc, char** argv) { continue; } +#ifdef ANDROID_EXPERIMENTAL_MTE + struct iovec iov = { + &info.tagged_addr_ctrl, + sizeof(info.tagged_addr_ctrl), + }; + if (ptrace(PTRACE_GETREGSET, thread, NT_ARM_TAGGED_ADDR_CTRL, + reinterpret_cast<void*>(&iov)) == -1) { + info.tagged_addr_ctrl = -1; + } +#endif + if (thread == g_target_thread) { // Read the thread's registers along with the rest of the crash info out of the pipe. ReadCrashInfo(input_pipe, &siginfo, &info.registers, &process_info); |