summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 30c867e26c6..533c21c6e24 100644
--- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -76,7 +76,7 @@ UnwindLLDB::AddFirstFrame ()
if (!first_register_ctx_ap->GetCFA (first_cursor_sp->cfa))
return false;
- if (!first_register_ctx_ap->GetPC (first_cursor_sp->start_pc))
+ if (!first_register_ctx_ap->ReadPC (first_cursor_sp->start_pc))
return false;
// Everything checks out, so release the auto pointer value and let the
@@ -132,7 +132,7 @@ UnwindLLDB::AddOneMoreFrame ()
}
return false;
}
- if (!register_ctx_ap->GetPC (cursor_sp->start_pc))
+ if (!register_ctx_ap->ReadPC (cursor_sp->start_pc))
{
if (log)
{
@@ -141,6 +141,15 @@ UnwindLLDB::AddOneMoreFrame ()
}
return false;
}
+ if (!m_frames.empty())
+ {
+ if ((m_frames.back()->start_pc == cursor_sp->start_pc) &&
+ (m_frames.back()->cfa == cursor_sp->cfa))
+ {
+ // Infinite loop where the current cursor is the same as the previous one...
+ return false;
+ }
+ }
RegisterContextSP register_ctx_sp(register_ctx_ap.release());
cursor_sp->reg_ctx = register_ctx_sp;
m_frames.push_back (cursor_sp);
OpenPOWER on IntegriCloud