summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2022-01-24 15:31:00 -0500
committerPeter LaFosse <peter@vector35.com>2022-01-24 15:31:00 -0500
commitf8949225ef1af7051e35f6f0a79581876f03f6c2 (patch)
tree7b5dd9cb7c65e78af9d2d129e175e23f127bef11 /python/types.py
parentcdc4e4c9b01763649f69f861f17042960438e8d6 (diff)
Add system_call_number property for Type object
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py
index f0d4fa94..cb215070 100644
--- a/python/types.py
+++ b/python/types.py
@@ -748,6 +748,7 @@ class TypeBuilder:
@property
def system_call_number(self) -> Optional[_int]:
+ """Gets/Sets the system call number for a FunctionType object if one exists otherwise None"""
if not core.BNTypeBuilderIsSystemCall(self._handle):
return None
return core.BNTypeBuilderGetSystemCallNumber(self._handle)
@@ -1842,6 +1843,13 @@ class Type:
result = core.BNIsTypeVolatile(self._handle)
return BoolWithConfidence(result.value, confidence = result.confidence)
+ @property
+ def system_call_number(self) -> Optional[_int]:
+ """Returns the system call number for a FunctionType object if one exists otherwise None"""
+ if not core.BNTypeIsSystemCall(self._handle):
+ return None
+ return core.BNTypeGetSystemCallNumber(self._handle)
+
@dataclass(frozen=True)
class RegisterStackAdjustmentWithConfidence: