Conversation
b68bc57 to
e9dc1bb
Compare
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
cc MSVC target maintainers: @ChrisDenton @dpaoliello @Fulgen301 @lambdageek @sivadeilra @wesleywiser |
|
(Given this touches debuginfo tests this should probably get a |
|
@bors try jobs=x86_64-msvc-,i686-msvc-,aarch64-msvc-,aarch64-apple- |
1 similar comment
|
@bors try jobs=x86_64-msvc-,i686-msvc-,aarch64-msvc-,aarch64-apple- |
This comment has been minimized.
This comment has been minimized.
Add Natvis visualiser and debuginfo tests for `f128` try-job: x86_64-msvc-* try-job: i686-msvc-* try-job: aarch64-msvc-* try-job: aarch64-apple-*
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 816a2f0 failed: CI. Failed jobs:
|
e9dc1bb to
19f719c
Compare
|
According to the table on Wikipedia, there isn't any Xcode versions yet with LLDB 22 or later, so I've ignored the |
|
@bors try jobs=x86_64-msvc-,i686-msvc-,aarch64-msvc-,aarch64-apple- |
This comment has been minimized.
This comment has been minimized.
Add Natvis visualiser and debuginfo tests for `f128` try-job: x86_64-msvc-* try-job: i686-msvc-* try-job: aarch64-msvc-* try-job: aarch64-apple-*
|
@rustbot review |
This comment has been minimized.
This comment has been minimized.
19f719c to
14c66ac
Compare
This comment has been minimized.
This comment has been minimized.
14c66ac to
2e0cdb2
Compare
|
I've updated the LLDB tests that this PR adds in |
This comment has been minimized.
This comment has been minimized.
2e0cdb2 to
f17f144
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
cc @Walnut356 because debug info (and debug experience) |
|
I'll give this a look later today |
|
Just a heads up for reviewers, the tests passing in CI should not be considered reliable w.r.t. debuginfo changes at all. Iirc only GDB is tested in PR CI, and the only bors tests i'm 100% sure of are lldb on The windows LLDB tests only fully pass when run locally as of a few days ago, so at this point running them yields meaningful results (keep in mind lldb/gdb debuginfo tests are opt-in now). I'm working on getting more CI runners to run the debuginfo tests, but right now it is what it is. Running the tests locally on I need to probably change the names/doc comments of There's a couple of options:
|
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
Unfortunately this doesn't work: I've checked again just now and WinDbg just gives a "Type information missing error" which appears to make it impossible to even match on the type name in Natvis. I'll do something similar to what you did for |
f17f144 to
21653c9
Compare
|
I've tested LLDB on Windows manually and the summary provider I've added works, but I was unable to test LLDB via @rustbot review |
21653c9 to
5ffb04a
Compare
|
Hmm, that's probably an LLDB version issue. We havent gotten to gating everything to a single LLDB version yet, but the only versions we're even attempting to support atm are 21 and 22. lldb 23 very likely doesnt work atm. relevant part:
|
| ) | ||
|
|
||
| if LLDBFeature.Float128 in FEATURE_FLAGS: | ||
| # Force f128 summary on windows-msvc since PDB does not have a node for f128 |
There was a problem hiding this comment.
Small nit, PDB does have a node for 128-bit floats. It's the (very memorable) tag value 0x8008 =) (CodeView spec for reference)
I did a sanity check earlier to be sure. Rustc asks LLVM for it properly and LLVM creates it properly, it's just that microsoft's debuggers don't have support for it (nor do they have a builtin type we can leech off of like __int128). I wish i could say this is the only one of their own nodes they don't support, but unfortunately they don't handle typedefs correctly either 🫠
There was a problem hiding this comment.
I've updated the comments to say that most Windows debuggers don't support PDB f128.
5ffb04a to
167c7bd
Compare
Got it working with LLDB 22. All debuginfo tests now pass for LLDB on |
View all comments
To render f128s in debuggers on MSVC targets, this PR changes the compiler to output
f128s asstruct f128 { low_bits: u64, high_bits: u64 }, and includes a Natvis visualiser that displays the float in hexdecimal format (similar to theLowerHeximpl in #160626), as unlikef16there's no larger supported float format to convert to and trying to write a float to decimal string converter in Natvis didn't seem practical. gdb, lldb and cdb tests are also included forf128, although gdb does not yet correctly identify the float format.I did consider also displaying a
doubleapproximation of thef128(as the debugger will convert that to a decimal string) but decided against it asf64has a significantly smaller exponent range too (meaning very large or smallf128s couldn't have an approximation anyway) andcdbandWinDbgboth seem to round all floating-point numbers to 6 decimal places, meaning the displayed number is (double) rounded even further thanf64precision and is useless for tiny values.Closes #121837
Tracking issue: #116909