Commit 1910fe91 authored by hjk's avatar hjk
Browse files

Debugger: Add dumper for boost::container::list



Change-Id: I251a859ca63bf932cb0d22ef11b5492b75ebcadd
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 0962c0b0
......@@ -95,6 +95,21 @@ def qdump__boost__shared_ptr(d, value):
d.putIntItem("usecount", usecount)
def qdump__boost__container__list(d, value):
r = value["members_"]["m_icont"]["data_"]["root_plus_size_"]
n = toInteger(r["size_"])
d.putItemCount(n)
d.putNumChild(n)
if d.isExpanded():
innerType = d.templateArgument(value.type, 0)
offset = 2 * d.ptrSize()
with Children(d, n):
p = r["root_"]["next_"]
for i in xrange(n):
d.putSubItem("%s" % i, d.createValue(d.pointerValue(p) + offset, innerType))
p = p["next_"]
def qdump__boost__gregorian__date(d, value):
d.putValue(int(value["days_"]), JulianDate)
d.putNumChild(0)
......
......@@ -4887,6 +4887,18 @@ GdbEngine
+ Check("p3", "Thu Jan 1 00:00:00 1970", "boost::posix_time::ptime");
QTest::newRow("BoostList")
<< Data("#include <boost/container/list.hpp>\n",
"typedef std::pair<int, double> p;\n"
"boost::container::list<p> l;\n"
"l.push_back(p(13, 61));\n"
"l.push_back(p(14, 64));\n"
"l.push_back(p(15, 65));\n"
"l.push_back(p(16, 66));\n")
+ BoostProfile()
+ Check("l", "<4 items>", "boost::container::list<std::pair<int,double>>")
+ Check("l.2.second", "65", "double");
// // This tests qdump__KRBase in share/qtcreator/debugger/qttypes.py which uses
// // a static typeflag to dispatch to subclasses");
......
Supports Markdown
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