From 86b3d5508a9a1a76a8f36ac6b884ab007bfadbd1 Mon Sep 17 00:00:00 2001 From: fateyan Date: Mon, 15 Apr 2024 14:44:23 +0800 Subject: [PATCH] Update API usage, fit to binaryninja-api 4.1 --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index c1a9ea9..a22e175 100644 --- a/__init__.py +++ b/__init__.py @@ -127,7 +127,7 @@ def init(self): def bv_finalized_callback(self, _bv): self.navigate(f'Linear:{self.name}', 0) chosen_mcu = self.get_load_settings(self.name - ).get_string('loader.cortex_m.mcu') + ).get_string('loader.cortex_m.mcu', self) assert chosen_mcu is not None mcu_lib = importlib.import_module( @@ -161,7 +161,7 @@ def bv_finalized_callback(self, _bv): Type.pointer(self.arch, Type.void(), const=True), self.platform ) - reader = self.reader(0) + reader = self.reader(mcu.ROM_OFF) addr = reader.read32() self.define_auto_symbol(