[Lldb-commits] [lldb] [lldb][test] Add tests for target.max-string-summary-length setting (PR #77920)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 12 04:53:23 PST 2024


================
@@ -295,6 +295,23 @@ def cleanup():
             substrs=["e_2", "n_2", "r_2", "i_2", "k_2", "o_2"],
         )
 
+        self.runCmd("settings set target.max-string-summary-length 5")
+        some_string = self.frame().FindVariable('some_string')
+        some_string_summary = some_string.GetSummary()
+        self.assertEqual(some_string_summary, '"01234"...')
+
+        some_carr = self.frame().FindVariable('some_carr')
+        some_carr_summary = some_carr.GetSummary()
+        self.assertEqual(some_carr_summary, '"01234"...')
+
+        # FIXME: c-strings should honor the target.max-string-summary-length
----------------
Michael137 wrote:

@JDevlieghere @DavidSpickett @jasonmolenda 
Not 100% this is expected or not. Added a fixme for now

https://github.com/llvm/llvm-project/pull/77920


More information about the lldb-commits mailing list