diff options
| author | kat <katherine@vector35.com> | 2022-09-22 09:25:01 -0400 |
|---|---|---|
| committer | kat <katherine@vector35.com> | 2022-09-22 09:25:01 -0400 |
| commit | e95b220ef18c9dd9e1aecab32b735ff47237f9c7 (patch) | |
| tree | e302ace94bc5c8707edbc037c1fea55cfabc73cd /python/function.py | |
| parent | 07be3689f173e7a55af5e795c10377e0afdd594f (diff) | |
Add the Components API
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index 93ed8b49..d093c076 100644 --- a/python/function.py +++ b/python/function.py @@ -61,6 +61,7 @@ from .variable import ( ) from . import decorators from .enums import RegisterValueType +from . import component ExpressionIndex = int InstructionIndex = int @@ -2196,6 +2197,15 @@ class Function: core.BNFreeTagList(tags, count.value) return result + @property + def parent_components(self): + _components = [] + count = ctypes.c_ulonglong(0) + bn_components = core.BNGetFunctionParentComponents(self.handle, count) + for i in range(count.value): + _components.append(component.Component(self.view, bn_components[i])) + return _components + def get_lifted_il_at( self, addr: int, arch: Optional['architecture.Architecture'] = None ) -> Optional['lowlevelil.LowLevelILInstruction']: |
