Skip to content

Commit e730dfc

Browse files
authored
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).
2 parents cecdb32 + a9495e0 commit e730dfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/etc/gdb_providers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, valobj):
7171
self._valobj = valobj
7272
buf = self._valobj["inner"]["inner"]
7373
is_windows = "Wtf8Buf" in buf.type.name
74-
vec = buf[ZERO_FIELD] if is_windows else buf
74+
vec = buf["bytes"] if is_windows else buf
7575

7676
self._length = int(vec["len"])
7777
self._data_ptr = unwrap_unique_or_non_null(vec["buf"]["inner"]["ptr"])

0 commit comments

Comments
 (0)