================
@@ -19,6 +19,21 @@ def getFormatted(self, format, expr):
         self.assertTrue(result.Succeeded(), result.GetError())
         return result.GetOutput()
 
+    @no_debug_info_test
+    @skipIfWindows
+    def testAllPlatforms(self):
+        self.build()
+        lldbutil.run_to_source_breakpoint(
+            self, "// break here", lldb.SBFileSpec("main.cpp")
+        )
+        # We can dump correctly non char* c-strings with explicit formatting.
+        self.assertIn(' = ""', self.getFormatted("c-string", 
"void_empty_cstring"))
----------------
clayborg wrote:

Do we want to do this via the API? Something like:
```
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, "// 
break here", lldb.SBFileSpec("main.cpp"))
frame = thread.GetFrameAtIndex(0)
v = frame.FindVariable('void_empty_cstring')
self.assertEq(v.GetSummary(), '')
v = frame.FindVariable('empty_cstring')
self.assertEq(v.GetSummary(), '')
```

https://github.com/llvm/llvm-project/pull/68924
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to