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

    • IMAGE_SIZEOF_SYMBOL

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

      public static final short IMAGE_SYM_UNDEFINED
      See Also:
    • IMAGE_SYM_ABSOLUTE

      public static final short IMAGE_SYM_ABSOLUTE
      See Also:
    • IMAGE_SYM_DEBUG

      public static final short IMAGE_SYM_DEBUG
      See Also:
    • IMAGE_SYM_TYPE_NULL

      public static final short IMAGE_SYM_TYPE_NULL
      See Also:
    • IMAGE_SYM_TYPE_VOID

      public static final short IMAGE_SYM_TYPE_VOID
      See Also:
    • IMAGE_SYM_TYPE_CHAR

      public static final short IMAGE_SYM_TYPE_CHAR
      See Also:
    • IMAGE_SYM_TYPE_SHORT

      public static final short IMAGE_SYM_TYPE_SHORT
      See Also:
    • IMAGE_SYM_TYPE_INT

      public static final short IMAGE_SYM_TYPE_INT
      See Also:
    • IMAGE_SYM_TYPE_LONG

      public static final short IMAGE_SYM_TYPE_LONG
      See Also:
    • IMAGE_SYM_TYPE_FLOAT

      public static final short IMAGE_SYM_TYPE_FLOAT
      See Also:
    • IMAGE_SYM_TYPE_DOUBLE

      public static final short IMAGE_SYM_TYPE_DOUBLE
      See Also:
    • IMAGE_SYM_TYPE_STRUCT

      public static final short IMAGE_SYM_TYPE_STRUCT
      See Also:
    • IMAGE_SYM_TYPE_UNION

      public static final short IMAGE_SYM_TYPE_UNION
      See Also:
    • IMAGE_SYM_TYPE_ENUM

      public static final short IMAGE_SYM_TYPE_ENUM
      See Also:
    • IMAGE_SYM_TYPE_MOE

      public static final short IMAGE_SYM_TYPE_MOE
      See Also:
    • IMAGE_SYM_TYPE_BYTE

      public static final short IMAGE_SYM_TYPE_BYTE
      See Also:
    • IMAGE_SYM_TYPE_WORD

      public static final short IMAGE_SYM_TYPE_WORD
      See Also:
    • IMAGE_SYM_TYPE_UINT

      public static final short IMAGE_SYM_TYPE_UINT
      See Also:
    • IMAGE_SYM_TYPE_DWORD

      public static final short IMAGE_SYM_TYPE_DWORD
      See Also:
    • IMAGE_SYM_TYPE_PCODE

      public static final short IMAGE_SYM_TYPE_PCODE
      See Also:
    • IMAGE_SYM_DTYPE_NULL

      public static final short IMAGE_SYM_DTYPE_NULL
      See Also:
    • IMAGE_SYM_DTYPE_POINTER

      public static final short IMAGE_SYM_DTYPE_POINTER
      See Also:
    • IMAGE_SYM_DTYPE_FUNCTION

      public static final short IMAGE_SYM_DTYPE_FUNCTION
      See Also:
    • IMAGE_SYM_DTYPE_ARRAY

      public static final short IMAGE_SYM_DTYPE_ARRAY
      See Also:
    • IMAGE_SYM_CLASS_END_OF_FUNCTION

      public static final byte IMAGE_SYM_CLASS_END_OF_FUNCTION
      See Also:
    • IMAGE_SYM_CLASS_NULL

      public static final byte IMAGE_SYM_CLASS_NULL
      See Also:
    • IMAGE_SYM_CLASS_AUTOMATIC

      public static final byte IMAGE_SYM_CLASS_AUTOMATIC
      See Also:
    • IMAGE_SYM_CLASS_EXTERNAL

      public static final byte IMAGE_SYM_CLASS_EXTERNAL
      See Also:
    • IMAGE_SYM_CLASS_STATIC

      public static final byte IMAGE_SYM_CLASS_STATIC
      See Also:
    • IMAGE_SYM_CLASS_REGISTER

      public static final byte IMAGE_SYM_CLASS_REGISTER
      See Also:
    • IMAGE_SYM_CLASS_EXTERNAL_DEF

      public static final byte IMAGE_SYM_CLASS_EXTERNAL_DEF
      See Also:
    • IMAGE_SYM_CLASS_LABEL

      public static final byte IMAGE_SYM_CLASS_LABEL
      See Also:
    • IMAGE_SYM_CLASS_UNDEFINED_LABEL

      public static final byte IMAGE_SYM_CLASS_UNDEFINED_LABEL
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_STRUCT

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_STRUCT
      See Also:
    • IMAGE_SYM_CLASS_ARGUMENT

      public static final byte IMAGE_SYM_CLASS_ARGUMENT
      See Also:
    • IMAGE_SYM_CLASS_STRUCT_TAG

      public static final byte IMAGE_SYM_CLASS_STRUCT_TAG
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_UNION

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_UNION
      See Also:
    • IMAGE_SYM_CLASS_UNION_TAG

      public static final byte IMAGE_SYM_CLASS_UNION_TAG
      See Also:
    • IMAGE_SYM_CLASS_TYPE_DEFINITION

      public static final byte IMAGE_SYM_CLASS_TYPE_DEFINITION
      See Also:
    • IMAGE_SYM_CLASS_UNDEFINED_STATIC

      public static final byte IMAGE_SYM_CLASS_UNDEFINED_STATIC
      See Also:
    • IMAGE_SYM_CLASS_ENUM_TAG

      public static final byte IMAGE_SYM_CLASS_ENUM_TAG
      See Also:
    • IMAGE_SYM_CLASS_MEMBER_OF_ENUM

      public static final byte IMAGE_SYM_CLASS_MEMBER_OF_ENUM
      See Also:
    • IMAGE_SYM_CLASS_REGISTER_PARAM

      public static final byte IMAGE_SYM_CLASS_REGISTER_PARAM
      See Also:
    • IMAGE_SYM_CLASS_BIT_FIELD

      public static final byte IMAGE_SYM_CLASS_BIT_FIELD
      See Also:
    • IMAGE_SYM_CLASS_FAR_EXTERNAL

      public static final byte IMAGE_SYM_CLASS_FAR_EXTERNAL
      See Also:
    • IMAGE_SYM_CLASS_BLOCK

      public static final byte IMAGE_SYM_CLASS_BLOCK
      See Also:
    • IMAGE_SYM_CLASS_FUNCTION

      public static final byte IMAGE_SYM_CLASS_FUNCTION
      See Also:
    • IMAGE_SYM_CLASS_END_OF_STRUCT

      public static final byte IMAGE_SYM_CLASS_END_OF_STRUCT
      See Also:
    • IMAGE_SYM_CLASS_FILE

      public static final byte IMAGE_SYM_CLASS_FILE
      See Also:
    • IMAGE_SYM_CLASS_SECTION

      public static final byte IMAGE_SYM_CLASS_SECTION
      See Also:
    • IMAGE_SYM_CLASS_WEAK_EXTERNAL

      public static final byte IMAGE_SYM_CLASS_WEAK_EXTERNAL
      See Also:
  • Constructor Details

  • Method Details

    • getAuxiliarySymbols

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

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

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

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

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

      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

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

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

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

      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

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

      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
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object