I notice that there's an API in Cranelift called set_srcloc, and further set_val_label. Any examples for generating debuginfo and make it generally work with a debugger using JITModule, instead of the ObjectModule? I walked through some of the Wasmtime and rustc_codegen_cranelift codebases and felt not sure about any code from them can work on a total JIT setup (e.g. directly running the output *const u8 from .get_finalized_function).
This topic was moved here from #general > Cranelift debuginfo with set_srcloc? by fitzgen (he/him).
I'm not aware of any examples with cranelift_jit
There's documentation on GDB JIT interface (which is also supported by LLDB): https://sourceware.org/gdb/current/onlinedocs/gdb.html/JIT-Interface.html
But I am not sure how to produce code for it through Cranelift APIs
Last updated: Dec 06 2025 at 07:03 UTC