Fix handling for RegisterRule::Undefined#52
Merged
nbdd0121 merged 1 commit intonbdd0121:trunkfrom Jan 13, 2026
Merged
Conversation
nbdd0121
reviewed
Jan 12, 2026
Owner
nbdd0121
left a comment
There was a problem hiding this comment.
Thanks for the PR! I thought undefined values don't matter, but apparently RA is special as dwarf defines RA rule being undefined to mean unwind complete.
Perhaps add a comment explaining this? Something like "For most registers, undefined indicates the value does not need to be preserved so the value content does not matter. However when RA is undefined it indicates that the unwinding is complete."
`gimli::UnwindTableRow::registers` currently never returns `RegisterRule::Undefined` so this didn't matter. However, a future gimli release will change this behaviour. In particular, this fix is required to handle a `DW_CFA_undefined` rule for `RA`.
Contributor
Author
|
Done. RA is the only special case I saw in the DWARF spec, but the two other unwind implementations I looked at handle undefined by setting to 0. |
Owner
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gimli::UnwindTableRow::registerscurrently never returnsRegisterRule::Undefinedso this didn't matter. However, a futuregimlirelease will change this behaviour. In particular, this fix is required to handle aDW_CFA_undefinedrule forRA.gimli-rs/gimli#859 is the planned change.