Class VtableModel

java.lang.Object
ghidra.app.cmd.data.rtti.gcc.VtableModel
All Implemented Interfaces:
GnuVtable, Vtable

public final class VtableModel
extends Object
implements GnuVtable
Model for GNU Vtables
  • Field Details

  • Method Details

    • getVtable

      public static GnuVtable getVtable​(Program program, Address address)
    • getVtable

      public static GnuVtable getVtable​(Program program, Address address, ClassTypeInfo type)
    • getTypeInfo

      public ClassTypeInfo getTypeInfo()
      Description copied from interface: Vtable
      Returns the TypeInfo Model this vtable points to
      Specified by:
      getTypeInfo in interface Vtable
      Returns:
      the pointed to TypeInfo Model
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class Object
    • getAddress

      public Address getAddress()
      Gets the corrected start address of the vtable.
      Specified by:
      getAddress in interface Vtable
      Returns:
      the correct start address or NO_ADDRESS if invalid.
    • getTableAddresses

      public Address[] getTableAddresses()
      Description copied from interface: Vtable
      Gets the addresses of this vtable's function tables
      Specified by:
      getTableAddresses in interface Vtable
      Returns:
      the addresses of this vtable's function tables
    • getFunctionTables

      public Function[][] getFunctionTables()
      Description copied from interface: Vtable
      Gets the function tables in this vtable
      Specified by:
      getFunctionTables in interface Vtable
      Returns:
      this vtable's function tables
    • containsFunction

      public boolean containsFunction​(Function function)
      Description copied from interface: Vtable
      Checks if this vtable contains the specified function
      Specified by:
      containsFunction in interface Vtable
      Parameters:
      function - the function to check for
      Returns:
      true if this vtable contains the specified function
    • getLength

      public int getLength()
      Specified by:
      getLength in interface GnuVtable
      Returns:
      the vtable length
      See Also:
      DataType.getLength()
    • getOffset

      public long getOffset​(int index, int ordinal)
      Description copied from interface: GnuVtable
      Gets the ptrdiff_t value within the base offset array.
      Specified by:
      getOffset in interface GnuVtable
      Parameters:
      index - the index in the vtable_prefix array.
      ordinal - the offset ordinal.
      Returns:
      the offset value.
    • getElementCount

      public int getElementCount()
      Gets the number of vtable_prefix's in this vtable
      Returns:
      the number of vtable_prefix's in this vtable
    • getDataTypes

      public List<DataType> getDataTypes()
      Description copied from interface: GnuVtable
      Gets the DataTypes that compose this Vtable
      Specified by:
      getDataTypes in interface GnuVtable
      Returns:
      the list of DataTypes this Vtable is made of
    • getPrefixes

      public List<GnuVtable.VtablePrefix> getPrefixes()
      Description copied from interface: GnuVtable
      Gets the vtable prefixes that compose this vtable
      Specified by:
      getPrefixes in interface GnuVtable
      Returns:
      the list of vtable prefixes
    • isConstruction

      public boolean isConstruction()