diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-01-26 01:51:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-26 01:51:15 -0500 |
| commit | e730dfc097a4226aa71c16836528e5472cb91663 (patch) | |
| tree | 4032a77c85767b0f035a8082276fc5b16f467cb6 | |
| parent | cecdb32d0ffdf599bb32367504a09002dbee710e (diff) | |
| parent | a9495e01187a8aadb4500993d40ce7b27e1958d2 (diff) | |
| download | rust-e730dfc097a4226aa71c16836528e5472cb91663.tar.gz rust-e730dfc097a4226aa71c16836528e5472cb91663.zip | |
Rollup merge of #135812 - Walnut356:gdb_osstring, r=Mark-Simulacrum
Fix GDB `OsString` provider on Windows It would throw an exception due to trying to look up `Wtf8Buf.__0`. The field it actually wants is called [`bytes`](https://github.com/rust-lang/rust/blob/b605c65b6eb5fa71783f8e26df69975f9f1680ee/library/std/src/sys_common/wtf8.rs#L134).
| -rw-r--r-- | src/etc/gdb_providers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py index 34bb5c39909..c8f4a32cb17 100644 --- a/src/etc/gdb_providers.py +++ b/src/etc/gdb_providers.py @@ -71,7 +71,7 @@ class StdOsStringProvider(printer_base): self._valobj = valobj buf = self._valobj["inner"]["inner"] is_windows = "Wtf8Buf" in buf.type.name - vec = buf[ZERO_FIELD] if is_windows else buf + vec = buf["bytes"] if is_windows else buf self._length = int(vec["len"]) self._data_ptr = unwrap_unique_or_non_null(vec["buf"]["inner"]["ptr"]) |
