Commit 6049e1fb authored by hjk's avatar hjk
Browse files

small dumper refactoring oin the way to "all dumper code in gdbmacros.cpp"

parent 4acbbe83
......@@ -2465,6 +2465,7 @@ void qDumpObjectData440(
"\""NS"QObjectSlot\","
"\""NS"QObjectSlotList\","
#endif // PRIVATE_OBJECT_ALLOWED
// << "\""NS"QRegion\","
"\""NS"QSet\","
"\""NS"QString\","
"\""NS"QStringList\","
......@@ -2480,7 +2481,6 @@ void qDumpObjectData440(
"\"std::string\","
"\"std::vector\","
"\"std::wstring\","
// << "\""NS"QRegion\","
"]";
d << ",namespace=\""NS"\"";
d.disarm();
......
......@@ -2961,11 +2961,11 @@ void GdbEngine::runCustomDumper(const WatchData & data0, bool dumpChildren)
// in rare cases we need more or less:
if (outertype == m_namespace + "QObject") {
extraArgs[extraArgCount++] = "(char*)&((('"
extraArgs[0] = "(char*)&((('"
+ m_namespace + "QObjectPrivate'*)&"
+ data.exp + ")->children)-(char*)&" + data.exp;
} else if (outertype == m_namespace + "QVector") {
extraArgs[extraArgCount++] = "(char*)&(("
extraArgs[1] = "(char*)&(("
+ data.exp + ").d->array)-(char*)" + data.exp + ".d";
} else if (outertype == m_namespace + "QObjectSlot"
|| outertype == m_namespace + "QObjectSignal") {
......@@ -2976,16 +2976,16 @@ void GdbEngine::runCustomDumper(const WatchData & data0, bool dumpChildren)
QString slotNumber = "-1";
if (lastOpened != -1 && lastClosed != -1)
slotNumber = data.iname.mid(lastOpened + 1, lastClosed - lastOpened - 1);
extraArgs[extraArgCount++] = slotNumber;
extraArgs[0] = slotNumber;
} else if (outertype == m_namespace + "QMap") {
QString nodetype = m_namespace + "QMapNode";
nodetype += data.type.mid(m_namespace.size() + 4);
//qDebug() << "OUTERTYPE: " << outertype << " NODETYPE: " << nodetype;
extraArgs[extraArgCount++] = sizeofTypeExpression(nodetype);
extraArgs[extraArgCount++] = "(size_t)&(('" + nodetype + "'*)0)->value";
extraArgs[2] = sizeofTypeExpression(nodetype);
extraArgs[3] = "(size_t)&(('" + nodetype + "'*)0)->value";
} else if (outertype == m_namespace + "QMapNode") {
extraArgs[extraArgCount++] = sizeofTypeExpression(data.type);
extraArgs[extraArgCount++] = "(size_t)&(('" + data.type + "'*)0)->value";
extraArgs[2] = sizeofTypeExpression(data.type);
extraArgs[3] = "(size_t)&(('" + data.type + "'*)0)->value";
} else if (outertype == "std::vector") {
//qDebug() << "EXTRACT TEMPLATE: " << outertype << inners;
if (inners.at(0) == "bool") {
......
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