Class SymbolInformation
java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.SymbolInformation
- All Implemented Interfaces:
ISymbolInformation
Standard implementation of
ISymbolInformation.-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.codeobject.ISymbolInformation
FLAG_ABSOLUTE, FLAG_EXPORTED, FLAG_FUNCTION_CODE_CONTIGUOUS, FLAG_IMPORTED, FLAG_METADATA -
Constructor Summary
ConstructorsConstructorDescriptionSymbolInformation(SymbolType type, int flags, long identifier, String name, long address, long symbolAddress, long symbolSize) Create symbol information. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetFlags()Get the symbol flags.longGet the symbol identifier.getName()Get the symbol name.intRetrieve the optional processor mode associated to this symbol, if the address points to code.longGet the base-relative address of the description of the symbol.Retrieve optional symbol data type information.longGet the base-relative address of the symbol.longGet the size of the symbol.getType()Get the symbol type.inthashCode()booleanChecks if the symbol is neither exported nor imported.voidsetFlags(int flags) Set symbol flags.voidsetIdentifier(long identifier) Set the symbol identifier.voidSet the symbol name.voidsetProcessorMode(int procMode) Set the processor mode.voidsetRelativeAddress(long address) Set the descriptor relative address.voidsetSymbolDataTypeInformation(String information) Set data type information.voidsetSymbolRelativeAddress(long address) Set the symbol relative address.voidsetSymbolSize(long size) Set the symbol size.voidsetType(SymbolType type) Set the symbol type.toString()
-
Constructor Details
-
SymbolInformation
public SymbolInformation(SymbolType type, int flags, long identifier, String name, long address, long symbolAddress, long symbolSize) Create symbol information.- Parameters:
type- symbol typeflags- symbol flagsidentifier- symbol identifiername- symbol nameaddress- descriptor relative addresssymbolAddress- symbol relative addresssymbolSize- symbol size
-
-
Method Details
-
getType
Description copied from interface:ISymbolInformationGet the symbol type.- Specified by:
getTypein interfaceISymbolInformation- Returns:
- the type
-
setType
Set the symbol type.- Parameters:
type- symbol type
-
getFlags
public int getFlags()Description copied from interface:ISymbolInformationGet the symbol flags. A valid combination ofFLAG_xxx.- Specified by:
getFlagsin interfaceISymbolInformation- Returns:
- the flags
-
setFlags
public void setFlags(int flags) Set symbol flags.- Parameters:
flags- symbol flags
-
getIdentifier
public long getIdentifier()Description copied from interface:ISymbolInformationGet the symbol identifier. Optional.- Specified by:
getIdentifierin interfaceISymbolInformation- Returns:
- the symbol identifier
-
setIdentifier
public void setIdentifier(long identifier) Set the symbol identifier.- Parameters:
identifier- symbol identifier
-
getName
Description copied from interface:ISymbolInformationGet the symbol name.Special syntax for imported functions: the function name may be prefixed by the library name that contains it. A bang character is used as a separator. Example:
kernel32.dll!Sleep
Note: the method name may be mangled; it may be fully qualified. The library name is optional; its extension is optional (eg, .dll, .so); it may be a full path.- Specified by:
getNamein interfaceISymbolInformation- Returns:
- the symbol name
-
setName
Set the symbol name.- Parameters:
name- symbol name
-
getRelativeAddress
public long getRelativeAddress()Description copied from interface:ISymbolInformationGet the base-relative address of the description of the symbol. Informative and optional.- Specified by:
getRelativeAddressin interfaceISymbolInformation- Returns:
- the base-relative address of the symbol description
-
setRelativeAddress
public void setRelativeAddress(long address) Set the descriptor relative address.- Parameters:
address- descriptor relative address
-
getSymbolRelativeAddress
public long getSymbolRelativeAddress()Description copied from interface:ISymbolInformationGet the base-relative address of the symbol.- Specified by:
getSymbolRelativeAddressin interfaceISymbolInformation- Returns:
- the symbol RVA
-
setSymbolRelativeAddress
public void setSymbolRelativeAddress(long address) Set the symbol relative address.- Parameters:
address- symbol relative address
-
getSymbolSize
public long getSymbolSize()Description copied from interface:ISymbolInformationGet the size of the symbol. May not be known.- Specified by:
getSymbolSizein interfaceISymbolInformation- Returns:
- the symbol size
-
setSymbolSize
public void setSymbolSize(long size) Set the symbol size.- Parameters:
size- symbol size
-
getSymbolDataTypeInformation
Description copied from interface:ISymbolInformationRetrieve optional symbol data type information.- Specified by:
getSymbolDataTypeInformationin interfaceISymbolInformation- Returns:
- data type information, or null if none
-
setSymbolDataTypeInformation
Set data type information.- Parameters:
information- data type information
-
getProcessorMode
public int getProcessorMode()Description copied from interface:ISymbolInformationRetrieve the optional processor mode associated to this symbol, if the address points to code. This value is optional, implementations may return 0.- Specified by:
getProcessorModein interfaceISymbolInformation- Returns:
- the optional processor mode (refer to
IProcessorfor standard values)
-
setProcessorMode
public void setProcessorMode(int procMode) Set the processor mode.- Parameters:
procMode- processor mode
-
isInternal
public boolean isInternal()Checks if the symbol is neither exported nor imported.- Returns:
- true if this symbol is internal
-
toString
-
hashCode
public int hashCode() -
equals
-