-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Trait object debug #45897
Trait object debug #45897
Conversation
☔ The latest upstream changes (presumably #45806) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Looks good to me, thanks @tromey!
8c9a797
to
ab4da8c
Compare
So far I haven't managed to reproduce that failure. |
My current theory is that this is failing due to an unmodified LLVM; and so the patch will need some tweaks. |
Looking at the patches, I still don't see how that would be possible, but I'm rebuilding without the LLVM patch to be sure. |
I rebuilt without the LLVM bump and didn't see this failure. Now I don't have a theory about what is going wrong. Maybe I need to build specifically against whatever LLVM travis is using. |
The first CI run uses Ubuntu's llvm-3.9. The rest should use rust's own llvm. |
Thanks. I got it to fail with my system llvm. |
The bug is that the patch is passing in NULL for the linkage name of the vtable. |
This adds a "min-system-llvm-version" directive, so that a test can indicate that it will either work with rust-llvm or with some minimal system LLVM. This makes it simpler to write a test that requires an LLVM patch that landed upstream and was then backported to rust-llvm.
Emit better debugging information for a trait object pointer. In particular, now: * The fields are explicitly represented in the DWARF; * DWARF for the vtable itself is emitted; and * The DWARF for the vtable's type has a DW_AT_containing_type which points to the concrete type for which the vtable was emitted. This is a small DWARF extension, that allows debuggers to determine the real type of the object to which a trait object points. I'll submit the gdb patch to take advantage of this new debuginfo once this lands. The vtable type is not currently complete -- it doesn't include members for the pointers it contains. This information was not needed for this feature. This addresses part 1 of rust-lang#1563.
ab4da8c
to
ae4cc60
Compare
@tromey I think this is ready to be reviewed or merged? cc @michaelwoerister |
@kennytm yes - it was reviewed once, then I made a small change to address the test failures. A re-review would be good. |
@bors r+ |
📌 Commit ae4cc60 has been approved by |
Trait object debug This enables better debugging of trait objects. See the individual commits for explanations. This required an LLVM bump.
☀️ Test successful - status-appveyor, status-travis |
This enables better debugging of trait objects. See the individual commits for explanations. This required an LLVM bump.