Commit 26b51e16 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Fix compilation & test results of C++-library dumpers.

Fix  breakage resulting from 3d852917187e29892529ab51d24c1a1177068a88
(Qt 4.7), remove obsolete 'saddr'-element.
parent 3d9cd608
#define private public // Give us access to private 'backward' member of QMapNode.
# include <QtCore/QMap>
#undef private
#include "gdb/gdbmi.h"
#include "gdbmacros.h"
#include "gdbmacros_p.h"
......@@ -1243,9 +1247,8 @@ template <typename T>
const QString typeStr = stripPtrType(typeToString<T>());
const QByteArray addrStr = valToString(curElem);
if (curElem != 0) {
expected.append("addr='").append(addrStr).append("',saddr='").
append(addrStr).append("',type='").append(typeStr).
append("',value='").
expected.append("addr='").append(addrStr).append("',type='").
append(typeStr).append("',value='").
append(derefValToString(curElem)).append("'");
} else {
expected.append("addr='").append(ptrToBa(&curElem)).append("',type='").
......@@ -1413,9 +1416,9 @@ void tst_Debugger::dumpQList_int_star()
ilist.append(0);
testDumper("value='<2 items>',valueeditable='false',numchild='2',"
"internal='1',childtype='int*',childnumchild='1',children=["
"{saddr='" + str(&ilist.at(0)) + "',addr='" + str(deref(&ilist.at(0))) +
"{addr='" + str(deref(&ilist.at(0))) +
"',type='int',value='1'},"
"{saddr='" + str(&ilist.at(1)) + "',value='<null>',numchild='0'}]",
"{value='<null>',numchild='0'}]",
&ilist, NS"QList", true, "int*");
}
......@@ -2314,15 +2317,13 @@ void tst_Debugger::dumpStdVector()
vector.push_back(new std::list<int>(list));
testDumper("value='<1 items>',valueeditable='false',numchild='1',"
"childtype='" + inner + "',childnumchild='1',"
"children=[{addr='" + str(deref(&vector[0])) + "',"
"saddr='" + str(deref(&vector[0])) + "',type='" + innerp + "'}]",
"children=[{addr='" + str(deref(&vector[0])) + "',type='" + innerp + "'}]",
&vector, "std::vector", true, inner, "", sizeof(std::list<int> *));
vector.push_back(0);
list.push_back(45);
testDumper("value='<2 items>',valueeditable='false',numchild='2',"
"childtype='" + inner + "',childnumchild='1',"
"children=[{addr='" + str(deref(&vector[0])) + "',"
"saddr='" + str(deref(&vector[0])) + "',type='" + innerp + "'},"
"children=[{addr='" + str(deref(&vector[0])) + "',type='" + innerp + "'},"
"{addr='" + str(&vector[1]) + "',"
"type='" + innerp + "',value='<null>',numchild='0'}]",
&vector, "std::vector", true, inner, "", sizeof(std::list<int> *));
......
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