Skip to content
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

x86_64: enable struct field reordering #22521

Merged
merged 1 commit into from
Jan 18, 2025

Conversation

jacobly0
Copy link
Member

The blocker for enabling this feature was my need to debug the emitted assembly without debug info and having to manually inspect memory to determine struct contents. However, we now have debug info!

(lldb) v -L foo bar
0x00007fffffffda20: (repro.repro.Foo) foo = {
0x00007fffffffda24:   .x = 12
0x00007fffffffda20:   .y = 34
}
0x00007fffffffda28: (repro.repro.Bar) bar = {
0x00007fffffffda28:   .x = 56
0x00007fffffffda2c:   .y = 78
}

Updates #21530

The blocker for enabling this feature was my need to debug the emitted
assembly without debug info and having to manually inspect memory to
determine struct contents.  However, we now have debug info!

    (lldb) v -L foo bar
    0x00007fffffffda20: (repro.repro.Foo) foo = {
    0x00007fffffffda24:   .x = 12
    0x00007fffffffda20:   .y = 34
    }
    0x00007fffffffda28: (repro.repro.Bar) bar = {
    0x00007fffffffda28:   .x = 56
    0x00007fffffffda2c:   .y = 78
    }

Updates ziglang#21530
@andrewrk andrewrk merged commit a446101 into ziglang:master Jan 18, 2025
10 checks passed
@jacobly0 jacobly0 deleted the x86_64-reorder-fields branch January 18, 2025 21:16
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.

2 participants