Commit 8cbcc3f0 authored by hjk's avatar hjk

Debugger: Fix std::{shared,unique}_ptr display

Regression in 3.0.

Change-Id: I8772176dc6ed75fb0f9c976632defacebe9d3589
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent ab10ac13
......@@ -337,7 +337,7 @@ def qdump__std__shared_ptr(d, value):
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), d.pointerValue(i)))
else:
i = expensiveDowncast(i)
i = d.expensiveDowncast(i)
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(3)
......@@ -376,7 +376,7 @@ def qdump__std__unique_ptr(d, value):
if d.isSimpleType(d.templateArgument(value.type, 0)):
d.putValue("%s @0x%x" % (i.dereference(), d.pointerValue(i)))
else:
i = expensiveDowncast(i)
i = d.expensiveDowncast(i)
d.putValue("@0x%x" % d.pointerValue(i))
d.putNumChild(1)
......
......@@ -2905,7 +2905,9 @@ void tst_Dumpers::dumper_data()
% Cxx11Profile()
% MacLibCppProfile()
% Check("pi", Pointer("32"), "std::unique_ptr<int, std::default_delete<int> >")
% Check("pf", Pointer(), "std::unique_ptr<Foo, std::default_delete<Foo> >");
% Check("pi.data", "32", "int")
% Check("pf", Pointer(), "std::unique_ptr<Foo, std::default_delete<Foo> >")
% CheckType("pf.data", "Foo");
QTest::newRow("StdSharedPtr")
<< Data("#include <memory>\n" + fooData,
......@@ -2915,7 +2917,11 @@ void tst_Dumpers::dumper_data()
% Cxx11Profile()
% MacLibCppProfile()
% Check("pi", Pointer("32"), "std::shared_ptr<int>")
% Check("pf", Pointer(), "std::shared_ptr<Foo>");
% Check("pi.data", "32", "int").setForGdbOnly()
% Check("pi.data", "32", "std::shared_ptr<int>::element_type").setForLldbOnly()
% Check("pf", Pointer(), "std::shared_ptr<Foo>")
% CheckType("pf.data", "Foo").setForGdbOnly()
% CheckType("pf.data", "std::shared_ptr<Foo>::element_type").setForLldbOnly();
QTest::newRow("StdSetInt")
<< Data("#include <set>\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment