diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-05-15 23:58:48 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-05-15 23:58:48 -0400 |
| commit | d6c63268eb98fb0801d1c825e1aa4f72c1e1d99c (patch) | |
| tree | 2f7cbdbf36ec06731fb3db40accb973eb6c12aaf /python/lowlevelil.py | |
| parent | 2111f1f77241c938b30bd3cf2851919094429dd6 (diff) | |
Adding a constant expression with pointer hint for improved types
Diffstat (limited to 'python/lowlevelil.py')
| -rw-r--r-- | python/lowlevelil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py index cb4c9b69..5b133abd 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -122,6 +122,7 @@ class LowLevelILInstruction(object): LowLevelILOperation.LLIL_POP: [], LowLevelILOperation.LLIL_REG: [("src", "reg")], LowLevelILOperation.LLIL_CONST: [("constant", "int")], + LowLevelILOperation.LLIL_CONST_PTR: [("constant", "int")], LowLevelILOperation.LLIL_FLAG: [("src", "flag")], LowLevelILOperation.LLIL_FLAG_BIT: [("src", "flag"), ("bit", "int")], LowLevelILOperation.LLIL_ADD: [("left", "expr"), ("right", "expr")], @@ -773,6 +774,17 @@ class LowLevelILFunction(object): """ return self.expr(LowLevelILOperation.LLIL_CONST, value, size=size) + def const_pointer(self, size, value): + """ + ``const_pointer`` returns an expression for the constant pointer ``value`` with size ``size`` + + :param int size: the size of the pointer in bytes + :param int value: address referenced by pointer + :return: A constant expression of given value and size + :rtype: LowLevelILExpr + """ + return self.expr(LowLevelILOperation.LLIL_CONST_PTR, value, size=size) + def flag(self, reg): """ ``flag`` returns a flag expression for the given flag name. |
