mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-3224 Remove full symbol check from Rename actions
This commit is contained in:
parent
cc35d57933
commit
79e5465160
3 changed files with 2 additions and 16 deletions
|
@ -76,9 +76,7 @@ public class IsolateVariableTask extends RenameTask {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
LocalSymbolMap localSymbolMap = highFunction.getLocalSymbolMap();
|
if (isSymbolInFunction(function, newName)) {
|
||||||
if (localSymbolMap.containsVariableWithName(newName) ||
|
|
||||||
isSymbolInFunction(function, newName)) {
|
|
||||||
errorMsg = "Duplicate name";
|
errorMsg = "Duplicate name";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,9 +60,7 @@ public class RenameVariableTask extends RenameTask {
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid(String newNm) {
|
public boolean isValid(String newNm) {
|
||||||
newName = newNm;
|
newName = newNm;
|
||||||
LocalSymbolMap localSymbolMap = hfunction.getLocalSymbolMap();
|
if (isSymbolInFunction(function, newName)) {
|
||||||
if (localSymbolMap.containsVariableWithName(newName) ||
|
|
||||||
isSymbolInFunction(function, newName)) {
|
|
||||||
errorMsg = "Duplicate name";
|
errorMsg = "Duplicate name";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,16 +425,6 @@ public class LocalSymbolMap {
|
||||||
return (HighParam) paramSymbols[i].getHighVariable();
|
return (HighParam) paramSymbols[i].getHighVariable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsVariableWithName(String name) {
|
|
||||||
Collection<HighSymbol> values = symbolMap.values();
|
|
||||||
for (HighSymbol sym : values) {
|
|
||||||
if (sym.getName().equals(name)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected HighSymbol newMappedSymbol(long id, String nm, DataType dt, VariableStorage store,
|
protected HighSymbol newMappedSymbol(long id, String nm, DataType dt, VariableStorage store,
|
||||||
Address pcaddr, int slot) {
|
Address pcaddr, int slot) {
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue