mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-6008 Changed SourceType examination to base upon priorty instead of specific value equality when appropriate
This commit is contained in:
parent
edea7dfd65
commit
a3bd708160
20 changed files with 131 additions and 144 deletions
|
@ -43,8 +43,7 @@ import ghidra.program.model.symbol.*;
|
|||
public class AutoRenameSimpleLabels extends GhidraScript {
|
||||
|
||||
boolean isDefaultName(Symbol symbol) {
|
||||
return symbol.getSource() == SourceType.DEFAULT ||
|
||||
symbol.getSource() == SourceType.ANALYSIS;
|
||||
return symbol.getSource().isLowerOrEqualPriorityThan(SourceType.ANALYSIS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,6 +60,9 @@ public class AutoRenameSimpleLabels extends GhidraScript {
|
|||
//get this instruction's info
|
||||
Symbol s = iter.next();
|
||||
Address startAddr = s.getAddress();
|
||||
if (!startAddr.isLoadedMemoryAddress()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// read the instruction type and operand
|
||||
Instruction inst = getInstructionAt(startAddr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue