Class DebugCOFFSymbol
- java.lang.Object
-
- ghidra.app.util.bin.format.pe.debug.DebugCOFFSymbol
-
- All Implemented Interfaces:
StructConverter
public class DebugCOFFSymbol extends java.lang.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
-
Constructor Summary
Constructors Constructor Description DebugCOFFSymbol()
DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DebugCOFFSymbol
createDebugCOFFSymbol(FactoryBundledWithBinaryReader reader, int index, long stringTableIndex)
static DebugCOFFSymbol
createDebugCOFFSymbol(FactoryBundledWithBinaryReader reader, int index, DebugCOFFSymbolTable symbolTable)
DebugCOFFSymbolAux[]
getAuxiliarySymbols()
Returns the auxiliary symbols related to this symbol.java.lang.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.java.lang.String
getSectionNumberAsString()
Returns a string equivalent of the section number of this symbol.int
getStorageClass()
Returns the storage class of this symbol.java.lang.String
getStorageClassAsString()
Returns a string equivalent of the storage class of this symbol.int
getType()
Returns the type of this symbol.java.lang.String
getTypeAsString()
Returns a string equivalent of the type of this symbol.int
getValue()
Returns the value of this symbol.java.lang.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.
-
-
-
Field Detail
-
IMAGE_SIZEOF_SYMBOL
public static final int IMAGE_SIZEOF_SYMBOL
The size of theIMAGE_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
-
-
Method Detail
-
createDebugCOFFSymbol
public static DebugCOFFSymbol createDebugCOFFSymbol(FactoryBundledWithBinaryReader reader, int index, DebugCOFFSymbolTable symbolTable) throws java.io.IOException
- Throws:
java.io.IOException
-
createDebugCOFFSymbol
public static DebugCOFFSymbol createDebugCOFFSymbol(FactoryBundledWithBinaryReader reader, int index, long stringTableIndex) throws java.io.IOException
- Throws:
java.io.IOException
-
getAuxiliarySymbols
public DebugCOFFSymbolAux[] getAuxiliarySymbols()
Returns the auxiliary symbols related to this symbol.- Returns:
- the auxiliary symbols related to this symbol
-
getName
public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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, java.io.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 interfaceStructConverter
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already existsjava.io.IOException
- See Also:
StructureDataType
-
-