Class GoFuncType
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.types.GoType
ghidra.app.util.bin.format.golang.rtti.types.GoFuncType
- All Implemented Interfaces:
 StructureMarkup<GoType>,StructureVerifier
A 
GoType structure that defines a function type.- 
Field Summary
Fields inherited from class ghidra.app.util.bin.format.golang.rtti.types.GoType
context, programContext, typ, uncommonType - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidadditionalMarkup(MarkupSession session) Called to allow the implementor to perform custom markup of itself.booleandiscoverGoTypes(Set<Long> discoveredTypes) Iterates this type, and any types this type refers to, while registering the types with theGoRttiMappercontext.getFuncPrototypeString(String funcName) Returns a string that describes the function type as a golang-ish function decl.getFunctionSignature(GoTypeManager goTypes) intReturns the number of inbound parametersstatic StringgetMissingFuncPrototypeString(String funcName, String genericsString) intReturns the number of outbound result valuesintReturns the total number of in and out parametersReturns a list ofGoTypes for each parameterprotected StringReturns a descriptive string that defines the declaration of this type.booleanisValid()booleanisVarArg()Returns true if this function type is defined to be varargrecoverDataType(GoTypeManager goTypes) Converts a golang RTTI type structure into a Ghidra data type.static FunctionDefinitionConverts a ptr-to-ptr-to-funcdef to the base funcdef type.Methods inherited from class ghidra.app.util.bin.format.golang.rtti.types.GoType
getBaseType, getDebugId, getEndOfTypeInfo, getFullyQualifiedName, getImplementsInterfaceString, getMethodInfoList, getMethodListString, getMethodPrototypeString, getMethodPrototypeString, getName, getOffsetEndOfFullType, getPackagePathString, getSpecializedTypeClass, getStructureContext, getStructureLabel, getStructureName, getStructureNamespace, getSymbolName, getTypeOffset, getUncommonType, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.app.util.bin.format.golang.structmapping.StructureMarkup
getExternalInstancesToMarkup 
- 
Constructor Details
- 
GoFuncType
public GoFuncType() 
 - 
 - 
Method Details
- 
unwrapFunctionDefinitionPtrs
Converts a ptr-to-ptr-to-funcdef to the base funcdef type.- Parameters:
 dt- ghidraDataType- Returns:
 FunctionDefinitionthat was pointed to by specified data type, or null
 - 
isVarArg
public boolean isVarArg()Returns true if this function type is defined to be vararg- Returns:
 - true if this function type is defined to be vararg
 
 - 
getInCount
public int getInCount()Returns the number of inbound parameters- Returns:
 - number of inbound parameters
 
 - 
getOutCount
public int getOutCount()Returns the number of outbound result values- Returns:
 - number of outbound result values
 
 - 
getParamCount
public int getParamCount()Returns the total number of in and out parameters- Returns:
 - total number of in and out parameters
 
 - 
getParamTypes
Returns a list ofGoTypes for each parameter- Returns:
 - list of 
GoTypes for each parameter - Throws:
 IOException- if error read type info
 - 
additionalMarkup
Description copied from interface:StructureMarkupCalled to allow the implementor to perform custom markup of itself.- Specified by:
 additionalMarkupin interfaceStructureMarkup<GoType>- Overrides:
 additionalMarkupin classGoType- Parameters:
 session- state and methods to assist marking up the program- Throws:
 IOException- if error during markupCancelledException- if cancelled
 - 
getFuncPrototypeString
Returns a string that describes the function type as a golang-ish function decl.- Parameters:
 funcName- optional name of a function- Returns:
 - golang func decl string
 
 - 
getParamListString
 - 
getMissingFuncPrototypeString
 - 
recoverDataType
Description copied from class:GoTypeConverts a golang RTTI type structure into a Ghidra data type.This default implementation just creates an opaque blob of the appropriate size
- Overrides:
 recoverDataTypein classGoType- Parameters:
 goTypes-GoTypeManager- Returns:
 DataTypethat represents the golang type- Throws:
 IOException- if error getting name of the type
 - 
getFunctionSignature
- Throws:
 IOException
 - 
discoverGoTypes
Description copied from class:GoTypeIterates this type, and any types this type refers to, while registering the types with theGoRttiMappercontext.This method should be overloaded by derived type classes to add any additional types referenced by the derived type.
- Overrides:
 discoverGoTypesin classGoType- Parameters:
 discoveredTypes- set of already iterated types- Returns:
 - boolean boolean flag, if false the type has already been discovered, if true the type was encountered for the first time
 - Throws:
 IOException- if error reading type info
 - 
getTypeDeclString
Description copied from class:GoTypeReturns a descriptive string that defines the declaration of this type.This method should be overloaded by more specific types.
- Overrides:
 getTypeDeclStringin classGoType- Returns:
 - descriptive string
 - Throws:
 IOException- if error reading data
 - 
isValid
public boolean isValid()- Specified by:
 isValidin interfaceStructureVerifier- Overrides:
 isValidin classGoType
 
 -