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>

public class GoPlainType extends GoType implements 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.

  • Constructor Details

    • GoPlainType

      public GoPlainType()
  • Method Details

    • readStructure

      public void readStructure() throws IOException
      Description copied from interface: StructureReader
      Called after an instance has been created and its context has been initialized.
      Specified by:
      readStructure in interface StructureReader<GoType>
      Throws:
      IOException
    • recoverDataType

      public DataType recoverDataType() throws IOException
      Description copied from class: GoType
      Converts a golang RTTI type structure into a Ghidra data type.
      Overrides:
      recoverDataType in class GoType
      Returns:
      DataType that represents the golang type
      Throws:
      IOException - if error getting name of the type
    • discoverGoTypes

      public boolean discoverGoTypes(Set<Long> discoveredTypes) throws IOException
      Description copied from class: GoType
      Iterates this type, and any types this type refers to, while registering the types with the GoRttiMapper context.

      This method should be overloaded by derived type classes to add any additional types referenced by the derived type.

      Overrides:
      discoverGoTypes in class GoType
      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