diff options
| author | Peter LaFosse <peter@vector35.com> | 2022-01-24 15:31:00 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2022-01-24 15:31:00 -0500 |
| commit | f8949225ef1af7051e35f6f0a79581876f03f6c2 (patch) | |
| tree | 7b5dd9cb7c65e78af9d2d129e175e23f127bef11 /python/types.py | |
| parent | cdc4e4c9b01763649f69f861f17042960438e8d6 (diff) | |
Add system_call_number property for Type object
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 8 |
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: |
