-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I'm simulating a CortexM-based system, and trying to use an AddHook to trigger a Python action when I hit a certain pc in the simulation. I'm trying this:
>>> ams.sysbus.cpu0.AddHook(0x8001d7c, lambda: print("fired!"))
But I immediately get this:
>>> ams.sysbus.cpu0.AddHook(0x8001d7c, lambda: print("fired!"))
Traceback (most recent call last):
File "<input>", line 1, in <module>
ams.sysbus.cpu0.AddHook(0x8001d7c, lambda: print("fired!"))
File "/home/joshua/bambu/ams_reveng/renode/renode_venv/lib/python3.12/site-packages/pyrenode3/wrapper.py", line 29, in __call__
raise RuntimeError(msg) from e
RuntimeError: Unexpected 'TypeError' occured. This shouldn't happen unless Python.NET changes significantly.
I changed line 29 to just raise , and this gives a more familiar-looking error: TypeError: No method matches given arguments for CpuHooksExtensions.AddHook: (<class 'Antmicro.Renode.Peripherals.CPU.CortexM'>, <class 'int'>, <class 'function'>)
This error looks like an error I've seen before, at least:
>>> ams.sysbus.LoadBinary("bad")
Traceback (most recent call last):
File "<input>", line 1, in <module>
ams.sysbus.LoadBinary("bad")
TypeError: No method matches given arguments for FileLoaderExtensions.LoadBinary: (<class 'Antmicro.Renode.Peripherals.Bus.SystemBus'>, <class 'str'>)
So now I need to figure out how to call a (ulong, Action<ICpuSupportingGdb, ulong>). But that's more tractable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels