GP-901 added RegisterBuilder tests

This commit is contained in:
ghidra1 2021-04-28 13:16:27 -04:00
parent 8f9b067384
commit d46eb8e996
2 changed files with 88 additions and 59 deletions

View file

@ -53,13 +53,12 @@ public class CreateRelocationBasedOperandReferences extends GhidraScript {
Iterator<Relocation> relocations = relocationTable.getRelocations();
monitor.initialize(relocationTable.getSize());
int progress = 0;
int refCount = 0;
while (relocations.hasNext()) {
monitor.checkCanceled();
Relocation r = relocations.next();
monitor.setProgress(progress++);
monitor.incrementProgress(1);
Instruction instr = listing.getInstructionAt(r.getAddress());
if (instr == null) {
@ -137,11 +136,13 @@ public class CreateRelocationBasedOperandReferences extends GhidraScript {
}
if (obj instanceof Scalar) {
if (s != null) {
// more than one scalar found
return null;
}
s = (Scalar) obj;
}
else {
// non-scalar found
return null;
}
}