[Lldb-commits] [lldb] 4fdd2ed - Revert "Unwind past an interrupt handler correctly on arm or at pc==0"
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 24 19:03:50 PST 2020
Author: Jason Molenda
Date: 2020-02-24T19:03:22-08:00
New Revision: 4fdd2edbdb4bfe6a95df0fac12e8beffcbe33b86
URL: https://github.com/llvm/llvm-project/commit/4fdd2edbdb4bfe6a95df0fac12e8beffcbe33b86
DIFF: https://github.com/llvm/llvm-project/commit/4fdd2edbdb4bfe6a95df0fac12e8beffcbe33b86.diff
LOG: Revert "Unwind past an interrupt handler correctly on arm or at pc==0"
The aarcht64-ubuntu bot is showing a test failure in TestHandleAbort.py
with this patch. Adding some logging to that file, it looks like
the saved register context above the trap handler does not have
save state for $pc, but it does have it for $lr on that platform.
I need to fall back to looking for $lr if the $pc cannot be retrieved.
I'll update the patch and re-commit once that's fixed.
This reverts commit edc4f4c9c9d90b2a4f8831ba4c873f08eaa5395a.
Added:
Modified:
lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index d46b87281f11..56dd273c25b7 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -328,13 +328,9 @@ void RegisterContextLLDB::InitializeNonZerothFrame() {
// If we don't have a Module for some reason, we're not going to find
// symbol/function information - just stick in some reasonable defaults and
- // hope we can unwind past this frame. If we're above a trap handler,
- // we may be at a bogus address because we jumped through a bogus function
- // pointer and trapped, so don't force the arch default unwind plan in that
- // case.
+ // hope we can unwind past this frame.
ModuleSP pc_module_sp(m_current_pc.GetModule());
- if ((!m_current_pc.IsValid() || !pc_module_sp) &&
- above_trap_handler == false) {
+ if (!m_current_pc.IsValid() || !pc_module_sp) {
UnwindLogMsg("using architectural default unwind method");
// Test the pc value to see if we know it's in an unmapped/non-executable
@@ -1207,13 +1203,9 @@ RegisterContextLLDB::SavedLocationForRegister(
// 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 &&
- m_frame_type != eTrapHandlerFrame) {
+ LLDB_INVALID_REGNUM) {
return_address_reg.init(
m_thread, m_full_unwind_plan_sp->GetRegisterKind(),
More information about the lldb-commits
mailing list