Package ghidra.app.util.bin.format.pe.debug

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `IMAGE_SIZEOF_SYMBOL`
  The size of the `IMAGE_SYMBOL` structure.
  `static final short`
  `IMAGE_SYM_ABSOLUTE`
  `static final byte`
  `IMAGE_SYM_CLASS_ARGUMENT`
  `static final byte`
  `IMAGE_SYM_CLASS_AUTOMATIC`
  `static final byte`
  `IMAGE_SYM_CLASS_BIT_FIELD`
  `static final byte`
  `IMAGE_SYM_CLASS_BLOCK`
  `static final byte`
  `IMAGE_SYM_CLASS_END_OF_FUNCTION`
  `static final byte`
  `IMAGE_SYM_CLASS_END_OF_STRUCT`
  `static final byte`
  `IMAGE_SYM_CLASS_ENUM_TAG`
  `static final byte`
  `IMAGE_SYM_CLASS_EXTERNAL`
  `static final byte`
  `IMAGE_SYM_CLASS_EXTERNAL_DEF`
  `static final byte`
  `IMAGE_SYM_CLASS_FAR_EXTERNAL`
  `static final byte`
  `IMAGE_SYM_CLASS_FILE`
  `static final byte`
  `IMAGE_SYM_CLASS_FUNCTION`
  `static final byte`
  `IMAGE_SYM_CLASS_LABEL`
  `static final byte`
  `IMAGE_SYM_CLASS_MEMBER_OF_ENUM`
  `static final byte`
  `IMAGE_SYM_CLASS_MEMBER_OF_STRUCT`
  `static final byte`
  `IMAGE_SYM_CLASS_MEMBER_OF_UNION`
  `static final byte`
  `IMAGE_SYM_CLASS_NULL`
  `static final byte`
  `IMAGE_SYM_CLASS_REGISTER`
  `static final byte`
  `IMAGE_SYM_CLASS_REGISTER_PARAM`
  `static final byte`
  `IMAGE_SYM_CLASS_SECTION`
  `static final byte`
  `IMAGE_SYM_CLASS_STATIC`
  `static final byte`
  `IMAGE_SYM_CLASS_STRUCT_TAG`
  `static final byte`
  `IMAGE_SYM_CLASS_TYPE_DEFINITION`
  `static final byte`
  `IMAGE_SYM_CLASS_UNDEFINED_LABEL`
  `static final byte`
  `IMAGE_SYM_CLASS_UNDEFINED_STATIC`
  `static final byte`
  `IMAGE_SYM_CLASS_UNION_TAG`
  `static final byte`
  `IMAGE_SYM_CLASS_WEAK_EXTERNAL`
  `static final short`
  `IMAGE_SYM_DEBUG`
  `static final short`
  `IMAGE_SYM_DTYPE_ARRAY`
  `static final short`
  `IMAGE_SYM_DTYPE_FUNCTION`
  `static final short`
  `IMAGE_SYM_DTYPE_NULL`
  `static final short`
  `IMAGE_SYM_DTYPE_POINTER`
  `static final short`
  `IMAGE_SYM_TYPE_BYTE`
  `static final short`
  `IMAGE_SYM_TYPE_CHAR`
  `static final short`
  `IMAGE_SYM_TYPE_DOUBLE`
  `static final short`
  `IMAGE_SYM_TYPE_DWORD`
  `static final short`
  `IMAGE_SYM_TYPE_ENUM`
  `static final short`
  `IMAGE_SYM_TYPE_FLOAT`
  `static final short`
  `IMAGE_SYM_TYPE_INT`
  `static final short`
  `IMAGE_SYM_TYPE_LONG`
  `static final short`
  `IMAGE_SYM_TYPE_MOE`
  `static final short`
  `IMAGE_SYM_TYPE_NULL`
  `static final short`
  `IMAGE_SYM_TYPE_PCODE`
  `static final short`
  `IMAGE_SYM_TYPE_SHORT`
  `static final short`
  `IMAGE_SYM_TYPE_STRUCT`
  `static final short`
  `IMAGE_SYM_TYPE_UINT`
  `static final short`
  `IMAGE_SYM_TYPE_UNION`
  `static final short`
  `IMAGE_SYM_TYPE_VOID`
  `static final short`
  `IMAGE_SYM_TYPE_WORD`
  `static final short`
  `IMAGE_SYM_UNDEFINED`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DebugCOFFSymbol(BinaryReader reader, int index, long stringTableIndex)`
  `DebugCOFFSymbol(BinaryReader reader, int index, DebugCOFFSymbolTable symbolTable)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DebugCOFFSymbolAux[]`
  `getAuxiliarySymbols()`
  Returns the auxiliary symbols related to this symbol.
  `String`
  `getName()`
  Returns the name of this symbol.
  `int`
  `getNumberOfAuxSymbols()`
  Returns the number of auxiliary symbols defined with this symbol.
  `int`
  `getSectionNumber()`
  Returns the section number if this symbol.
  `String`
  `getSectionNumberAsString()`
  Returns a string equivalent of the section number of this symbol.
  `int`
  `getStorageClass()`
  Returns the storage class of this symbol.
  `String`
  `getStorageClassAsString()`
  Returns a string equivalent of the storage class of this symbol.
  `int`
  `getType()`
  Returns the type of this symbol.
  `String`
  `getTypeAsString()`
  Returns a string equivalent of the type of this symbol.
  `int`
  `getValue()`
  Returns the value of this symbol.
  `String`
  `getValueAsString()`
  Returns a string equivalent of the value of this symbol.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### IMAGE_SIZEOF_SYMBOL

    public static final int IMAGE_SIZEOF_SYMBOL
    The size of the `IMAGE_SYMBOL` structure.
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_UNDEFINED

    public static final short IMAGE_SYM_UNDEFINED
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_ABSOLUTE

    public static final short IMAGE_SYM_ABSOLUTE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_DEBUG

    public static final short IMAGE_SYM_DEBUG
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_NULL

    public static final short IMAGE_SYM_TYPE_NULL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_VOID

    public static final short IMAGE_SYM_TYPE_VOID
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_CHAR

    public static final short IMAGE_SYM_TYPE_CHAR
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_SHORT

    public static final short IMAGE_SYM_TYPE_SHORT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_INT

    public static final short IMAGE_SYM_TYPE_INT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_LONG

    public static final short IMAGE_SYM_TYPE_LONG
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_FLOAT

    public static final short IMAGE_SYM_TYPE_FLOAT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_DOUBLE

    public static final short IMAGE_SYM_TYPE_DOUBLE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_STRUCT

    public static final short IMAGE_SYM_TYPE_STRUCT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_UNION

    public static final short IMAGE_SYM_TYPE_UNION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_ENUM

    public static final short IMAGE_SYM_TYPE_ENUM
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_MOE

    public static final short IMAGE_SYM_TYPE_MOE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_BYTE

    public static final short IMAGE_SYM_TYPE_BYTE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_WORD

    public static final short IMAGE_SYM_TYPE_WORD
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_UINT

    public static final short IMAGE_SYM_TYPE_UINT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_DWORD

    public static final short IMAGE_SYM_TYPE_DWORD
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_TYPE_PCODE

    public static final short IMAGE_SYM_TYPE_PCODE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_DTYPE_NULL

    public static final short IMAGE_SYM_DTYPE_NULL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_DTYPE_POINTER

    public static final short IMAGE_SYM_DTYPE_POINTER
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_DTYPE_FUNCTION

    public static final short IMAGE_SYM_DTYPE_FUNCTION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_DTYPE_ARRAY

    public static final short IMAGE_SYM_DTYPE_ARRAY
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_END_OF_FUNCTION

    public static final byte IMAGE_SYM_CLASS_END_OF_FUNCTION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_NULL

    public static final byte IMAGE_SYM_CLASS_NULL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_AUTOMATIC

    public static final byte IMAGE_SYM_CLASS_AUTOMATIC
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_EXTERNAL

    public static final byte IMAGE_SYM_CLASS_EXTERNAL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_STATIC

    public static final byte IMAGE_SYM_CLASS_STATIC
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_REGISTER

    public static final byte IMAGE_SYM_CLASS_REGISTER
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_EXTERNAL_DEF

    public static final byte IMAGE_SYM_CLASS_EXTERNAL_DEF
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_LABEL

    public static final byte IMAGE_SYM_CLASS_LABEL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_UNDEFINED_LABEL

    public static final byte IMAGE_SYM_CLASS_UNDEFINED_LABEL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_MEMBER_OF_STRUCT

    public static final byte IMAGE_SYM_CLASS_MEMBER_OF_STRUCT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_ARGUMENT

    public static final byte IMAGE_SYM_CLASS_ARGUMENT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_STRUCT_TAG

    public static final byte IMAGE_SYM_CLASS_STRUCT_TAG
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_MEMBER_OF_UNION

    public static final byte IMAGE_SYM_CLASS_MEMBER_OF_UNION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_UNION_TAG

    public static final byte IMAGE_SYM_CLASS_UNION_TAG
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_TYPE_DEFINITION

    public static final byte IMAGE_SYM_CLASS_TYPE_DEFINITION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_UNDEFINED_STATIC

    public static final byte IMAGE_SYM_CLASS_UNDEFINED_STATIC
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_ENUM_TAG

    public static final byte IMAGE_SYM_CLASS_ENUM_TAG
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_MEMBER_OF_ENUM

    public static final byte IMAGE_SYM_CLASS_MEMBER_OF_ENUM
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_REGISTER_PARAM

    public static final byte IMAGE_SYM_CLASS_REGISTER_PARAM
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_BIT_FIELD

    public static final byte IMAGE_SYM_CLASS_BIT_FIELD
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_FAR_EXTERNAL

    public static final byte IMAGE_SYM_CLASS_FAR_EXTERNAL
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_BLOCK

    public static final byte IMAGE_SYM_CLASS_BLOCK
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_FUNCTION

    public static final byte IMAGE_SYM_CLASS_FUNCTION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_END_OF_STRUCT

    public static final byte IMAGE_SYM_CLASS_END_OF_STRUCT
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_FILE

    public static final byte IMAGE_SYM_CLASS_FILE
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_SECTION

    public static final byte IMAGE_SYM_CLASS_SECTION
    See Also:
      - Constant Field Values

  - ### IMAGE_SYM_CLASS_WEAK_EXTERNAL

    public static final byte IMAGE_SYM_CLASS_WEAK_EXTERNAL
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DebugCOFFSymbol

    public DebugCOFFSymbol(BinaryReader reader, int index, DebugCOFFSymbolTable symbolTable) throws IOException
    Throws:
      `IOException`

  - ### DebugCOFFSymbol

    public DebugCOFFSymbol(BinaryReader reader, int index, long stringTableIndex) throws IOException
    Throws:
      `IOException`

- ## 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:
      - `StructureDataType`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`