Class DebugCOFFSymbol

java.lang.Object
ghidra.app.util.bin.format.pe.debug.DebugCOFFSymbol
All Implemented Interfaces:
StructConverter

public class DebugCOFFSymbol extends Object implements StructConverter
A class to represent the COFF symbol data structure.
 typedef struct _IMAGE_SYMBOL {
     union {
         BYTE    ShortName[8];
         struct {
             DWORD   Short;     // if 0, use LongName
             DWORD   Long;      // offset into string table
         } Name;
         DWORD   LongName[2];    // PBYTE [2]
     } N;
     DWORD   Value;
     SHORT   SectionNumber;
     WORD    Type;
     BYTE    StorageClass;
     BYTE    NumberOfAuxSymbols;
 } IMAGE_SYMBOL;
 
  • Field Details Link icon

    • IMAGE_SIZEOF_SYMBOL Link icon

      public static final int IMAGE_SIZEOF_SYMBOL
      The size of the IMAGE_SYMBOL structure.
      See Also:
    • IMAGE_SYM_UNDEFINED Link icon

      public static final short IMAGE_SYM_UNDEFINED
      See Also:
    • IMAGE_SYM_ABSOLUTE Link icon

      public static final short IMAGE_SYM_ABSOLUTE
      See Also:
    • IMAGE_SYM_DEBUG Link icon

      public static final short IMAGE_SYM_DEBUG
      See Also:
    • IMAGE_SYM_TYPE_NULL Link icon

      public static final short IMAGE_SYM_TYPE_NULL
      See Also:
    • IMAGE_SYM_TYPE_VOID Link icon

      public static final short IMAGE_SYM_TYPE_VOID
      See Also:
    • IMAGE_SYM_TYPE_CHAR Link icon

      public static final short IMAGE_SYM_TYPE_CHAR
      See Also:
    • IMAGE_SYM_TYPE_SHORT Link icon

      public static final short IMAGE_SYM_TYPE_SHORT
      See Also:
    • IMAGE_SYM_TYPE_INT Link icon

      public static final short IMAGE_SYM_TYPE_INT
      See Also:
    • IMAGE_SYM_TYPE_LONG Link icon

      public static final short IMAGE_SYM_TYPE_LONG
      See Also:
    • IMAGE_SYM_TYPE_FLOAT Link icon

      public static final short IMAGE_SYM_TYPE_FLOAT
      See Also:
    • IMAGE_SYM_TYPE_DOUBLE Link icon

      public static final short IMAGE_SYM_TYPE_DOUBLE
      See Also:
    • IMAGE_SYM_TYPE_STRUCT Link icon

      public static final short IMAGE_SYM_TYPE_STRUCT
      See Also:
    • IMAGE_SYM_TYPE_UNION Link icon

      public static final short IMAGE_SYM_TYPE_UNION
      See Also:
    • IMAGE_SYM_TYPE_ENUM Link icon

      public static final short IMAGE_SYM_TYPE_ENUM
      See Also:
    • IMAGE_SYM_TYPE_MOE Link icon

      public static final short IMAGE_SYM_TYPE_MOE
      See Also:
    • IMAGE_SYM_TYPE_BYTE Link icon

      public static final short IMAGE_SYM_TYPE_BYTE
      See Also:
    • IMAGE_SYM_TYPE_WORD Link icon

      public static final short IMAGE_SYM_TYPE_WORD
      See Also:
    • IMAGE_SYM_TYPE_UINT Link icon

      public static final short IMAGE_SYM_TYPE_UINT
      See Also:
    • IMAGE_SYM_TYPE_DWORD Link icon

      public static final short IMAGE_SYM_TYPE_DWORD
      See Also:
    • IMAGE_SYM_TYPE_PCODE Link icon

      public static final short IMAGE_SYM_TYPE_PCODE
      See Also:
    • IMAGE_SYM_DTYPE_NULL Link icon

      public static final short IMAGE_SYM_DTYPE_NULL
      See Also:
    • IMAGE_SYM_DTYPE_POINTER Link icon

      public static final short IMAGE_SYM_DTYPE_POINTER
      See Also:
    • IMAGE_SYM_DTYPE_FUNCTION Link icon

      public static final short IMAGE_SYM_DTYPE_FUNCTION
      See Also:
    • IMAGE_SYM_DTYPE_ARRAY Link icon

      public static final short IMAGE_SYM_DTYPE_ARRAY
      See Also:
    • IMAGE_SYM_CLASS_END_OF_FUNCTION Link icon

      public static final byte IMAGE_SYM_CLASS_END_OF_FUNCTION
      See Also:
    • IMAGE_SYM_CLASS_NULL Link icon

      public static final byte IMAGE_SYM_CLASS_NULL
      See Also:
    • IMAGE_SYM_CLASS_AUTOMATIC Link icon

      public static final byte IMAGE_SYM_CLASS_AUTOMATIC
      See Also:
    • IMAGE_SYM_CLASS_EXTERNAL Link icon

      public static final byte IMAGE_SYM_CLASS_EXTERNAL
      See Also:
    • IMAGE_SYM_CLASS_STATIC Link icon

      public static final byte IMAGE_SYM_CLASS_STATIC
      See Also:
    • IMAGE_SYM_CLASS_REGISTER Link icon

      public static final byte IMAGE_SYM_CLASS_REGISTER
      See Also:
    • IMAGE_SYM_CLASS_EXTERNAL_DEF Link icon

      public static final byte IMAGE_SYM_CLASS_EXTERNAL_DEF
      See Also:
    • IMAGE_SYM_CLASS_LABEL Link icon

      public static final byte IMAGE_SYM_CLASS_LABEL
      See Also:
    • IMAGE_SYM_CLASS_UNDEFINED_LABEL Link icon

      public static final byte IMAGE_SYM_CLASS_UNDEFINED_LABEL
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_STRUCT Link icon

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_STRUCT
      See Also:
    • IMAGE_SYM_CLASS_ARGUMENT Link icon

      public static final byte IMAGE_SYM_CLASS_ARGUMENT
      See Also:
    • IMAGE_SYM_CLASS_STRUCT_TAG Link icon

      public static final byte IMAGE_SYM_CLASS_STRUCT_TAG
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_UNION Link icon

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_UNION
      See Also:
    • IMAGE_SYM_CLASS_UNION_TAG Link icon

      public static final byte IMAGE_SYM_CLASS_UNION_TAG
      See Also:
    • IMAGE_SYM_CLASS_TYPE_DEFINITION Link icon

      public static final byte IMAGE_SYM_CLASS_TYPE_DEFINITION
      See Also:
    • IMAGE_SYM_CLASS_UNDEFINED_STATIC Link icon

      public static final byte IMAGE_SYM_CLASS_UNDEFINED_STATIC
      See Also:
    • IMAGE_SYM_CLASS_ENUM_TAG Link icon

      public static final byte IMAGE_SYM_CLASS_ENUM_TAG
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_ENUM Link icon

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_ENUM
      See Also:
    • IMAGE_SYM_CLASS_REGISTER_PARAM Link icon

      public static final byte IMAGE_SYM_CLASS_REGISTER_PARAM
      See Also:
    • IMAGE_SYM_CLASS_BIT_FIELD Link icon

      public static final byte IMAGE_SYM_CLASS_BIT_FIELD
      See Also:
    • IMAGE_SYM_CLASS_FAR_EXTERNAL Link icon

      public static final byte IMAGE_SYM_CLASS_FAR_EXTERNAL
      See Also:
    • IMAGE_SYM_CLASS_BLOCK Link icon

      public static final byte IMAGE_SYM_CLASS_BLOCK
      See Also:
    • IMAGE_SYM_CLASS_FUNCTION Link icon

      public static final byte IMAGE_SYM_CLASS_FUNCTION
      See Also:
    • IMAGE_SYM_CLASS_END_OF_STRUCT Link icon

      public static final byte IMAGE_SYM_CLASS_END_OF_STRUCT
      See Also:
    • IMAGE_SYM_CLASS_FILE Link icon

      public static final byte IMAGE_SYM_CLASS_FILE
      See Also:
    • IMAGE_SYM_CLASS_SECTION Link icon

      public static final byte IMAGE_SYM_CLASS_SECTION
      See Also:
    • IMAGE_SYM_CLASS_WEAK_EXTERNAL Link icon

      public static final byte IMAGE_SYM_CLASS_WEAK_EXTERNAL
      See Also:
  • Constructor Details Link icon

  • Method Details Link icon

    • getAuxiliarySymbols Link icon

      public DebugCOFFSymbolAux[] getAuxiliarySymbols()
      Returns the auxiliary symbols related to this symbol.
      Returns:
      the auxiliary symbols related to this symbol
    • getName Link icon

      public String getName()
      Returns the name of this symbol.
      Returns:
      the name of this symbol
    • getValue Link icon

      public int getValue()
      Returns the value of this symbol.
      Returns:
      the value of this symbol
    • getValueAsString Link icon

      public String getValueAsString()
      Returns a string equivalent of the value of this symbol.
      Returns:
      a string equivalent of the value of this symbol
    • getSectionNumber Link icon

      public int getSectionNumber()
      Returns the section number if this symbol.
      Returns:
      the section number if this symbol
    • getSectionNumberAsString Link icon

      public String getSectionNumberAsString()
      Returns a string equivalent of the section number of this symbol.
      Returns:
      a string equivalent of the section number of this symbol
    • getType Link icon

      public int getType()
      Returns the type of this symbol.
      Returns:
      the type of this symbol
    • getTypeAsString Link icon

      public String getTypeAsString()
      Returns a string equivalent of the type of this symbol.
      Returns:
      a string equivalent of the type of this symbol
    • getStorageClass Link icon

      public int getStorageClass()
      Returns the storage class of this symbol.
      Returns:
      the storage class of this symbol
    • getStorageClassAsString Link icon

      public String getStorageClassAsString()
      Returns a string equivalent of the storage class of this symbol.
      Returns:
      a string equivalent of the storage class of this symbol
    • getNumberOfAuxSymbols Link icon

      public int getNumberOfAuxSymbols()
      Returns the number of auxiliary symbols defined with this symbol.
      Returns:
      the number of auxiliary symbols defined with this symbol
    • toDataType Link icon

      public DataType toDataType() throws DuplicateNameException, IOException
      Description copied from interface: StructConverter
      Returns a structure datatype representing the contents of the implementor of this interface.

      For example, given:

       class A {
           int foo;
           double bar;
       }
       

      The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

      Specified by:
      toDataType in interface StructConverter
      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      IOException - if an IO-related error occurs
      See Also:
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object