diff options
| author | Xusheng <xusheng@vector35.com> | 2024-10-02 12:55:43 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2024-10-03 13:20:18 +0800 |
| commit | 84172132ffed56cb1ff97b33d729a3daeb637736 (patch) | |
| tree | 947d206c466e8cc1eea6e3e61a7ebf3525d8b1da /python/binaryview.py | |
| parent | e9c53f3c9a8cb2f28ea8047c1b9b12f0ea31968f (diff) | |
Make sure the undefined data variable does not get recreated by auto-analysis. Fix https://github.com/Vector35/binaryninja-api/issues/5817
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 9fa471dd..3321a21a 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4719,18 +4719,20 @@ class BinaryView: return self.get_data_var_at(addr) - def undefine_data_var(self, addr: int) -> None: + def undefine_data_var(self, addr: int, blacklist: bool = True) -> None: """ ``undefine_data_var`` removes the non-user data variable at the virtual address ``addr``. :param int addr: virtual address to define the data variable to be removed + :param bool blacklist: whether to add the address to the data variable black list so that the auto analysis + would not recreat the variable on re-analysis :rtype: None :Example: >>> bv.undefine_data_var(bv.entry_point) >>> """ - core.BNUndefineDataVariable(self.handle, addr) + core.BNUndefineDataVariable(self.handle, addr, blacklist) def undefine_user_data_var(self, addr: int) -> None: """ |
