Skip to content

Commit 285469a

Browse files
authored
Merge pull request #254 from Teemperor/RevertNFCCheckThreadPlanStepInRangeMaster
[upstreaming] Revert changes to ThreadPlanStepInRange::FrameMatchesAv…
2 parents dd64a25 + 29d459a commit 285469a

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

lldb/source/Target/ThreadPlanStepInRange.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -408,18 +408,21 @@ bool ThreadPlanStepInRange::FrameMatchesAvoidCriteria() {
408408
StackFrame *frame = GetThread().GetStackFrameAtIndex(0).get();
409409

410410
// Check the library list first, as that's cheapest:
411+
bool libraries_say_avoid = false;
412+
411413
FileSpecList libraries_to_avoid(GetThread().GetLibrariesToAvoid());
412414
size_t num_libraries = libraries_to_avoid.GetSize();
413-
bool libraries_say_avoid = false;
414-
SymbolContext sc(frame->GetSymbolContext(eSymbolContextModule));
415-
FileSpec frame_library(sc.module_sp->GetFileSpec());
416-
417-
if (frame_library) {
418-
for (size_t i = 0; i < num_libraries; i++) {
419-
const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
420-
if (FileSpec::Equal(file_spec, frame_library, false)) {
421-
libraries_say_avoid = true;
422-
break;
415+
if (num_libraries > 0) {
416+
SymbolContext sc(frame->GetSymbolContext(eSymbolContextModule));
417+
FileSpec frame_library(sc.module_sp->GetFileSpec());
418+
419+
if (frame_library) {
420+
for (size_t i = 0; i < num_libraries; i++) {
421+
const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
422+
if (FileSpec::Equal(file_spec, frame_library, false)) {
423+
libraries_say_avoid = true;
424+
break;
425+
}
423426
}
424427
}
425428
}

0 commit comments

Comments
 (0)