-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: no_std
fix use without unwind
#9977
base: main
Are you sure you want to change the base?
fix: no_std
fix use without unwind
#9977
Conversation
let caller_sp_to_cfa_offset = | ||
crate::isa::unwind::systemv::caller_sp_to_cfa_offset(); | ||
#[cfg(not(feature = "unwind"))] | ||
let caller_sp_to_cfa_offset = 0; // TODO is this right? |
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.
Maybe compute_value_labels_ranges
should be made to return ValueLabelsRanges::default();
when the unwind feature is disabled? Except for values which just so happen to be in registers, I don't think it is possible to generate valid debuginfo for locals when the unwind table is not also emitted.
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.
Arguably, the register values are just as 'meaningless' in the no-unwind case as you need the unwind info to recover them (unless you are willing to disassemble code to guide your unwinder). Ultimately, the debug info production 'feature' is tightly coupled to the unwinding feature.
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 marked compute_value_labels_ranges
as available with the unwind
feature too and made the Default
changes at its only callsite, I think that's clearer than having the function exist but return a meaningless default value.
As part of no_std support in cranelift this PR fixes uses of the
isa/unwind
module throughcranelift
so thatcranelift
can be compiled with theunwind
feature (which depends onstdlib
throughgimli
) disabled.