summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2025-07-08 12:13:19 -0400
committerBrian Potchik <brian@vector35.com>2025-07-08 12:13:19 -0400
commit5b575ff6a87061221e1c17824b2b42af839ccc74 (patch)
tree5f37836f732f1af49a048c9a957250e2bc57984b /python/function.py
parent33e9108b92a73782e271852c6b438c2937706fbe (diff)
Various improvements for guided disassembly mode.
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py
index 37bd3396..9ea8093b 100644
--- a/python/function.py
+++ b/python/function.py
@@ -2326,6 +2326,22 @@ class Function:
address_list[i].address = addresses[i][1]
core.BNRemoveGuidedSourceBlocks(self.handle, address_list, len(addresses))
+ def is_guided_source_block(
+ self, arch: 'architecture.Architecture', addr: int
+ ) -> bool:
+ """
+ ``is_guided_source_block`` checks if the given address is a guided source block.
+
+ :param architecture.Architecture arch: Architecture of the address to check
+ :param int addr: Address to check
+ :rtype: bool
+ :Example:
+
+ >>> current_function.is_guided_source_block(arch, 0x400000)
+ True
+ """
+ return core.BNIsGuidedSourceBlock(self.handle, arch.handle, addr)
+
def get_guided_source_blocks(
self
) -> List[Tuple['architecture.Architecture', int]]: