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 GoRttiMapper
protected GoBaseType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
additionalMarkup
(MarkupSession session) Called to allow the implementor to perform custom markup of itself.boolean
discoverGoTypes
(Set<Long> discoveredTypes) protected GoBaseType
long
Returns the location of where this type object, and any known associated optional structures ends.protected long
getSpecializedTypeClass
(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 String
Converts 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, wait
Methods 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:
getStructureContext
in interfaceStructureMarkup<GoType>
-
getStructureName
Description copied from interface:StructureMarkup
Returns the name of the instance, typically retrieved from data found inside the instance.- Specified by:
getStructureName
in 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:StructureMarkup
Called to allow the implementor to perform custom markup of itself.- Specified by:
additionalMarkup
in 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:
DataType
that represents the golang type- Throws:
IOException
- if error getting name of the type
-
discoverGoTypes
- Throws:
IOException
-