Package ghidra.program.model.pcode
Class DynamicEntry
java.lang.Object
ghidra.program.model.pcode.SymbolEntry
ghidra.program.model.pcode.DynamicEntry
A HighSymbol mapping based on local hashing of the symbol's Varnode within a
function's syntax tree. The storage address of a temporary Varnode (a Varnode in
the "unique" address space) is too ephemeral to use as a permanent way to identify it.
This symbol stores a hash (generated by DynamicHash) that is better suited to
identifying the Varnode.
-
Field Summary
Fields inherited from class ghidra.program.model.pcode.SymbolEntry
pcaddr, symbol
-
Constructor Summary
ConstructorDescriptionDynamicEntry
(HighSymbol sym) Constructor for use with restoreXMLDynamicEntry
(HighSymbol sym, Address addr, long h) Construct given the underlying symbol, defining Address of the Varnode, and the hash value -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicEntry
Build a new DynamicEntry, given the underlying temporary Varnode attached to a symbol.void
Decode this entry from the stream.void
Encode this entry as (a set of) elements to the given streamlong
getHash()
int
Return one of - MutabilitySettingsDefinition.NORMAL - MutabilitySettingsDefinition.VOLATILE - MutabilitySettingsDefinition.CONSTANTint
getSize()
Get the number of bytes consumed by the symbol when using this storageGet the storage associated with this particular mapping of the SymbolMethods inherited from class ghidra.program.model.pcode.SymbolEntry
decodeRangeList, encodeRangelist, getPCAdress
-
Constructor Details
-
DynamicEntry
Constructor for use with restoreXML- Parameters:
sym
- is the owning HighSymbol
-
DynamicEntry
Construct given the underlying symbol, defining Address of the Varnode, and the hash value- Parameters:
sym
- is the given symboladdr
- is the defining Addressh
- is the hash value
-
-
Method Details
-
getHash
public long getHash()- Returns:
- the hash value
-
decode
Description copied from class:SymbolEntry
Decode this entry from the stream. Typically more than one element is consumed.- Specified by:
decode
in classSymbolEntry
- Parameters:
decoder
- is the stream decoder- Throws:
DecoderException
- for invalid encodings
-
encode
Description copied from class:SymbolEntry
Encode this entry as (a set of) elements to the given stream- Specified by:
encode
in classSymbolEntry
- Parameters:
encoder
- is the stream encoder- Throws:
IOException
- for errors in the underlying stream
-
getStorage
Description copied from class:SymbolEntry
Get the storage associated with this particular mapping of the Symbol- Specified by:
getStorage
in classSymbolEntry
- Returns:
- the storage object
-
build
Build a new DynamicEntry, given the underlying temporary Varnode attached to a symbol. The hash is created from local information in the syntax tree near the Varnode.- Parameters:
vn
- is the underlying Varnode- Returns:
- the new DynamicEntry
-
getSize
public int getSize()Description copied from class:SymbolEntry
Get the number of bytes consumed by the symbol when using this storage- Specified by:
getSize
in classSymbolEntry
- Returns:
- the size of this entry
-
getMutability
public int getMutability()Description copied from class:SymbolEntry
Return one of - MutabilitySettingsDefinition.NORMAL - MutabilitySettingsDefinition.VOLATILE - MutabilitySettingsDefinition.CONSTANT- Specified by:
getMutability
in classSymbolEntry
- Returns:
- the mutability setting
-