forked from qt-creator/qt-creator
Cdb: Fix Qt4 QMap dumper
The expanding depth of variables is limited in cdb. Instead of expanding the linked list inside qmap add a new symbol for each child node. Task-number: QTCREATORBUG-16212 Change-Id: I89a288c92d9168a54afcf2cdb8c8b8a6dd98a3b4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -139,12 +139,7 @@ SymbolGroupValue SymbolGroupValue::addSymbolForAncestor(const std::string &ances
|
||||
const SymbolAncestorInfo info = infoOfAncestor(ancestorName);
|
||||
if (info.isValid()) {
|
||||
const ULONG64 base = isPointerType(type()) ? pointerValue() : address();
|
||||
const std::string &pointerToType =
|
||||
pointedToSymbolName(base + info.offset, stripClassPrefixes(info.type));
|
||||
if (SymbolGroupNode *ancestorNode =
|
||||
node()->symbolGroup()->addSymbol(module(), pointerToType, "", "", &std::string())) {
|
||||
return SymbolGroupValue(ancestorNode, m_context);
|
||||
}
|
||||
return addSymbol(base + info.offset, stripClassPrefixes(info.type));
|
||||
}
|
||||
if (isValid() && SymbolGroupValue::verbose) { // Do not report subsequent errors
|
||||
DebugPrint dp;
|
||||
@@ -221,6 +216,22 @@ SymbolAncestorInfo SymbolGroupValue::infoOfAncestor(const std::string &name) con
|
||||
return info;
|
||||
}
|
||||
|
||||
SymbolGroupValue SymbolGroupValue::addSymbol(const ULONG64 address, const std::string &type) const
|
||||
{
|
||||
const std::string &pointerToType = pointedToSymbolName(address, type);
|
||||
if (SymbolGroupNode *ancestorNode =
|
||||
node()->symbolGroup()->addSymbol(module(), pointerToType, "", "", &std::string())) {
|
||||
return SymbolGroupValue(ancestorNode, m_context);
|
||||
}
|
||||
if (isValid() && SymbolGroupValue::verbose) { // Do not report subsequent errors
|
||||
DebugPrint dp;
|
||||
dp << this->name() << "::addSymbol(\"" << address << "\", \"" << address << "\") failed. ";
|
||||
formatNodeError(m_node, dp);
|
||||
}
|
||||
return SymbolGroupValue(m_errorMessage);
|
||||
|
||||
}
|
||||
|
||||
unsigned SymbolGroupValue::childCount() const
|
||||
{
|
||||
if (ensureExpanded())
|
||||
|
||||
Reference in New Issue
Block a user