mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Add visualizer for OsString and fixup other string visualizers
This commit is contained in:
parent
a6a82c66d4
commit
85002741a2
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="str">
|
||||
<DisplayString>{data_ptr,[length]s8}</DisplayString>
|
||||
<StringView>data_ptr,[length]s8</StringView>
|
||||
<DisplayString>{(char*)data_ptr,[length]s8}</DisplayString>
|
||||
<StringView>(char*)data_ptr,[length]s8</StringView>
|
||||
<Expand>
|
||||
<Item Name="[len]" ExcludeView="simple">length</Item>
|
||||
<Synthetic Name="[chars]">
|
||||
|
@ -74,7 +74,7 @@
|
||||
</Type>
|
||||
|
||||
<Type Name="std::ffi::c_str::CString">
|
||||
<DisplayString>{inner.data_ptr,s}</DisplayString>
|
||||
<DisplayString>{(char*)inner.data_ptr}</DisplayString>
|
||||
<Expand>
|
||||
<Synthetic Name="[chars]">
|
||||
<Expand>
|
||||
@ -101,4 +101,18 @@
|
||||
</Synthetic>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="std::ffi::os_str::OsString">
|
||||
<DisplayString>{(char*)inner.inner.bytes.buf.ptr.pointer,[inner.inner.bytes.len]}</DisplayString>
|
||||
<Expand>
|
||||
<Synthetic Name="[chars]">
|
||||
<Expand>
|
||||
<ArrayItems>
|
||||
<Size>inner.inner.bytes.len</Size>
|
||||
<ValuePointer>(char*)inner.inner.bytes.buf.ptr.pointer</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Synthetic>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
||||
|
@ -111,8 +111,9 @@
|
||||
// cdb-check: [11] : 33 '!' [Type: char]
|
||||
|
||||
// cdb-command: dx os_string
|
||||
// cdb-check:os_string [Type: [...]::OsString]
|
||||
// NOTE: OsString doesn't have a .natvis entry yet.
|
||||
// cdb-check:os_string : "IAMA OS string 😃" [Type: std::ffi::os_str::OsString]
|
||||
// cdb-check: [<Raw View>] [Type: std::ffi::os_str::OsString]
|
||||
// cdb-check: [chars]
|
||||
|
||||
// cdb-command: dx some
|
||||
// cdb-check:some : Some [Type: enum$<core::option::Option<i16> >]
|
||||
|
Loading…
Reference in New Issue
Block a user