Skip to content

Commit 8ba3c69

Browse files
committed
update debugger scripts
1 parent 5e0a129 commit 8ba3c69

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

src/etc/lldb_commands

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Forces test-compliant formatting to all other types
22
type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
33
# Std String
4-
type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String$" --category Rust
5-
type summary add -F lldb_lookup.StdStringSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)String$" --category Rust
4+
type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String<.+>$" --category Rust
5+
type summary add -F lldb_lookup.StdStringSummaryProvider -e -x -h "^(alloc::([a-z_]+::)+)String<.+>$" --category Rust
66
# Std str
77
type synthetic add -l lldb_lookup.synthetic_lookup -x "^&(mut )?str$" --category Rust
88
type summary add -F lldb_lookup.summary_lookup -e -x -h "^&(mut )?str$" --category Rust

src/etc/natvis/liballoc.natvis

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</LinkedListItems>
4141
</Expand>
4242
</Type>
43-
<Type Name="alloc::string::String">
43+
<Type Name="alloc::string::generic::String&lt;*&gt;">
4444
<DisplayString>{(char*)vec.buf.inner.ptr.pointer.pointer,[vec.len]s8}</DisplayString>
4545
<StringView>(char*)vec.buf.inner.ptr.pointer.pointer,[vec.len]s8</StringView>
4646
<Expand>

src/etc/rust_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class RustType(object):
3737
STD_PATHBUF = "StdPathBuf"
3838

3939

40-
STD_STRING_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)String$")
40+
STD_STRING_REGEX = re.compile(r"^(alloc::([a-z_]+::)+)String<.+>$")
4141
STD_STR_REGEX = re.compile(r"^&(mut )?str$")
4242
STD_SLICE_REGEX = re.compile(r"^&(mut )?\[.+\]$")
4343
STD_OS_STRING_REGEX = re.compile(r"^(std::ffi::([a-z_]+::)+)OsString$")

tests/debuginfo/closures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// cdb-check: [+0x[...]] _ref__count : 0x[...] : 2 [Type: int *]
1515
// cdb-command:dx consume_closure
1616
// cdb-check:consume_closure [Type: closures::main::closure_env$2]
17-
// cdb-check: [+0x[...]] x : [...] [Type: alloc::string::String]
17+
// cdb-check: [+0x[...]] x : [...] [Type: alloc::string::generic::String]
1818
// cdb-check: [+0x[...]] _ref__base_value : 0x[...] : 42 [Type: int *]
1919
// cdb-command:dx simple_closure
2020
// cdb-checksimple_closure [Type: closures::main::closure_env$5]

tests/debuginfo/coroutine-closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// cdb-command: g
99
// cdb-command: dx closure
1010
// cdb-check:closure [Type: coroutine_closure::main::closure_env$0]
11-
// cdb-check: [+0x[...]] y : "" [Type: alloc::string::String]
12-
// cdb-check: [+0x[...]] x : "" [Type: alloc::string::String]
11+
// cdb-check: [+0x[...]] y : "" [Type: alloc::string::generic::String]
12+
// cdb-check: [+0x[...]] x : "" [Type: alloc::string::generic::String]
1313
#![allow(unused)]
1414
fn main() {
1515
let x = String::new();

tests/debuginfo/embedded-visualizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// cdb-command: dx person
4040
// cdb-check:person : "Person A" is 10 years old. [Type: dependency_with_embedded_visualizers::Person]
4141
// cdb-check: [<Raw View>] [Type: dependency_with_embedded_visualizers::Person]
42-
// cdb-check: [name] : "Person A" [Type: alloc::string::String]
42+
// cdb-check: [name] : "Person A" [Type: alloc::string::generic::String]
4343
// cdb-check: [age] : 10 [Type: int]
4444

4545
// === GDB TESTS ===================================================================================

tests/debuginfo/marker-types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
// cdb-check: [<Raw View>] [Type: core::mem::manually_drop::ManuallyDrop<i32>]
1616

1717
// cdb-command: dx pin
18-
// cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
19-
// cdb-check: [<Raw View>] [Type: core::pin::Pin<ref_mut$<alloc::string::String> >]
18+
// cdb-check:pin : Pin(0x[...]: "this") [Type: core::pin::Pin<ref_mut$<alloc::string::generic::String> >]
19+
// cdb-check: [<Raw View>] [Type: core::pin::Pin<ref_mut$<alloc::string::generic::String> >]
2020
// cdb-check: [len] : 0x4 [Type: unsigned [...]]
2121
// cdb-check: [capacity] : 0x4 [Type: unsigned [...]]
2222
// cdb-check: [chars] : "this"

tests/debuginfo/msvc-pretty-enums.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// lldb-check:(msvc_pretty_enums::CStyleEnum) j = High
3232

3333
// lldb-command:v k
34-
// lldb-check:(core::option::Option<alloc::string::String>) k = { value = { 0 = "IAMA optional string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'o' [6] = 'p' [7] = 't' [8] = 'i' [9] = 'o' [10] = 'n' [11] = 'a' [12] = 'l' [13] = ' ' [14] = 's' [15] = 't' [16] = 'r' [17] = 'i' [18] = 'n' [19] = 'g' [20] = '!' } } }
34+
// lldb-check:(core::option::Option<alloc::string::generic::String>) k = { value = { 0 = "IAMA optional string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 'o' [6] = 'p' [7] = 't' [8] = 'i' [9] = 'o' [10] = 'n' [11] = 'a' [12] = 'l' [13] = ' ' [14] = 's' [15] = 't' [16] = 'r' [17] = 'i' [18] = 'n' [19] = 'g' [20] = '!' } } }
3535

3636
// lldb-command:v l
3737
// lldb-check:(core::result::Result<u32, msvc_pretty_enums::Empty>) l = { value = { 0 = {} } }
@@ -113,8 +113,8 @@
113113
// cdb-check:j : High (0x10) [Type: msvc_pretty_enums::CStyleEnum]
114114
//
115115
// cdb-command: dx k
116-
// cdb-check:k : Some [Type: enum2$<core::option::Option<alloc::string::String> >]
117-
// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String]
116+
// cdb-check:k : Some [Type: enum2$<core::option::Option<alloc::string::generic::String> >]
117+
// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::generic::String]
118118
//
119119
// cdb-command: dx l
120120
// cdb-check:l : Ok [Type: enum2$<core::result::Result<u32,enum2$<msvc_pretty_enums::Empty> > >]

tests/debuginfo/pretty-std.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
// gdb-check:$7 = "IAMA OS string 😃"
3333

3434
// gdb-command: print some_string
35-
// gdb-check:$8 = core::option::Option<alloc::string::String>::Some("IAMA optional string!")
35+
// gdb-check:$8 = core::option::Option<alloc::string::generic::String<alloc::alloc::Global>>::Some("IAMA optional string!")
3636

3737
// gdb-command: set print elements 5
3838
// gdb-command: print some_string
39-
// gdb-check:$9 = core::option::Option<alloc::string::String>::Some("IAMA "...)
39+
// gdb-check:$9 = core::option::Option<alloc::string::generic::String<alloc::alloc::Global>>::Some("IAMA "...)
4040

4141
// === LLDB TESTS ==================================================================================
4242

@@ -125,9 +125,9 @@
125125
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<i64> >]
126126

