Package ghidra.program.model.pcode
Class HighCodeSymbol
java.lang.Object
ghidra.program.model.pcode.HighSymbol
ghidra.program.model.pcode.HighCodeSymbol
A global symbol as part of the decompiler's model of a function. This symbol can
be backed by a formal CodeSymbol, obtained using getCodeSymbol(). This symbol can be backed
by a formal Data object, obtained using getData(). If there is a backing CodeSymbol, this takes its name,
otherwise the name is dynamically generated using SymbolUtilities. The data-type attached to this does
not necessarily match the backing CodeSymbol or Data object.
-
Field Summary
Fields inherited from class ghidra.program.model.pcode.HighSymbol
category, categoryIndex, dtmanage, entryList, function, ID_BASE, name, type
-
Constructor Summary
ConstructorDescriptionHighCodeSymbol
(long id, Address addr, DataType dataType, int sz, HighFunction func) Construct with just a (global) storage address and size.HighCodeSymbol
(long id, String nm, Data data, PcodeDataTypeManager dtmanage) Constructor for HighSymbol which is unattached to a HighFunctionHighCodeSymbol
(CodeSymbol sym, DataType dataType, int sz, HighFunction func) Construct with a backing CodeSymbol. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Decode this symbol object and its associated mappings from the stream.Get the CodeSymbol backing this, if it existsgetData()
Get the Data object backing this, if it existsboolean
isGlobal()
Is this symbol in the global scope or some other global namespaceMethods inherited from class ghidra.program.model.pcode.HighSymbol
addMapEntry, decodeHeader, decodeMapSym, encode, encodeHeader, encodeMapSym, getCategoryIndex, getDataType, getFirstUseOffset, getFirstWholeMap, getHighFunction, getHighVariable, getId, getMutability, getName, getNamespace, getPCAddress, getProgram, getSize, getStorage, getSymbol, isHiddenReturn, isIsolated, isNameLocked, isParameter, isThisPointer, isTypeLocked, setCategory, setNameLock, setTypeLock
-
Constructor Details
-
HighCodeSymbol
Construct with a backing CodeSymbol. An attempt is made to also find a backing Data object.- Parameters:
sym
- is the backing CodeSymboldataType
- is the (possibly distinct) data-type associated with the new HighSymbolsz
- is the storage size, in bytes, of the symbolfunc
- is the decompiler function model owning the new HighSymbol
-
HighCodeSymbol
Construct with just a (global) storage address and size. There will be no backing CodeSymbol. An attempt is made to find a backing Data object.- Parameters:
id
- is the id to associate with the new HighSymboladdr
- is the starting Address of the symbol storagedataType
- is the data-type associated with the new symbolsz
- is the size of the symbol storage in bytesfunc
- is the decompiler function model owning the new symbol
-
HighCodeSymbol
Constructor for HighSymbol which is unattached to a HighFunction- Parameters:
id
- is the unique id to assignnm
- is the name of the symboldata
- is an underlying Data object defining the storage and data-typedtmanage
- is the data-type manager for XML reference
-
-
Method Details
-
isGlobal
public boolean isGlobal()Description copied from class:HighSymbol
Is this symbol in the global scope or some other global namespace- Overrides:
isGlobal
in classHighSymbol
- Returns:
- true if this is global
-
getCodeSymbol
Get the CodeSymbol backing this, if it exists- Returns:
- the CodeSymbol or null
-
getData
Get the Data object backing this, if it exists- Returns:
- the Data object or null
-
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
-