about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/etc/lldb_commands1
-rw-r--r--src/etc/lldb_providers.py2
-rw-r--r--tests/debuginfo/empty-string.rs2
-rw-r--r--tests/debuginfo/msvc-pretty-enums.rs2
-rw-r--r--tests/debuginfo/pretty-std.rs3
-rw-r--r--tests/debuginfo/strings-and-strs.rs2
6 files changed, 7 insertions, 5 deletions
diff --git a/src/etc/lldb_commands b/src/etc/lldb_commands
index 5f24d0da047..508296c3a5a 100644
--- a/src/etc/lldb_commands
+++ b/src/etc/lldb_commands
@@ -1,4 +1,5 @@
 # Forces test-compliant formatting to all other types
+type synthetic add -l lldb_lookup.synthetic_lookup -x ".*" --category Rust
 type summary add -F _ -e -x -h "^.*$" --category Rust
 # Std String
 type synthetic add -l lldb_lookup.StdStringSyntheticProvider -x "^(alloc::([a-z_]+::)+)String$" --category Rust
diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py
index 573cc50a868..98426e42423 100644
--- a/src/etc/lldb_providers.py
+++ b/src/etc/lldb_providers.py
@@ -194,7 +194,7 @@ def StdStringSummaryProvider(valobj, dict):
     length = inner_vec.GetChildMemberWithName("len").GetValueAsUnsigned()
 
     if length <= 0:
-        return ""
+        return '""'
     error = SBError()
     process = pointer.GetProcess()
     data = process.ReadMemory(pointer.GetValueAsUnsigned(), length, error)
diff --git a/tests/debuginfo/empty-string.rs b/tests/debuginfo/empty-string.rs
index 014465c27ca..6cf61e17771 100644
--- a/tests/debuginfo/empty-string.rs
+++ b/tests/debuginfo/empty-string.rs
@@ -17,7 +17,7 @@
 // lldb-command:run
 
 // lldb-command:fr v empty_string
-// lldb-check:[...] empty_string = "" { vec = size=0 }
+// lldb-check:[...] empty_string = ""
 
 // lldb-command:fr v empty_str
 // lldb-check:[...] empty_str = ""
diff --git a/tests/debuginfo/msvc-pretty-enums.rs b/tests/debuginfo/msvc-pretty-enums.rs
index d60a7b81944..06bc25dc5d5 100644
--- a/tests/debuginfo/msvc-pretty-enums.rs
+++ b/tests/debuginfo/msvc-pretty-enums.rs
@@ -30,7 +30,7 @@
 // lldb-check:(msvc_pretty_enums::CStyleEnum) j = High
 
 // lldb-command:v k
-// lldb-check:(core::option::Option<alloc::string::String>) k = { value = { 0 = "IAMA optional string!" { vec = size=21 { [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] = '!' } } } }
+// 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] = '!' } } }
 
 // lldb-command:v l
 // lldb-check:(core::result::Result<u32, msvc_pretty_enums::Empty>) l = { value = { 0 = {} } }
diff --git a/tests/debuginfo/pretty-std.rs b/tests/debuginfo/pretty-std.rs
index d7c640a5bea..53835d41be2 100644
--- a/tests/debuginfo/pretty-std.rs
+++ b/tests/debuginfo/pretty-std.rs
@@ -51,7 +51,8 @@
 // lldb-check:[...] str_slice = "IAMA string slice!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = ' ' [12] = 's' [13] = 'l' [14] = 'i' [15] = 'c' [16] = 'e' [17] = '!' }
 
 // lldb-command:v string
-// lldb-check:[...] string = "IAMA string!" { vec = size=12 { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = '!' } }
+// lldb-check:[...] string = "IAMA string!" { [0] = 'I' [1] = 'A' [2] = 'M' [3] = 'A' [4] = ' ' [5] = 's' [6] = 't' [7] = 'r' [8] = 'i' [9] = 'n' [10] = 'g' [11] = '!' }
+
 
 // lldb-command:v some
 // lldb-check:[...] some = Some(8)
diff --git a/tests/debuginfo/strings-and-strs.rs b/tests/debuginfo/strings-and-strs.rs
index 3d6589db34b..ffdad303d51 100644
--- a/tests/debuginfo/strings-and-strs.rs
+++ b/tests/debuginfo/strings-and-strs.rs
@@ -24,7 +24,7 @@
 // === LLDB TESTS ==================================================================================
 // lldb-command:run
 // lldb-command:v plain_string
-// lldb-check:(alloc::string::String) plain_string = "Hello" { vec = size=5 { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' } }
+// lldb-check:(alloc::string::String) plain_string = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' }
 
 // lldb-command:v plain_str
 // lldb-check:(&str) plain_str = "Hello" { [0] = 'H' [1] = 'e' [2] = 'l' [3] = 'l' [4] = 'o' }