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

public class GoMapType extends GoType
Golang type info about a specific map type.

See GoRttiMapper.getMapGoType() or the "runtime.hmap" type for the definition of a instance of a map variable in memory.

  • Constructor Details

    • GoMapType

      public GoMapType()
  • Method Details

    • getKey

      public GoType getKey() throws IOException
      Returns the GoType that defines the map's key, referenced by the key field's markup annotation
      Returns:
      GoType that defines the map's key
      Throws:
      IOException - if error reading data
    • getElement

      public GoType getElement() throws IOException
      Returns the GoType that defines the map's element, referenced by the element field's markup annotation
      Returns:
      GoType that defines the map's element
      Throws:
      IOException - if error reading data
    • getBucket

      public GoType getBucket() throws IOException
      Returns the GoType that defines the map's bucket, referenced by the bucket field's markup annotation
      Returns:
      GoType that defines the map's bucket
      Throws:
      IOException - if error reading data
    • 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
    • getTypeDeclString

      protected String getTypeDeclString() throws IOException
      Description copied from class: GoType
      Returns a descriptive string that defines the declaration of this type.

      This method should be overloaded by more specific types.

      Overrides:
      getTypeDeclString in class GoType
      Returns:
      descriptive string
      Throws:
      IOException - if error reading data