mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
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:
parent
f740667fa1
commit
ba5da79617
8 changed files with 299 additions and 4 deletions
|
@ -13,6 +13,10 @@ namespace Wasm {
|
|||
struct Interpreter {
|
||||
void interpret(Configuration&);
|
||||
bool did_trap() const { return m_do_trap; }
|
||||
void clear_trap() { m_do_trap = false; }
|
||||
|
||||
Function<bool(Configuration&, InstructionPointer&, const Instruction&)>* pre_interpret_hook { nullptr };
|
||||
Function<bool(Configuration&, InstructionPointer&, const Instruction&, const Interpreter&)>* post_interpret_hook { nullptr };
|
||||
|
||||
private:
|
||||
void interpret(Configuration&, InstructionPointer&, const Instruction&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue