Skip to content

Commit

Permalink
Unrolled build for rust-lang#135812
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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).
  • Loading branch information
rust-timer authored Jan 26, 2025
2 parents d9b4598 + a9495e0 commit 99bad89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/gdb_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, valobj):
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"])
Expand Down

0 comments on commit 99bad89

Please sign in to comment.