forked from OSchip/llvm-project
Relax the test for "is the frame I am going to step back out to the one I started from" in ThreadPlanStepOverRange so you don't
artificially reject stepping out of a function you stepped into when stepping through an inlined range. Also fill in the target in the symbol context we make up for the inlined stepping range in ThreadPlanStepOut. <rdar://problem/11765912> llvm-svn: 160794
This commit is contained in:
parent
0b3d782933
commit
5f1a4e1ff3
|
@ -415,6 +415,7 @@ ThreadPlanStepOut::QueueInlinedStepPlan (bool queue_now)
|
|||
{
|
||||
SymbolContext inlined_sc;
|
||||
inlined_block->CalculateSymbolContext(&inlined_sc);
|
||||
inlined_sc.target_sp = GetTarget().shared_from_this();
|
||||
RunMode run_mode = m_stop_others ? lldb::eOnlyThisThread : lldb::eAllThreads;
|
||||
ThreadPlanStepOverRange *step_through_inline_plan_ptr = new ThreadPlanStepOverRange(m_thread,
|
||||
inline_range,
|
||||
|
|
|
@ -110,7 +110,36 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr)
|
|||
if (older_frame_sp)
|
||||
{
|
||||
const SymbolContext &older_context = older_frame_sp->GetSymbolContext(eSymbolContextEverything);
|
||||
if (older_context == m_addr_context)
|
||||
|
||||
// Match as much as is specified in the m_addr_context:
|
||||
// This is a fairly loose sanity check. Note, sometimes the target doesn't get filled
|
||||
// in so I left out the target check. And sometimes the module comes in as the .o file from the
|
||||
// inlined range, so I left that out too...
|
||||
|
||||
bool older_ctx_is_equivalent = false;
|
||||
if (m_addr_context.comp_unit)
|
||||
{
|
||||
if (m_addr_context.comp_unit == older_context.comp_unit)
|
||||
{
|
||||
if (m_addr_context.function && m_addr_context.function == older_context.function)
|
||||
{
|
||||
if (m_addr_context.block && m_addr_context.block == older_context.block)
|
||||
{
|
||||
older_ctx_is_equivalent = true;
|
||||
if (m_addr_context.line_entry.IsValid() && LineEntry::Compare(m_addr_context.line_entry, older_context.line_entry) != 0)
|
||||
{
|
||||
older_ctx_is_equivalent = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_addr_context.symbol && m_addr_context.symbol == older_context.symbol)
|
||||
{
|
||||
older_ctx_is_equivalent = true;
|
||||
}
|
||||
|
||||
if (older_ctx_is_equivalent)
|
||||
{
|
||||
new_plan = m_thread.QueueThreadPlanForStepOut (false,
|
||||
NULL,
|
||||
|
|
Loading…
Reference in New Issue