[Lldb-commits] [lldb] r199944 - Don't need to figure out the frame's module if we don't have any libraries
Jim Ingham
jingham at apple.com
Thu Jan 23 13:57:54 PST 2014
Author: jingham
Date: Thu Jan 23 15:57:53 2014
New Revision: 199944
URL: http://llvm.org/viewvc/llvm-project?rev=199944&view=rev
Log:
Don't need to figure out the frame's module if we don't have any libraries
in the step-avoid-libraries list.
Modified:
lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
Modified: lldb/trunk/source/Target/ThreadPlanStepInRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepInRange.cpp?rev=199944&r1=199943&r2=199944&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepInRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepInRange.cpp Thu Jan 23 15:57:53 2014
@@ -279,21 +279,25 @@ ThreadPlanStepInRange::FrameMatchesAvoid
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;
+ }
}
}
}
More information about the lldb-commits
mailing list