127127
// cdb-command: dx some_string
128-
// cdb-check:some_string : Some [Type: enum2$<core::option::Option<alloc::string::String> >]
129-
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<alloc::string::String> >]
130-
// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::String]
128+
// cdb-check:some_string : Some [Type: enum2$<core::option::Option<alloc::string::generic::String<alloc::alloc::Global>> >]
129+
// cdb-check: [<Raw View>] [Type: enum2$<core::option::Option<alloc::string::generic::String<alloc::alloc::Global>> >]
130+
// cdb-check: [+0x000] __0 : "IAMA optional string!" [Type: alloc::string::generic::String<alloc::alloc::Global>]
131131

132132
// cdb-command: dx linkedlist
133133
// cdb-check:linkedlist : { len=0x2 } [Type: alloc::collections::linked_list::LinkedList<i32,alloc::alloc::Global>]

tests/debuginfo/strings-and-strs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// gdb-command:run
99

1010
// gdb-command:print plain_string
11-
// gdb-check:$1 = alloc::string::String {vec: alloc::vec::Vec<u8, alloc::alloc::Global> {buf: alloc::raw_vec::RawVec<u8, alloc::alloc::Global> {inner: alloc::raw_vec::RawVecInner<alloc::alloc::Global> {ptr: core::ptr::unique::Unique<u8> {pointer: core::ptr::non_null::NonNull<u8> {pointer: 0x[...]}, _marker: core::marker::PhantomData<u8>}, cap: core::num::niche_types::UsizeNoHighBit (5), alloc: alloc::alloc::Global}, _marker: core::marker::PhantomData<u8>}, len: 5}}
11+
// gdb-check:$1 = alloc::string::generic::String<alloc::alloc::Global> {vec: alloc::vec::Vec<u8, alloc::alloc::Global> {buf: alloc::raw_vec::RawVec<u8, alloc::alloc::Global> {inner: alloc::raw_vec::RawVecInner<alloc::alloc::Global> {ptr: core::ptr::unique::Unique<u8> {pointer: core::ptr::non_null::NonNull<u8> {pointer: 0x[...]}, _marker: core::marker::PhantomData<u8>}, cap: core::num::niche_types::UsizeNoHighBit (5), alloc: alloc::alloc::Global}, _marker: core::marker::PhantomData<u8>}, len: 5}}
1212

1313
// gdb-command:print plain_str
1414
// gdb-check:$2 = "Hello"
@@ -25,7 +25,7 @@
2525
// === LLDB TESTS ==================================================================================
2626
// lldb-command:run
2727
// lldb-command:v plain_string
28-
// lldb-check:(alloc::string::String) plain_string = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' }
28+
// lldb-check:(alloc::string::generic::String<alloc::alloc::Global>) plain_string = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' }
2929

3030
// lldb-command:v plain_str
3131
// lldb-check:(&str) plain_str = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' }

0 commit comments

Comments
 (0)