From c24b1bd108ee2885d7164cecd15f75aa1715a8df Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Mon, 27 Nov 2017 17:15:03 -0500 Subject: Register stack adjustments in calling conventions --- python/types.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index 2557db2c..d44cc736 100644 --- a/python/types.py +++ b/python/types.py @@ -680,6 +680,21 @@ class SizeWithConfidence(object): return self.value +class RegisterStackAdjustmentWithConfidence(object): + def __init__(self, value, confidence = max_confidence): + self.value = value + self.confidence = confidence + + def __str__(self): + return str(self.value) + + def __repr__(self): + return repr(self.value) + + def __int__(self): + return self.value + + class RegisterSet(object): def __init__(self, reg_list, confidence = max_confidence): self.regs = reg_list -- cgit v1.3.1 From 5c6b13a5576ccbf9c64ba51079d1a3625661cb50 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 15 Jan 2018 18:29:11 -0500 Subject: Fix 'demangled' typo. --- python/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index 49f1fdeb..27b4828f 100644 --- a/python/types.py +++ b/python/types.py @@ -634,7 +634,7 @@ class Type(object): return core.BNGenerateAutoDemangledTypeId(name) @classmethod - def get_auto_demanged_type_id_source(self): + def get_auto_demangled_type_id_source(self): return core.BNGetAutoDemangledTypeIdSource() def with_confidence(self, confidence): -- cgit v1.3.1 From a5328d944c9ba71e67ad2607d0a7f943f91645c2 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Thu, 25 Jan 2018 10:30:43 -0500 Subject: fixes #912 --- python/types.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index 27b4828f..feb256d0 100644 --- a/python/types.py +++ b/python/types.py @@ -471,6 +471,7 @@ class Type(object): :param int width: width of the integer in bytes :param bool sign: optional variable representing signedness + :param string altname: alternate name for type """ if sign is None: sign = BoolWithConfidence(True, confidence = 0) @@ -484,8 +485,14 @@ class Type(object): return Type(core.BNCreateIntegerType(width, sign_conf, altname)) @classmethod - def float(self, width): - return Type(core.BNCreateFloatType(width)) + def float(self, width, altname=""): + """ + ``float`` class method for creating an floating point Types. + + :param int width: width of the floating point number in bytes + :param string altname: alternate name for type + """ + return Type(core.BNCreateFloatType(width, altname)) @classmethod def structure_type(self, structure_type): -- cgit v1.3.1