diff --git a/share/qtcreator/debugger/libcpp_stdtypes.py b/share/qtcreator/debugger/libcpp_stdtypes.py index 2f0f45aa67a..c550d978302 100644 --- a/share/qtcreator/debugger/libcpp_stdtypes.py +++ b/share/qtcreator/debugger/libcpp_stdtypes.py @@ -22,7 +22,8 @@ # 3. Note that sometimes the size of `std::pmr::polymorphic_allocator` is bizarrely reported # as exactly 0, for example this happens with # `std::__1::pmr::polymorphic_allocator>` from `std::pmr::map`, -# so dumping pmr containers still may still have some breakages for libcxx +# so dumping pmr containers still may still have some breakages for libcxx. +# Also see QTCREATORBUG-32455. from stdtypes import qdump__std__array, qdump__std__complex, qdump__std__once_flag, qdump__std__unique_ptr, qdumpHelper__std__deque__libcxx, qdumpHelper__std__vector__libcxx, qdump__std__forward_list from utils import DisplayFormat diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 180fb514a2d..0b32a459f99 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -5107,8 +5107,8 @@ void tst_Dumpers::dumper_data() + Check("map5.0", "[0] 12", "42", "") + Check("map6", "<1 items>", "std::map") - // LLDB bridge reports incorrect alignment for `std::string` (1 instead of 8) - // causing this check to fail. + // QTCREATORBUG-32455: LLDB bridge reports incorrect alignment for `std::string` + // so we end up reading garbage. + Check("map6.0", "[0] 12", "\"42\"", "") % NoLldbEngine; @@ -6044,8 +6044,12 @@ void tst_Dumpers::dumper_data() {"a.b", "43", "int"}}) // CDB, old GDB + CheckSet({{"a.#1.i", "42", "int"}, {"a.i", "42", "int"}}) + // QTCREATORBUG-32455: LLDB bridge gets confused when there are multiple + // unnamed structs around. Here it is somewhat stubborn and says + // that `a.#2` is the same as the currently active `a.#1` + // and so there is no `a.#2.f`, only `a.#2.b` and `a.#2.i` + CheckSet({{"a.#2.f", ff, "float"}, - {"a.f", ff, "float"}}); + {"a.f", ff, "float"}}) % NoLldbEngine; QTest::newRow("Chars") @@ -7613,24 +7617,26 @@ void tst_Dumpers::dumper_data() "&m, &it") + Check("m", "<2 items>", TypeDef("std::map>","map_t")) - + Check("m.0.first", "\"one\"", "std::string") - + Check("m.0.second", "<3 items>", "std::list") - + Check("m.0.second.0", "[0]", "\"a\"", "std::string") - + Check("m.0.second.1", "[1]", "\"b\"", "std::string") - + Check("m.0.second.2", "[2]", "\"c\"", "std::string") - + Check("m.1.first", "\"two\"", "std::string") - + Check("m.1.second", "<3 items>", "std::list") - + Check("m.1.second.0", "[0]", "\"1\"", "std::string") - + Check("m.1.second.1", "[1]", "\"2\"", "std::string") - + Check("m.1.second.2", "[2]", "\"3\"", "std::string") + // QTCREATORBUG-32455: LLDB bridge misreports alignment of `std::string` and `std::list` + // so we end up reading garbage + + Check("m.0.first", "\"one\"", "std::string") % NoLldbEngine + + Check("m.0.second", "<3 items>", "std::list") % NoLldbEngine + + Check("m.0.second.0", "[0]", "\"a\"", "std::string") % NoLldbEngine + + Check("m.0.second.1", "[1]", "\"b\"", "std::string") % NoLldbEngine + + Check("m.0.second.2", "[2]", "\"c\"", "std::string") % NoLldbEngine + + Check("m.1.first", "\"two\"", "std::string") % NoLldbEngine + + Check("m.1.second", "<3 items>", "std::list") % NoLldbEngine + + Check("m.1.second.0", "[0]", "\"1\"", "std::string") % NoLldbEngine + + Check("m.1.second.1", "[1]", "\"2\"", "std::string") % NoLldbEngine + + Check("m.1.second.2", "[2]", "\"3\"", "std::string") % NoLldbEngine + Check("it", AnyValue, TypeDef("std::_Tree_const_iterator>>>>", "std::map >::const_iterator")) - + CheckSet({{"it.first", "\"one\"", "std::string"}, // NoCdbEngine - {"it.0.first", "\"one\"", "std::string"}}) // CdbEngine + + CheckSet({{"it.first", "\"one\"", "std::string"}, // NoCdbEngine + {"it.0.first", "\"one\"", "std::string"}}) % NoLldbEngine // CdbEngine + CheckSet({{"it.second", "<3 items>", "std::list"}, - {"it.0.second", "<3 items>", "std::list"}}); + {"it.0.second", "<3 items>", "std::list"}}) % NoLldbEngine; QTest::newRow("Varargs") @@ -7840,7 +7846,7 @@ void tst_Dumpers::dumper_data() "&v, &n") + Check("v", "", "{...}") % GdbEngine - + Check("v", "", TypePattern(".*anonymous .*")) % LldbEngine + + Check("v", "", TypePattern(".*unnamed .*")) % LldbEngine + Check("v", "", TypePattern(".*", "std::pmr::unordered_multiset"} % NoGdbEngine + Check{"ums", "<10 items>", "std::pmr::unordered_multiset"} % GdbEngine - // There is a bizzare interaction of `DumperBase.Type.size` (see Python scripts) and libcxx - // that results in the size of + // QTCREATORBUG-32455: there is a bizzare interaction of `DumperBase.Type.size` + // (see Python scripts) and libcxx that results in the size of // `std::__1::pmr::polymorphic_allocator>` // from `std::pmr::map` being reported as exactly 0 which breaks dumping + Check{"m", "<10 items>", "std::pmr::map"} % CdbEngine