m_sym_ctx_valid (false),
m_frame_number (frame_number),
m_registers(),
- m_parent_unwind (unwind_lldb)
+ m_parent_unwind (unwind_lldb),
+ m_completed_stack_walk (false)
{
m_sym_ctx.Clear(false);
m_sym_ctx_valid = false;
if (pc == 0)
{
m_frame_type = eNotAValidFrame;
+ m_completed_stack_walk = true;
UnwindLogMsg ("this frame has a pc of 0x0");
return;
}
{
UnwindLogMsg ("could not find a valid cfa address");
m_frame_type = eNotAValidFrame;
+ if (cfa_regval == 0 || cfa_regval == 1)
+ {
+ m_completed_stack_walk = true;
+ }
return;
}
{
UnwindLogMsg ("could not find a valid cfa address");
m_frame_type = eNotAValidFrame;
+ if (cfa_regval == 0 || cfa_regval == 1)
+ {
+ m_completed_stack_walk = true;
+ }
return;
}
}
bool
+RegisterContextLLDB::IsCompletedStackWalk () const
+{
+ return m_completed_stack_walk;
+}
+
+bool
RegisterContextLLDB::IsTrapHandlerFrame () const
{
return m_frame_type == eTrapHandlerFrame;
IsValid () const;
bool
+ IsCompletedStackWalk () const;
+
+ bool
IsTrapHandlerFrame () const;
bool
lldb_private::UnwindLLDB& m_parent_unwind; // The UnwindLLDB that is creating this RegisterContextLLDB
+ bool m_completed_stack_walk; // indicates that we completed a full stack walk
+ // (this frame is likely eNotAValidFrame aka !IsValid())
+ // and we should not continue trying to unwind
+
//------------------------------------------------------------------
// For RegisterContextLLDB only
//------------------------------------------------------------------
{
// If the RegisterContextLLDB has a fallback UnwindPlan, it will switch to that and return
// true. Subsequent calls to TryFallbackUnwindPlan() will return false.
- if (m_frames[cur_idx - 1]->reg_ctx_lldb_sp->TryFallbackUnwindPlan())
+ if (reg_ctx_sp->IsCompletedStackWalk() == false
+ && m_frames[cur_idx - 1]->reg_ctx_lldb_sp->TryFallbackUnwindPlan())
{
return AddOneMoreFrame (abi);
}