mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
no need to hold equate symbols in a separate list
This commit is contained in:
parent
3e5da19f28
commit
78717038cf
1 changed files with 1 additions and 25 deletions
|
@ -499,7 +499,6 @@ public class LocalSymbolMap {
|
|||
* @param dbFunction is the function to pull equates for
|
||||
*/
|
||||
private void grabEquates(Function dbFunction) {
|
||||
ArrayList<HighSymbol> equateSymbolList = null;
|
||||
// Find named constants via Equates
|
||||
Program program = dbFunction.getProgram();
|
||||
EquateTable equateTable = program.getEquateTable();
|
||||
|
@ -519,9 +518,6 @@ public class LocalSymbolMap {
|
|||
Arrays.sort(hash); // Sort in preparation for deduping
|
||||
String displayName = eq.getDisplayName();
|
||||
long eqValue = eq.getValue();
|
||||
if (equateSymbolList == null) {
|
||||
equateSymbolList = new ArrayList<HighSymbol>();
|
||||
}
|
||||
|
||||
EquateSymbol eqSymbol;
|
||||
for (int i = 0; i < hash.length; ++i) {
|
||||
|
@ -529,30 +525,10 @@ public class LocalSymbolMap {
|
|||
continue; // Found a duplicate, skip it
|
||||
}
|
||||
eqSymbol = newEquateSymbol(0, displayName, eqValue, hash[i], defAddr);
|
||||
equateSymbolList.add(eqSymbol);
|
||||
symbolMap.put(eqSymbol.getId(), eqSymbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Find typed constants via DataTypeReferences
|
||||
// -- for each datatype reference within the scope of the function
|
||||
// MappedVarKey key = new MappedVarKey(AddressSpace.HASH_SPACE.getAddress(hash),defAddr);
|
||||
// DynamicSymbol sym = constantSymbolMap.get(key);
|
||||
// String name = sym != null ? sym.getName() : null;
|
||||
// sym = new DynamicSymbol(name, dt, dt.getLength(), hash, defAddr, func, 0); // format??
|
||||
// if (name != null) {
|
||||
// sym.setTypeLock(true);
|
||||
// }
|
||||
// sym.setTypeLock(true);
|
||||
// sym.setReadOnly(true);
|
||||
//
|
||||
|
||||
// Add constant dynamic symbols to map
|
||||
if (equateSymbolList != null) {
|
||||
for (HighSymbol sym : equateSymbolList) {
|
||||
symbolMap.put(sym.getId(), sym);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void grabMerges(ArrayList<String> mergeNames) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue