mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-0 - PDB - Fix FunctionSymbolApplier from GP-3991
This commit is contained in:
parent
6d6d0317e2
commit
039056fe41
1 changed files with 4 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue