Class GoPcValueEvaluator
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoPcValueEvaluator
Evaluates a sequence of (value_delta,pc_delta) leb128 pairs to calculate a value for a certain
PC location.
-
Constructor Summary
ConstructorDescriptionGoPcValueEvaluator
(GoFuncData func, long offset) Creates aGoPcValueEvaluator
instance, tied to the specified GoFuncData, starting at the specified offset in the moduledata's pctab. -
Method Summary
Modifier and TypeMethodDescriptionint
eval
(long targetPC) Returns the value encoded into the table at the specified pc.evalAll
(long targetPC) Returns the set of all values for each unique pc section.long
getMaxPC()
Returns the largest PC value calculated when evaluating the result of the table's sequence.
-
Constructor Details
-
GoPcValueEvaluator
Creates aGoPcValueEvaluator
instance, tied to the specified GoFuncData, starting at the specified offset in the moduledata's pctab.- Parameters:
func
-GoFuncData
offset
- offset in moduledata's pctab- Throws:
IOException
- if error reading pctab
-
-
Method Details
-
getMaxPC
Returns the largest PC value calculated when evaluating the result of the table's sequence.- Returns:
- largest PC value encountered
- Throws:
IOException
- if error evaluating result
-
eval
Returns the value encoded into the table at the specified pc.- Parameters:
targetPC
- pc- Returns:
- value at specified pc, or -1 if error evaluating table
- Throws:
IOException
- if error reading data
-
evalAll
Returns the set of all values for each unique pc section.- Parameters:
targetPC
- max pc to advance the sequence to when evaluating the table- Returns:
- list of integer values
- Throws:
IOException
- if error reading data
-