Skip to content

Conversation

@rastogishubham
Copy link

@rastogishubham rastogishubham commented Oct 16, 2025

Fix bug with emitting a DW_LNS_set_file at the beginning of a new function's contribution to a line table, when the
-cas-friendly-debug-info option is passed. We were setting the current FileNum to 0, however, if the LineEntry to be emitted also has the FileNum be 0, we don't emit a DW_LNS_set_file at all, it is only emitted if the current FileNum and the LineEntry to be emitted have different FileNums.

To fix this, in cas-friendly-debug-info, we always set the current FileNum to be -1.

rdar://162777991

(cherry picked from commit 823563a)

Fix bug with emitting a DW_LNS_set_file at the beginning of a new
function's contribution to a line table, when the
-cas-friendly-debug-info option is passed. We were setting the current
FileNum to 0, however, if the LineEntry to be emitted also has the
FileNum be 0, we don't emit a DW_LNS_set_file at all, it is only emitted
if the current FileNum and the LineEntry to be emitted have different
FileNums.

To fix this, in cas-friendly-debug-info, we always set the current
FileNum to be -1.

 rdar://161930616

(cherry picked from commit 823563a)
@rastogishubham rastogishubham requested a review from a team as a code owner October 16, 2025 15:19
@rastogishubham
Copy link
Author

@swift-ci please test

Copy link

@cachemeifyoucan cachemeifyoucan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nit: a bit inline comment about why -1 will be great.

@rastogishubham
Copy link
Author

@swift-ci please test windows

@adrian-prantl
Copy link

adrian-prantl commented Oct 17, 2025

LGTM. Nit: a bit inline comment about why -1 will be great.

I had the same reaction but it turns out the comment explaining it was already there, just the default wasn't chosen correctly.

@adrian-prantl adrian-prantl merged commit a48c2c0 into swiftlang:swift/release/6.2 Oct 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants