Stream: cranelift

Topic: Cranelift debuginfo with set_srcloc?


view this post on Zulip Anqur (Nov 06 2025 at 03:55):

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).

view this post on Zulip Notification Bot (Nov 06 2025 at 18:56):

This topic was moved here from #general > Cranelift debuginfo with set_srcloc? by fitzgen (he/him).

view this post on Zulip fitzgen (he/him) (Nov 06 2025 at 18:57):

I'm not aware of any examples with cranelift_jit

view this post on Zulip Adel Prokurov (Nov 07 2025 at 11:20):

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