summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepOverRange.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-07-26 18:23:21 +0000
committerJim Ingham <jingham@apple.com>2012-07-26 18:23:21 +0000
commit5f1a4e1ff3ad5a716c63eac6d1baf8fafdfc76ba (patch)
tree569a4608957bdd85c6b5554ab518e1d0fc3fb6d7 /lldb/source/Target/ThreadPlanStepOverRange.cpp
parent0b3d782933c23838618501c076f77e9ce909fae7 (diff)
downloadbcm5719-llvm-5f1a4e1ff3ad5a716c63eac6d1baf8fafdfc76ba.tar.gz
bcm5719-llvm-5f1a4e1ff3ad5a716c63eac6d1baf8fafdfc76ba.zip
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
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOverRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepOverRange.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp
index 44cd14e8b00..08d9e4c7210 100644
--- a/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -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,
OpenPOWER on IntegriCloud