diff options
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; |