mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
Merge branch 'GP-0_ryanmkurtz_PR-3787_GameCubeGBA_outerloop'
This commit is contained in:
@@ -718,14 +718,8 @@ public class FunctionStartAnalyzer extends AbstractAnalyzer implements PatternFa
|
||||
while (addresses.hasNext() && !addedMonitor.isCancelled()) {
|
||||
Address address = addresses.next();
|
||||
// if there are any conditional references, then this can't be a function start
|
||||
ReferenceIterator referencesTo =
|
||||
addedProgram.getReferenceManager().getReferencesTo(address);
|
||||
while (referencesTo.hasNext()) {
|
||||
Reference reference = referencesTo.next();
|
||||
if (reference.getReferenceType().isConditional()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hasConditionalReferences(addedProgram, address)) {
|
||||
continue;
|
||||
}
|
||||
Function funcAt =
|
||||
addedProgram.getFunctionManager().getFunctionContaining(address);
|
||||
@@ -743,6 +737,18 @@ public class FunctionStartAnalyzer extends AbstractAnalyzer implements PatternFa
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasConditionalReferences(Program addedProgram, Address address) {
|
||||
ReferenceIterator refsTo =
|
||||
addedProgram.getReferenceManager().getReferencesTo(address);
|
||||
while (refsTo.hasNext()) {
|
||||
Reference reference = refsTo.next();
|
||||
if (reference.getReferenceType().isConditional()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}, potentialFuncResult);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user