Class DWARFExpression
java.lang.Object
ghidra.app.util.bin.format.dwarf.expression.DWARFExpression
A
DWARFExpression
is an immutable list of operations
and some factory methods to read
an expression from its binary representation.
Use a DWARFExpressionEvaluator
to execute a DWARFExpression
.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
exprToString
(byte[] exprBytes, DIEAggregate diea) int
findOpByOffset
(long offset) Finds the index of anoperation
by its offset from the beginning of the expression.int
Returns the index of the last operation that is not a NOP.ghidra.app.util.bin.format.dwarf.expression.DWARFExpressionOperation
getOp
(int i) int
static DWARFExpression
read
(byte[] exprBytes, byte addrSize, boolean isLittleEndian, int intSize) static DWARFExpression
read
(BinaryReader reader, byte addrSize, int intSize) toString()
toString
(int caretPosition, boolean newlines, boolean offsets)
-
Field Details
-
MAX_SANE_EXPR
public static final int MAX_SANE_EXPR- See Also:
-
-
Method Details
-
exprToString
-
read
public static DWARFExpression read(byte[] exprBytes, byte addrSize, boolean isLittleEndian, int intSize) throws DWARFExpressionException - Throws:
DWARFExpressionException
-
read
public static DWARFExpression read(BinaryReader reader, byte addrSize, int intSize) throws DWARFExpressionException - Throws:
DWARFExpressionException
-
getOp
public ghidra.app.util.bin.format.dwarf.expression.DWARFExpressionOperation getOp(int i) -
getOpCount
public int getOpCount() -
getLastActiveOpIndex
public int getLastActiveOpIndex()Returns the index of the last operation that is not a NOP.- Returns:
-
findOpByOffset
public int findOpByOffset(long offset) Finds the index of anoperation
by its offset from the beginning of the expression.- Parameters:
offset
-- Returns:
- -1 if there is no op at the specified offset
-
toString
-
toString
-