Class GoType
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.types.GoType
- All Implemented Interfaces:
StructureMarkup<GoType>
- Direct Known Subclasses:
GoArrayType,GoChanType,GoFuncType,GoInterfaceType,GoMapType,GoPlainType,GoPointerType,GoSliceType,GoStructType
Common abstract base class for GoType classes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StructureContext<GoType>protected GoRttiMapperprotected GoBaseType -
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) protected GoBaseTypelongReturns the location of where this type object, and any known associated optional structures ends.protected longgetSpecializedTypeClass(GoRttiMapper programContext, long offset) Returns the specific GoType derived class that will handle the go type located at the specified offset.Returns the name of the instance, typically retrieved from data found inside the instance.protected StringConverts a golang RTTI type structure into a Ghidra data type.toString()Methods 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, getStructureLabel
-
Field Details
-
programContext
-
context
-
typ
-
-
Constructor Details
-
GoType
public GoType()
-
-
Method Details
-
getSpecializedTypeClass
public static Class<? extends GoType> getSpecializedTypeClass(GoRttiMapper programContext, long offset) throws IOException Returns the specific GoType derived class that will handle the go type located at the specified offset.- Parameters:
programContext- program-level mapper contextoffset- absolute location of go type struct- Returns:
- GoType class that will best handle the type struct
- Throws:
IOException- if error reading
-
getBaseType
-
getNameString
- Throws:
IOException
-
getDebugId
-
getOffsetEndOfFullType
protected long getOffsetEndOfFullType() -
getEndOfTypeInfo
Returns the location of where this type object, and any known associated optional structures ends.- Returns:
- index location of end of this type object
- Throws:
IOException- if error reading
-
getUncommonType
- Throws:
IOException
-
getStructureContext
- Specified by:
getStructureContextin interfaceStructureMarkup<GoType>
-
getStructureName
Description copied from interface:StructureMarkupReturns the name of the instance, typically retrieved from data found inside the instance.- Specified by:
getStructureNamein interfaceStructureMarkup<GoType>- Returns:
- string name, or null if this instance does not have a name
- Throws:
IOException- if error getting name
-
additionalMarkup
Description copied from interface:StructureMarkupCalled to allow the implementor to perform custom markup of itself.- Specified by:
additionalMarkupin interfaceStructureMarkup<GoType>- Parameters:
session- state and methods to assist marking up the program- Throws:
IOException- if error during markup
-
getMethodListString
- Throws:
IOException
-
getTypeDeclString
- Throws:
IOException
-
toString
-
recoverDataType
Converts a golang RTTI type structure into a Ghidra data type.- Returns:
DataTypethat represents the golang type- Throws:
IOException- if error getting name of the type
-
discoverGoTypes
- Throws:
IOException
-