-
Notifications
You must be signed in to change notification settings - Fork 39
fix(codegen): emit trace events to fix stack traces in debugger #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Conversation
7bd6db8
to
7e26456
Compare
7e26456
to
71aafab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just minor notes.
@@ -1,5 +1,6 @@ | |||
use core::ops::{Deref, DerefMut}; | |||
|
|||
pub mod debug; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I understand why it's public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the other two modules, which we're wildcard re-exporting the contents of from the root, we only need to export the debug
module and require fully-qualified paths instead to access its declarations.
@@ -0,0 +1,14 @@ | |||
#[link(wasm_import_module = "miden:core-import/[email protected]")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface with the break
function should be in our core-import WIT file at tests/rust-apps-wasm/rust-sdk/wit-sdk/miden-core-import.wit
, otherwise wit-component errors on core module import. I'm in the middle of splitting our WIT files and moving them to SDK crates at #505, and I can take care of it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah noted, I'll leave the fix to you then!
This reinstates call frame tracking for debugging purposes, using a pair of trace events that we listen for in the debug executor in order to construct stack traces.