diff --git a/i/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp --- a/i/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -1203,9 +1203,13 @@ // If we're fetching the saved pc and this UnwindPlan defines a // ReturnAddress register (e.g. lr on arm), look for the return address // register number in the UnwindPlan's row. + // If this is a trap handler frame, we have access to the complete + // register context when the interrupt/async signal was received, so + // we need to fetch the actual saved $pc value. if (pc_regnum.IsValid() && pc_regnum == regnum && m_full_unwind_plan_sp->GetReturnAddressRegister() != - LLDB_INVALID_REGNUM) { + LLDB_INVALID_REGNUM && + m_frame_type != eTrapHandlerFrame) { return_address_reg.init( m_thread, m_full_unwind_plan_sp->GetRegisterKind(),