diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-05-16 17:35:49 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-05-16 17:35:49 -0400 |
| commit | 55ca41ccd9b2cd91f4d806a0fc75797b6c8c5735 (patch) | |
| tree | 02504b5628c66830935f02a9fafd7d57f2395c17 /python/function.py | |
| parent | d6c63268eb98fb0801d1c825e1aa4f72c1e1d99c (diff) | |
Adding pointer information to constant reference list
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py index 509d9b3b..f32f6ad6 100644 --- a/python/function.py +++ b/python/function.py @@ -205,11 +205,15 @@ class Variable(object): class ConstantReference(object): - def __init__(self, val, size): + def __init__(self, val, size, ptr, intermediate): self.value = val self.size = size + self.pointer = ptr + self.intermediate = intermediate def __repr__(self): + if self.pointer: + return "<constant pointer %#x>" % self.value if self.size == 0: return "<constant %#x>" % self.value return "<constant %#x size %d>" % (self.value, self.size) @@ -626,7 +630,7 @@ class Function(object): refs = core.BNGetConstantsReferencedByInstruction(self.handle, arch.handle, addr, count) result = [] for i in xrange(0, count.value): - result.append(ConstantReference(refs[i].value, refs[i].size)) + result.append(ConstantReference(refs[i].value, refs[i].size, refs[i].pointer, refs[i].intermediate)) core.BNFreeConstantReferenceList(refs) return result |
