diff options
author | Peter Collingbourne <pcc@google.com> | 2020-03-30 21:40:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-03-30 21:40:58 +0000 |
commit | cd63cae6b206a067fab1afe78f7647f1f2cb1513 (patch) | |
tree | 04e72546f2968a86b41a1151a5c8639adb2e852f /debuggerd/crash_dump.cpp | |
parent | 5677803cb7e78421f835513d088e24ccd6da6d87 (diff) | |
parent | f03af8844acbd63f257c51577834d2c126a41f47 (diff) |
Merge "Read fault address on arm64 using proposed kernel API."
Diffstat (limited to 'debuggerd/crash_dump.cpp')
-rw-r--r-- | debuggerd/crash_dump.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index 087ebaea8..0cd2350a8 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -295,6 +295,13 @@ static void ReadCrashInfo(unique_fd& fd, siginfo_t* siginfo, case 3: process_info->abort_msg_address = crash_info->data.s.abort_msg_address; *siginfo = crash_info->data.s.siginfo; + if (signal_has_si_addr(siginfo)) { + // Make a copy of the ucontext field because otherwise it is not aligned enough (due to + // being in a packed struct) and clang complains about that. + ucontext_t ucontext = crash_info->data.s.ucontext; + process_info->has_fault_address = true; + process_info->fault_address = get_fault_address(siginfo, &ucontext); + } regs->reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), &crash_info->data.s.ucontext)); break; |