binaryninja-api
binaryninja-api copied to clipboard
Remove loader.architecture override handling in views
Fix for https://github.com/Vector35/binaryninja-api/issues/5362#event-12730665835
It's important to understand that this PR still allows for backwards compatibility and doesn't prevent the use of loader.architecture
for overriding the architecture. loader.architecture
has been deprecated for loader.platform
, so if they use loader.architecture
, it gets reset to loader.platform
(which is an override that's handled by all the views).
Example of the new behavior (if they use the deprecated loader.architecture
setting):
>>> bv = load("test.exe", options={"loader.architecture" : "armv7"})
[0:6451428262981885673 Settings warn] Setting 'loader.architecture' deprecated by 'loader.platform'.
>>> bv.arch
<arch: armv7>
>>> bv.platform
<platform: armv7>
How we want users to do it from now on:
>>> bv = load("test.exe", options={"loader.platform" : "efi-x86"})
>>> bv.arch
<arch: x86>
>>> bv.platform
<platform: efi-x86>