From cbe3ded641a0ce4b50ae447a4426b71f3e0f0119 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 18 Sep 2020 18:35:27 +0800 Subject: edit current line in linear view add CanAssemble() to architectures --- python/binaryview.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 7c0ac0c2..7e893ab2 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -3853,6 +3853,22 @@ class BinaryView(object): """ core.BNRemoveAutoDataTag(self.handle, addr, tag.handle) + def can_assemble(self, arch=None): + """ + ``can_assemble`` queries the architecture plugin to determine if the architecture can assemble instructions. + + :return: True if the architecture can assemble, False otherwise + :rtype: bool + :Example: + + >>> bv.can_assemble() + True + >>> + """ + if arch is None: + arch = self.arch + return core.BNCanAssemble(self.handle, arch.handle) + def is_never_branch_patch_available(self, addr, arch=None): """ ``is_never_branch_patch_available`` queries the architecture plugin to determine if the instruction at the -- cgit v1.3.1