summaryrefslogtreecommitdiff
path: root/python/callingconvention.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-07-26 01:11:54 -0400
committerRusty Wagner <rusty@vector35.com>2017-07-26 01:11:54 -0400
commitd9c2c3d7c81863f37ccb3885f7c57376f40a2e5d (patch)
treef91ab2d030d5fa9e1e5ada36409a3645081f7f92 /python/callingconvention.py
parentecfc609d7941694033971ae6b3f96830e7debd70 (diff)
parent24b090492a216278fbc0e43e8f01cec13fa59696 (diff)
Merge type propagation into dev
Diffstat (limited to 'python/callingconvention.py')
-rw-r--r--python/callingconvention.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/callingconvention.py b/python/callingconvention.py
index e9825642..21c8c95a 100644
--- a/python/callingconvention.py
+++ b/python/callingconvention.py
@@ -25,6 +25,7 @@ import ctypes
import _binaryninjacore as core
import architecture
import log
+import types
class CallingConvention(object):
@@ -40,7 +41,7 @@ class CallingConvention(object):
_registered_calling_conventions = []
- def __init__(self, arch=None, name=None, handle=None):
+ def __init__(self, arch=None, name=None, handle=None, confidence=types.max_confidence):
if handle is None:
if arch is None or name is None:
raise ValueError("Must specify either handle or architecture and name")
@@ -111,6 +112,8 @@ class CallingConvention(object):
else:
self.__dict__["float_return_reg"] = self.arch.get_reg_name(reg)
+ self.confidence = confidence
+
def __del__(self):
core.BNFreeCallingConvention(self.handle)
@@ -222,3 +225,7 @@ class CallingConvention(object):
def __str__(self):
return self.name
+
+ def with_confidence(self, confidence):
+ return CallingConvention(self.arch, handle = core.BNNewCallingConventionReference(self.handle),
+ confidence = confidence)