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
ConstructorsConstructorDescriptionGoPcValueEvaluator(GoFuncData func, long offset) Creates aGoPcValueEvaluatorinstance, tied to the specified GoFuncData, starting at the specified offset in the moduledata's pctab. -
Method Summary
Modifier and TypeMethodDescriptioninteval(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.intevalNext()longgetMaxPC()Returns the largest PC value calculated when evaluating the result of the table's sequence.longgetPC()voidreset()
-
Constructor Details
-
GoPcValueEvaluator
Creates aGoPcValueEvaluatorinstance, tied to the specified GoFuncData, starting at the specified offset in the moduledata's pctab.- Parameters:
func-GoFuncDataoffset- offset in moduledata's pctab- Throws:
IOException- if error reading pctab
-
-
Method Details
-
getPC
public long getPC() -
reset
public void reset() -
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
-
evalNext
- Throws:
IOException
-
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
-