Kixiron opened issue #5574:
It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through
cranelift-jit
to allow unwinding from jit'd code
bjorn3 commented on issue #5574:
Cranelift doesn't actually know how to emit and relocate DWARF debuginfo, only how produce
gimli::write::FrameDescriptorEntry
's. See https://github.com/bjorn3/rustc_codegen_cranelift/blob/b31b74e8fb45800e9f86c84b1f78e36bf76c498c/src/debuginfo/unwind.rs#L84-L132 for an example how to register the debuginfo and https://github.com/bjorn3/rustc_codegen_cranelift/blob/b31b74e8fb45800e9f86c84b1f78e36bf76c498c/src/debuginfo/emit.rs#L69-L85 for how to relocate it. Also make sure thatcie.fde_address_encoding
is some kind of absolute pointer (the default) and not a pcrel one, like necessary for object files.
Kixiron closed issue #5574:
It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through
cranelift-jit
to allow unwinding from jit'd code
Kixiron reopened issue #5574:
It seems like all the infra for unwinding already exists, I'm just not entirely sure how to access it through
cranelift-jit
to allow unwinding from jit'd code
Kixiron commented on issue #5574:
@bjorn3 That's cfg'd to do nothing on windows, how would I emit unwind info on windows?
bjorn3 commented on issue #5574:
Looks like https://github.com/bytecodealliance/wasmtime/blob/5ba0d696b7526433c19dd66a134bfb4c8b3e5cc1/crates/jit/src/unwind/winx64.rs has code that does this on windows.
Last updated: Dec 23 2024 at 12:05 UTC