mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-901 added RegisterBuilder tests
This commit is contained in:
parent
8f9b067384
commit
d46eb8e996
2 changed files with 88 additions and 59 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue