java.lang.Object
ghidra.app.util.bin.format.golang.rtti.types.GoType
ghidra.app.util.bin.format.golang.rtti.types.GoChanType
All Implemented Interfaces:
StructureMarkup<GoType>, StructureVerifier

public class GoChanType extends GoType
A GoType structure that defines a go channel
  • Constructor Details

    • GoChanType

      public GoChanType()
  • Method Details

    • getElement

      public GoType getElement() throws IOException
      Returns a reference to the GoType that defines the elements this channel uses
      Returns:
      reference to the GoType that defines the elements this channel uses
      Throws:
      IOException - if error reading type
    • recoverDataType

      public DataType recoverDataType(GoTypeManager goTypes) throws IOException
      Description copied from class: GoType
      Converts a golang RTTI type structure into a Ghidra data type.

      This default implementation just creates an opaque blob of the appropriate size

      Overrides:
      recoverDataType in class GoType
      Parameters:
      goTypes - GoTypeManager
      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
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface StructureVerifier
      Overrides:
      isValid in class GoType