Class GoFunctionFixup
java.lang.Object
ghidra.app.util.bin.format.golang.GoFunctionFixup
Utility class that fixes golang function parameter storage using each function's current
parameter list (formal info only) as starting information.
TODO: verify GoFuncData.argsize property against what we calculate here
-
Constructor Summary
ConstructorsChangeConstructorDescriptionGoFunctionFixup(Function func, GoVer goVersion) GoFunctionFixup(Function func, FunctionSignature newSignature, String newCallingConv, GoParamStorageAllocator storageAllocator) -
Method Summary
ChangeModifier and TypeMethodDescriptionNEWvoidapply()NEWstatic booleanNEWstatic booleanstatic DataTypeReturns a Ghidra data type that represents a zero-length array, to be used as a replacement for a zero-length array parameter.static voidreverseNonStackStorageLocations(List<Varnode> varnodes) Invert the order of the any register storage locations to match the decompiler's logic for assigning storage to structs that varies on endianness.REMOVEDvoidfixupFunction(Function func) RemovedREMOVEDvoidfixupFunction(Function func, GoVer goVersion) RemovedREMOVEDbooleanisGolangAbi0Func(Function func) RemovedREMOVEDbooleanisInLocalVarStorageArea(Function func, long stackOffset) Removed
-
Constructor Details
-
GoFunctionFixup
-
GoFunctionFixup
public GoFunctionFixup(Function func, FunctionSignature newSignature, String newCallingConv, GoParamStorageAllocator storageAllocator)
-
-
Method Details
-
isClosureContext NEW
-
isClosureContext NEW
-
apply NEW
-
makeEmptyArrayDataType
Returns a Ghidra data type that represents a zero-length array, to be used as a replacement for a zero-length array parameter.- Parameters:
dt- data type that will donate its name to the created empty array type- Returns:
DataTypethat represents a specific zero-length array type
-
reverseNonStackStorageLocations
Invert the order of the any register storage locations to match the decompiler's logic for assigning storage to structs that varies on endianness.Only valid for storage scheme that has all register storages listed first / contiguous.
- Parameters:
varnodes- list ofvarnodesthat will be modified in-place
-