summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-05-15 23:58:48 -0400
committerRusty Wagner <rusty@vector35.com>2017-05-15 23:58:48 -0400
commitd6c63268eb98fb0801d1c825e1aa4f72c1e1d99c (patch)
tree2f7cbdbf36ec06731fb3db40accb973eb6c12aaf /python/lowlevelil.py
parent2111f1f77241c938b30bd3cf2851919094429dd6 (diff)
Adding a constant expression with pointer hint for improved types
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py12
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.