Package ghidra.program.model.pcode
Class EquateSymbol
java.lang.Object
ghidra.program.model.pcode.HighSymbol
ghidra.program.model.pcode.EquateSymbol
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class ghidra.program.model.pcode.HighSymbol
category, categoryIndex, dtmanage, entryList, function, ID_BASE, name, type
-
Constructor Summary
ConstructorDescriptionEquateSymbol
(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash) EquateSymbol
(long uniqueId, String nm, long val, HighFunction func, Address addr, long hash) EquateSymbol
(HighFunction func) -
Method Summary
Modifier and TypeMethodDescriptionstatic int
convertName
(String nm, long val) Determine what format a given equate name is in.void
Decode this symbol object and its associated mappings from the stream.void
Encode the symbol description as an element to the stream.int
long
getValue()
Methods inherited from class ghidra.program.model.pcode.HighSymbol
addMapEntry, decodeHeader, decodeMapSym, encodeHeader, encodeMapSym, getCategoryIndex, getDataType, getFirstUseOffset, getFirstWholeMap, getHighFunction, getHighVariable, getId, getMutability, getName, getNamespace, getPCAddress, getProgram, getSize, getStorage, getSymbol, isGlobal, isHiddenReturn, isIsolated, isNameLocked, isParameter, isThisPointer, isTypeLocked, setCategory, setNameLock, setTypeLock
-
Field Details
-
FORMAT_DEFAULT
public static final int FORMAT_DEFAULT- See Also:
-
FORMAT_HEX
public static final int FORMAT_HEX- See Also:
-
FORMAT_DEC
public static final int FORMAT_DEC- See Also:
-
FORMAT_OCT
public static final int FORMAT_OCT- See Also:
-
FORMAT_BIN
public static final int FORMAT_BIN- See Also:
-
FORMAT_CHAR
public static final int FORMAT_CHAR- See Also:
-
FORMAT_FLOAT
public static final int FORMAT_FLOAT- See Also:
-
FORMAT_DOUBLE
public static final int FORMAT_DOUBLE- See Also:
-
-
Constructor Details
-
EquateSymbol
-
EquateSymbol
-
EquateSymbol
-
-
Method Details
-
getValue
public long getValue() -
getConvert
public int getConvert() -
decode
Description copied from class:HighSymbol
Decode this symbol object and its associated mappings from the stream.- Overrides:
decode
in classHighSymbol
- Parameters:
decoder
- is the stream decoder- Throws:
DecoderException
- for invalid encodings
-
encode
Description copied from class:HighSymbol
Encode the symbol description as an element to the stream. This does NOT save the mappings.- Overrides:
encode
in classHighSymbol
- Parameters:
encoder
- is the stream encoder- Throws:
IOException
- for errors in the underlying stream
-
convertName
Determine what format a given equate name is in. Integer format conversions are stored using an Equate object, where the name of the equate is the actual conversion String. So the only way to tell what kind of conversion is being performed is by examining the name of the equate. The format code of the conversion is returned, or if the name is not a conversion, FORMAT_DEFAULT is returned indicating a normal String equate.- Parameters:
nm
- is the name of the equateval
- is the value being equated- Returns:
- the format code for the conversion or FORMAT_DEFAULT if not a conversion
-