diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterStdVector.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterStdVector.py index d4da60f86a315..af857d51b3d24 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterStdVector.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/TestDataFormatterStdVector.py @@ -9,6 +9,8 @@ class StdVectorDataFormatterTestCase(TestBase): + TEST_WITH_PDB_DEBUG_INFO = True + def check_numbers(self, var_name, show_ptr=False): patterns = [] substrs = [ @@ -107,18 +109,23 @@ def cleanup(): ) # check access to synthetic children + int_vect = ( + "std::vector>" + if self.getDebugInfo() == "pdb" + else "int_vect" + ) self.runCmd( - 'type summary add --summary-string "item 0 is ${var[0]}" std::int_vect int_vect' + f'type summary add --summary-string "item 0 is ${{var[0]}}" std::int_vect "{int_vect}"' ) self.expect("frame variable numbers", substrs=["item 0 is 1"]) self.runCmd( - 'type summary add --summary-string "item 0 is ${svar[0]}" std::int_vect int_vect' + f'type summary add --summary-string "item 0 is ${{svar[0]}}" "std::int_vect" "{int_vect}"' ) self.expect("frame variable numbers", substrs=["item 0 is 1"]) # move on with synths self.runCmd("type summary delete std::int_vect") - self.runCmd("type summary delete int_vect") + self.runCmd(f'type summary delete "{int_vect}"') # add some more data lldbutil.continue_to_breakpoint(process, bkpt) @@ -143,8 +150,13 @@ def cleanup(): self.expect("expression strings", substrs=["goofy", "is", "smart"]) # test summaries based on synthetic children + string_vect = ( + "std::vector, std::allocator>, std::allocator, std::allocator>>>" + if self.getDebugInfo() == "pdb" + else "string_vect" + ) self.runCmd( - 'type summary add std::string_vect string_vect --summary-string "vector has ${svar%#} items" -e' + f'type summary add std::string_vect "{string_vect}" --summary-string "vector has ${{svar%#}} items" -e' ) self.expect( "frame variable strings",