MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / get_basic_block_at

Method get_basic_block_at

python/function.py:2557–2574  ·  view source on GitHub ↗

``get_basic_block_at`` returns the BasicBlock of the optionally specified Architecture ``arch`` at the given address ``addr``. :param int addr: Address of the BasicBlock to retrieve. :param Architecture arch: (optional) Architecture of the basic block if different from the Function's self.

(self, addr: int,
	                       arch: Optional['architecture.Architecture'] = None)

Source from the content-addressed store, hash-verified

2555 self._advanced_analysis_requests -= 1
2556
2557 def get_basic_block_at(self, addr: int,
2558 arch: Optional['architecture.Architecture'] = None) -> Optional['basicblock.BasicBlock']:
2559 """
2560 ``get_basic_block_at`` returns the BasicBlock of the optionally specified Architecture ``arch`` at the given
2561 address ``addr``.
2562
2563 :param int addr: Address of the BasicBlock to retrieve.
2564 :param Architecture arch: (optional) Architecture of the basic block if different from the Function's self.arch
2565 :Example:
2566 >>> current_function.get_basic_block_at(current_function.start)
2567 <block: x86_64@0x100000f30-0x100000f50>
2568 """
2569 if arch is None:
2570 arch = self.arch
2571 block = core.BNGetFunctionBasicBlockAtAddress(self.handle, arch.handle, addr)
2572 if not block:
2573 return None
2574 return basicblock.BasicBlock(block, self._view)
2575
2576 def get_instr_highlight(
2577 self, addr: int, arch: Optional['architecture.Architecture'] = None

Callers 1

populate_nodesMethod · 0.45

Calls 1

BasicBlockMethod · 0.80

Tested by

no test coverage detected