summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py
index dfb83e34..97f832d1 100644
--- a/python/function.py
+++ b/python/function.py
@@ -278,10 +278,16 @@ class ValueRange(object):
class PossibleValueSet(object):
- def __init__(self, arch, value):
+ def __init__(self, arch = None, value = None):
+ if value is None:
+ self._type = RegisterValueType.UndeterminedValue
+ return
self._type = RegisterValueType(value.state)
if value.state == RegisterValueType.EntryValue:
- self._reg = arch.get_reg_name(value.value)
+ if arch is None:
+ self._reg = value.value
+ else:
+ self._reg = arch.get_reg_name(value.value)
elif value.state == RegisterValueType.ConstantValue:
self._value = value.value
elif value.state == RegisterValueType.ConstantPointerValue: