From f8949225ef1af7051e35f6f0a79581876f03f6c2 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 24 Jan 2022 15:31:00 -0500 Subject: Add system_call_number property for Type object --- python/types.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python') 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: -- cgit v1.3.1