[Lldb-commits] [lldb] r160794 - in /lldb/trunk/source/Target: ThreadPlanStepOut.cpp ThreadPlanStepOverRange.cpp
Jim Ingham
jingham at apple.com
Thu Jul 26 11:23:21 PDT 2012
Author: jingham
Date: Thu Jul 26 13:23:21 2012
New Revision: 160794
URL: http://llvm.org/viewvc/llvm-project?rev=160794&view=rev
Log:
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>
Modified:
lldb/trunk/source/Target/ThreadPlanStepOut.cpp
lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
Modified: lldb/trunk/source/Target/ThreadPlanStepOut.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOut.cpp?rev=160794&r1=160793&r2=160794&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepOut.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOut.cpp Thu Jul 26 13:23:21 2012
@@ -415,6 +415,7 @@
{
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,
Modified: lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp?rev=160794&r1=160793&r2=160794&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOverRange.cpp Thu Jul 26 13:23:21 2012
@@ -110,7 +110,36 @@
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,
More information about the lldb-commits
mailing list