Add Natvis visualiser and debuginfo tests for f128 - #161777
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 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. |
14c66ac to
2e0cdb2
Compare
|
I've updated the LLDB tests that this PR adds in |
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