LibWasm: Add execution hooks and a debugger mode to the wasm tool

This is useful for debugging *our* implementation of wasm :P
This commit is contained in:
Ali Mohammad Pur 2021-05-21 21:10:44 +04:30 committed by Ali Mohammad Pur
commit ba5da79617
Notes: sideshowbarker 2024-07-18 17:22:42 +09:00
8 changed files with 299 additions and 4 deletions

View file

@ -53,6 +53,9 @@ Result Configuration::call(FunctionAddress address, Vector<Value> arguments)
Result Configuration::execute()
{
Interpreter interpreter;
interpreter.pre_interpret_hook = pre_interpret_hook;
interpreter.post_interpret_hook = post_interpret_hook;
interpreter.interpret(*this);
if (interpreter.did_trap())
return Trap {};