You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make my trap handling code show a user friendly stack trace. I'd at least like to show which functions are hit in the trace.
Looking at the C API functions for wasm_frame_t, I can get the function index, function offset, and module offset, for a given frame. Function index sounds useful, but what is it an index into? Is there a way of looking up the name of a function from its index?
The text was updated successfully, but these errors were encountered:
@liamappelbe The function index is the index in the function index space of the WebAssembly module that this frame comes from (i.e func 1, func 2, relative to the compiled module).
That will not help you get the function name. Currently we only have these functions:
wasm_frame_func_index
wasm_frame_func_offset
wasm_frame_module_offset
However, the function name is currently inaccessible from the outside (it's stored as an Option<String> on the FrameInfo). I will have to add extra functions to make these fields accessible, should be fixed soon.
I'm trying to make my trap handling code show a user friendly stack trace. I'd at least like to show which functions are hit in the trace.
Looking at the C API functions for
wasm_frame_t
, I can get the function index, function offset, and module offset, for a given frame. Function index sounds useful, but what is it an index into? Is there a way of looking up the name of a function from its index?The text was updated successfully, but these errors were encountered: