Package ghidra.program.model.pcode
Class EquateSymbol
- java.lang.Object
-
- ghidra.program.model.pcode.HighSymbol
-
- ghidra.program.model.pcode.EquateSymbol
-
public class EquateSymbol extends HighSymbol
-
-
Field Summary
Fields Modifier and Type Field Description static int
FORMAT_BIN
static int
FORMAT_CHAR
static int
FORMAT_DEC
static int
FORMAT_DEFAULT
static int
FORMAT_HEX
static int
FORMAT_OCT
-
Fields inherited from class ghidra.program.model.pcode.HighSymbol
category, categoryIndex, entryList, function, ID_BASE, name, type
-
-
Constructor Summary
Constructors Constructor Description EquateSymbol(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash)
EquateSymbol(long uniqueId, java.lang.String nm, long val, HighFunction func, Address addr, long hash)
EquateSymbol(HighFunction func)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
convertName(java.lang.String nm, long val)
Determine what format a given equate name is in.int
getConvert()
long
getValue()
void
restoreXML(XmlPullParser parser)
Restore this symbol object and its associated mappings from an XML description in the given stream.void
saveXML(java.lang.StringBuilder buf)
Save the symbol description as a tag to the XML stream.-
Methods inherited from class ghidra.program.model.pcode.HighSymbol
addMapEntry, buildMapSymXML, getCategoryIndex, getDataType, getFirstUseOffset, getFirstWholeMap, getHighFunction, getHighVariable, getId, getName, getNamespace, getPCAddress, getProgram, getSize, getStorage, getSymbol, isGlobal, isHiddenReturn, isIsolated, isNameLocked, isParameter, isReadOnly, isThisPointer, isTypeLocked, restoreMapSymXML, restoreXMLHeader, saveXMLHeader, setCategory, setHighVariable, setNameLock, setTypeLock
-
-
-
-
Field Detail
-
FORMAT_DEFAULT
public static final int FORMAT_DEFAULT
- See Also:
- Constant Field Values
-
FORMAT_HEX
public static final int FORMAT_HEX
- See Also:
- Constant Field Values
-
FORMAT_DEC
public static final int FORMAT_DEC
- See Also:
- Constant Field Values
-
FORMAT_OCT
public static final int FORMAT_OCT
- See Also:
- Constant Field Values
-
FORMAT_BIN
public static final int FORMAT_BIN
- See Also:
- Constant Field Values
-
FORMAT_CHAR
public static final int FORMAT_CHAR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EquateSymbol
public EquateSymbol(HighFunction func)
-
EquateSymbol
public EquateSymbol(long uniqueId, java.lang.String nm, long val, HighFunction func, Address addr, long hash)
-
EquateSymbol
public EquateSymbol(long uniqueId, int conv, long val, HighFunction func, Address addr, long hash)
-
-
Method Detail
-
getValue
public long getValue()
-
getConvert
public int getConvert()
-
restoreXML
public void restoreXML(XmlPullParser parser) throws PcodeXMLException
Description copied from class:HighSymbol
Restore this symbol object and its associated mappings from an XML description in the given stream.- Overrides:
restoreXML
in classHighSymbol
- Parameters:
parser
- is the given XML stream- Throws:
PcodeXMLException
- if the XML description is invalid
-
saveXML
public void saveXML(java.lang.StringBuilder buf)
Description copied from class:HighSymbol
Save the symbol description as a tag to the XML stream. This does NOT save the mappings.- Overrides:
saveXML
in classHighSymbol
- Parameters:
buf
- is the XML stream
-
convertName
public static int convertName(java.lang.String nm, long val)
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
-
-