summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadPlanStepOverRange.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2016-11-17 22:29:31 +0000
committerSam McCall <sam.mccall@gmail.com>2016-11-17 22:29:31 +0000
commit592fa122c2a2873d04cf115d9939c0d7a4f35057 (patch)
tree3147862f07a5b9a9225f0336f592972ab5d857ed /lldb/source/Target/ThreadPlanStepOverRange.cpp
parent7293f9f7cc5f0160dbb2a1fd437f0a472b735190 (diff)
downloadbcm5719-llvm-592fa122c2a2873d04cf115d9939c0d7a4f35057.tar.gz
bcm5719-llvm-592fa122c2a2873d04cf115d9939c0d7a4f35057.zip
Fix step-over when SymbolContext.function is missing and symbol is present.
Summary: Fix step-over when SymbolContext.function is missing and symbol is present. With targets from our build configuration, ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames, leading to ShouldStop() returning true prematurely. The frame's SymbolContext, and m_addr_context have: - comp_unit set and matching - function = nullptr - symbol set and matching (but this is never checked) My naive guess is that the context should be equivalent in this case :-) Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26804 llvm-svn: 287274
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOverRange.cpp')
-rw-r--r--lldb/source/Target/ThreadPlanStepOverRange.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp
index c8fd6f9297b..48c7ff8be45 100644
--- a/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -107,21 +107,22 @@ bool ThreadPlanStepOverRange::IsEquivalentContext(
// the .o file from the
// inlined range, so I left that out too...
if (m_addr_context.comp_unit) {
- if (m_addr_context.comp_unit == context.comp_unit) {
- if (m_addr_context.function &&
- m_addr_context.function == context.function) {
- // It is okay to return to a different block of a straight function, we
- // only have to
- // be more careful if returning from one inlined block to another.
- if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr &&
- context.block->GetInlinedFunctionInfo() == nullptr)
- return true;
-
- if (m_addr_context.block && m_addr_context.block == context.block)
- return true;
- }
+ if (m_addr_context.comp_unit != context.comp_unit)
+ return false;
+ if (m_addr_context.function) {
+ if (m_addr_context.function != context.function)
+ return false;
+ // It is okay to return to a different block of a straight function, we
+ // only have to
+ // be more careful if returning from one inlined block to another.
+ if (m_addr_context.block->GetInlinedFunctionInfo() == nullptr &&
+ context.block->GetInlinedFunctionInfo() == nullptr)
+ return true;
+ return m_addr_context.block == context.block;
}
- } else if (m_addr_context.symbol && m_addr_context.symbol == context.symbol) {
+ }
+ // Fall back to symbol if we have no decision from comp_unit/function/block.
+ if (m_addr_context.symbol && m_addr_context.symbol == context.symbol) {
return true;
}
return false;
OpenPOWER on IntegriCloud