Commit graph

9 commits

Author SHA1 Message Date
Jacob Pratt
307f1609e9
Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser
[Debuginfo] Add MSVC Synthetic and Summary providers to LLDB

Adds handling for `tuple$<>`, `ref$<slice$2<>`, `ref$<str$>` and `enum2$<>`.

Also fixes a bug in MSVC vec/string handling where the script was unable to determine the element's type due to LLDB ignoring template arg debug information

<details>
<summary>Sample code</summary>

```rust
pub enum Number {
    One = 57,
    Two = 99,
}

#[repr(u8)]
pub enum Container {
    First(u32),
    Second { val: u64, val2: i8 },
    Third,
}

...
    let u8_val = b'a';
    let float = 42.78000000000001;

    let tuple = (u8_val, float);

    let str_val = "eef";
    let mut string = "freef".to_owned();
    let mut_str = string.as_mut_str();
    let array: [u8; 4] = [1, 2, 3, 4];
    let ref_array = array.as_slice();
    let mut array2: [u32; 4] = [1, 2, 3, 4];
    let mut_array = array2.as_mut_slice();
    let enum_val = Number::One;
    let mut enum_val2 = Number::Two;
    let sum_val = Container::First(15);
    let sum_val_2 = Container::Second { val: 0, val2: 0 };
    let sum_val_3 = Container::Third;
    let non_zero = NonZeroU128::new(100).unwrap();
    let large_discr = NonZeroU128::new(255);
```
</details>

Before:

![image](https://github.com/user-attachments/assets/19fd0881-a4c3-4c68-b28f-769a67d95e35)

After:

![image](https://github.com/user-attachments/assets/d0479035-17ed-4584-8eb4-71d1314f8f7c)

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw
try-job: aarch64-gnu
2025-02-23 02:44:16 -05:00
Walnut
d6f5d34744 fix string and tuple struct formatting 2025-02-12 01:30:09 -06:00
Scott McMurray
6f2a78345e Update a bunch of library types for MCP807
This greatly reduces the number of places that actually use the `rustc_layout_scalar_valid_range_*` attributes down to just 3:
```
library/core\src\ptr\non_null.rs
68:#[rustc_layout_scalar_valid_range_start(1)]

library/core\src\num\niche_types.rs
19:        #[rustc_layout_scalar_valid_range_start($low)]
20:        #[rustc_layout_scalar_valid_range_end($high)]
```

Everything else -- PAL Nanoseconds, alloc's `Cap`, niched FDs, etc -- all just wrap those `niche_types` types.
2025-01-09 23:47:11 -08:00
Jonathan Dönszelmann
0a9c87b1f5
rename RcBox in other places too 2024-10-11 10:04:22 +02:00
Ben Kimock
22ed23d680 Convert lldbg- to lldb- 2024-08-18 17:00:33 -04:00
Ben Kimock
fa0e8585d4 Replace gdbr with gdbg 2024-08-18 12:39:07 -04:00
Ben Kimock
d6c0ebef50 Polymorphize RawVec 2024-08-09 20:06:26 -04:00
Nicholas Nethercote
4654e87d4c Fix tests/debuginfo/strings-and-strs.
It fails on my machine because it embeds pointer addresses in the
expected output.

This commit replaces the addresses with `0x[...]`.
2024-05-20 15:01:59 +10:00
Vladimir Makayev
330ce83a8d lldb-formatters: Use StdSliceSyntheticProvider for &str 2024-05-11 12:11:55 -07:00