diff --git a/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp b/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp --- a/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp +++ b/libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp @@ -383,6 +383,10 @@ ComparePrettyPrintToChars(prime_pairs, "std::set with 2 elements = {" "{first = 3, second = 5}, {first = 5, second = 7}}"); + + using using_set = std::set; + using_set other{1, 2, 3}; + ComparePrettyPrintToChars(other, "std::set with 3 elements = {1, 2, 3}"); } void stack_test() { diff --git a/libcxx/utils/gdb/libcxx/printers.py b/libcxx/utils/gdb/libcxx/printers.py --- a/libcxx/utils/gdb/libcxx/printers.py +++ b/libcxx/utils/gdb/libcxx/printers.py @@ -698,7 +698,7 @@ def _init_cast_type(self, val_type): map_it_type = gdb.lookup_type( - str(val_type) + "::iterator").strip_typedefs() + str(val_type.strip_typedefs()) + "::iterator").strip_typedefs() tree_it_type = map_it_type.template_argument(0) node_ptr_type = tree_it_type.template_argument(1) return node_ptr_type @@ -717,7 +717,7 @@ def _init_cast_type(self, val_type): set_it_type = gdb.lookup_type( - str(val_type) + "::iterator").strip_typedefs() + str(val_type.strip_typedefs()) + "::iterator").strip_typedefs() node_ptr_type = set_it_type.template_argument(1) return node_ptr_type