Class GoPlainType
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.types.GoType
ghidra.app.util.bin.format.golang.rtti.types.GoPlainType
- All Implemented Interfaces:
StructureMarkup<GoType>
,StructureReader<GoType>
WARNING: tricky code / class layout here!
To coerce java inheritance and structmapping features to match the layout of go rtti type structs, this class is constructed strangely.
GoType
structure that defines a built-in primitive type.
-
Field Summary
Fields inherited from class ghidra.app.util.bin.format.golang.rtti.types.GoType
context, programContext, typ, uncommonType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
discoverGoTypes
(Set<Long> discoveredTypes) Iterates this type, and any types this type refers to, while registering the types with theGoRttiMapper
context.void
Called after an instance has been created and its context has been initialized.Converts a golang RTTI type structure into a Ghidra data type.Methods inherited from class ghidra.app.util.bin.format.golang.rtti.types.GoType
additionalMarkup, getBaseType, getDebugId, getEndOfTypeInfo, getImplementsInterfaceString, getMethodInfoList, getMethodListString, getMethodSignature, getName, getNameWithPackageString, getOffsetEndOfFullType, getPackagePathString, getSpecializedTypeClass, getStructureContext, getStructureName, getStructureNamespace, getTypeDeclString, getTypeOffset, getUncommonType, getUniqueTypename, 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
-
Constructor Details
-
GoPlainType
public GoPlainType()
-
-
Method Details
-
readStructure
Description copied from interface:StructureReader
Called after an instance has been created and its context has been initialized.- Specified by:
readStructure
in interfaceStructureReader<GoType>
- Throws:
IOException
-
recoverDataType
Description copied from class:GoType
Converts a golang RTTI type structure into a Ghidra data type.- Overrides:
recoverDataType
in classGoType
- Returns:
DataType
that represents the golang type- Throws:
IOException
- if error getting name of the type
-
discoverGoTypes
Description copied from class:GoType
Iterates this type, and any types this type refers to, while registering the types with theGoRttiMapper
context.This method should be overloaded by derived type classes to add any additional types referenced by the derived type.
- Overrides:
discoverGoTypes
in 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
-