summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-01-23 21:57:53 +0000
committerJim Ingham <jingham@apple.com>2014-01-23 21:57:53 +0000
commita786e53903c08e0d0f04c92b0f32e83005e252ce (patch)
treee8331f81885c0911ed49182e942c9b9dab068e2e /lldb/source/Target
parent4da6206d754a3e1b9b77760f07d11ec737277a16 (diff)
downloadbcm5719-llvm-a786e53903c08e0d0f04c92b0f32e83005e252ce.tar.gz
bcm5719-llvm-a786e53903c08e0d0f04c92b0f32e83005e252ce.zip
Don't need to figure out the frame's module if we don't have any libraries
in the step-avoid-libraries list. llvm-svn: 199944
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/ThreadPlanStepInRange.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/lldb/source/Target/ThreadPlanStepInRange.cpp b/lldb/source/Target/ThreadPlanStepInRange.cpp
index b793deb36a4..c4cb9aba1b3 100644
--- a/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -279,21 +279,25 @@ ThreadPlanStepInRange::FrameMatchesAvoidCriteria ()
StackFrame *frame = GetThread().GetStackFrameAtIndex(0).get();
// Check the library list first, as that's cheapest:
+ bool libraries_say_avoid = false;
+
FileSpecList libraries_to_avoid (GetThread().GetLibrariesToAvoid());
size_t num_libraries = libraries_to_avoid.GetSize();
- bool libraries_say_avoid = false;
- SymbolContext sc(frame->GetSymbolContext(eSymbolContextModule));
- FileSpec frame_library(sc.module_sp->GetFileSpec());
-
- if (frame_library)
+ if (num_libraries > 0)
{
- for (size_t i = 0; i < num_libraries; i++)
+ SymbolContext sc(frame->GetSymbolContext(eSymbolContextModule));
+ FileSpec frame_library(sc.module_sp->GetFileSpec());
+
+ if (frame_library)
{
- const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
- if (FileSpec::Equal (file_spec, frame_library, false))
+ for (size_t i = 0; i < num_libraries; i++)
{
- libraries_say_avoid = true;
- break;
+ const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
+ if (FileSpec::Equal (file_spec, frame_library, false))
+ {
+ libraries_say_avoid = true;
+ break;
+ }
}
}
}
OpenPOWER on IntegriCloud