mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
Merge remote-tracking branch 'origin/GP-0_ghizard_master_fix_FunctionSymbolApplier_from_GP-3991'
This commit is contained in:
@@ -39,13 +39,10 @@ public class FunctionSymbolApplier extends AbstractBlockContextApplier
|
||||
|
||||
// Do not trust any of these variables... this is work in progress (possibly getting
|
||||
// torn up), but non-functioning code in other classes or this class still depend on these
|
||||
private Address address_x;
|
||||
private Function function_x = null;
|
||||
private long specifiedFrameSize_x = 0;
|
||||
private long currentFrameSize_x = 0;
|
||||
|
||||
private Address currentBlockAddress;
|
||||
|
||||
// might not need this, but investigating whether it will help us. TODO remove?
|
||||
private int baseParamOffset = 0;
|
||||
|
||||
@@ -139,7 +136,7 @@ public class FunctionSymbolApplier extends AbstractBlockContextApplier
|
||||
MsTypeApplier applier = applicator.getTypeApplier(fType);
|
||||
if (!(applier instanceof AbstractFunctionTypeApplier)) {
|
||||
applicator.appendLogMsg("Error: Failed to resolve datatype RecordNumber " +
|
||||
typeRecordNumber + " at " + address_x);
|
||||
typeRecordNumber + " at " + address);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -248,14 +245,15 @@ public class FunctionSymbolApplier extends AbstractBlockContextApplier
|
||||
* @param dataType data type of the variable.
|
||||
*/
|
||||
void setLocalVariable(Address varAddress, String varName, DataType dataType) {
|
||||
if (currentBlockAddress == null) {
|
||||
if (varAddress == null) {
|
||||
return; // silently return.
|
||||
}
|
||||
if (varName.isBlank()) {
|
||||
return; // silently return.
|
||||
}
|
||||
|
||||
String plateAddition = "PDB: static local for function (" + address_x + "): " + getName();
|
||||
String plateAddition =
|
||||
"PDB: static local for function (" + applicator.getAddress(symbol) + "): " + getName();
|
||||
// TODO: 20220210... consider adding function name as namespace to varName
|
||||
applicator.createSymbol(varAddress, varName, true, plateAddition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user