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
This commit is contained in:
Jim Ingham 2014-01-23 21:57:53 +00:00
parent 4da6206d75
commit a786e53903
1 changed files with 14 additions and 10 deletions

View File

@ -279,21 +279,25 @@ ThreadPlanStepInRange::FrameMatchesAvoidCriteria ()
StackFrame *frame = GetThread().GetStackFrameAtIndex(0).get(); StackFrame *frame = GetThread().GetStackFrameAtIndex(0).get();
// Check the library list first, as that's cheapest: // Check the library list first, as that's cheapest:
bool libraries_say_avoid = false;
FileSpecList libraries_to_avoid (GetThread().GetLibrariesToAvoid()); FileSpecList libraries_to_avoid (GetThread().GetLibrariesToAvoid());
size_t num_libraries = libraries_to_avoid.GetSize(); size_t num_libraries = libraries_to_avoid.GetSize();
bool libraries_say_avoid = false; if (num_libraries > 0)
SymbolContext sc(frame->GetSymbolContext(eSymbolContextModule));
FileSpec frame_library(sc.module_sp->GetFileSpec());
if (frame_library)
{ {
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)); for (size_t i = 0; i < num_libraries; i++)
if (FileSpec::Equal (file_spec, frame_library, false))
{ {
libraries_say_avoid = true; const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
break; if (FileSpec::Equal (file_spec, frame_library, false))
{
libraries_say_avoid = true;
break;
}
} }
} }
} }