summaryrefslogtreecommitdiff
path: root/python/basicblock.py
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2026-05-03 02:30:34 -0400
committerGlenn Smith <glenn@vector35.com>2026-05-20 17:10:35 -0400
commit23f619a047ff754eafb84a6ec5f666bbe9e47711 (patch)
tree9d128bc11c50c2a2bb9fbaa5ce291062afa9b979 /python/basicblock.py
parent06611c17ae5ee5936889ff029cac042fdba8a0c5 (diff)
Sort switch blocks in graph view by case number
Diffstat (limited to 'python/basicblock.py')
-rw-r--r--python/basicblock.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index fc8b89e1..69f9f996 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -705,6 +705,14 @@ class BasicBlock:
return self.function.get_block_annotations(self.start, self.arch)
@property
+ def sort_hint(self) -> Optional[int]:
+ """Graph edge sorting hint for this block (read-only)"""
+ if self.function is None:
+ raise ValueError("Attempting to call BasicBlock.sort_hint when Function is None")
+
+ return self.function.get_block_sort_hint(self.start, self.arch)
+
+ @property
def disassembly_text(self) -> List['_function.DisassemblyTextLine']:
"""
``disassembly_text`` property which returns a list of function.DisassemblyTextLine objects for the current basic block.