Commit 790b9763 authored by David Schulz's avatar David Schulz Committed by hjk

Cdbext: remove the depth limitation of symbol dump.

This allows us to print expanded locals and expressions hierarchys
while stepping through the source.

Change-Id: I0971cadfd0eed807ae2d3f9fd21bff48daad5175
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent fd43080c
......@@ -1659,14 +1659,6 @@ SymbolGroupNodeVisitor::VisitResult
return VisitSkipChildren;
if (node->testFlags(SymbolGroupNode::AdditionalSymbol) && !node->testFlags(SymbolGroupNode::WatchNode))
return VisitSkipChildren;
// Recurse to children only if expanded by explicit watchmodel request
// and initialized.
bool visitChildren = depth < 1; // Report only one level for Qt Creator.
// Visit children of a SymbolGroupNode only if not expanded by its dumpers.
if (visitChildren)
if (const SymbolGroupNode *realNode = node->resolveReference()->asSymbolGroupNode())
if (!realNode->isExpanded() || realNode->testFlags(SymbolGroupNode::Uninitialized|SymbolGroupNode::ExpandedByDumper))
visitChildren = false;
// Comma between same level children given obscured children
if (depth == m_lastDepth)
m_os << ',';
......@@ -1679,16 +1671,28 @@ SymbolGroupNodeVisitor::VisitResult
m_os << '{';
const int childCount = node->dump(m_os, fullIname, m_parameters, m_context);
m_os << ",numchild=\"" << childCount << '"';
if (!childCount)
visitChildren = false;
if (visitChildren) { // open children array
m_os << ",children=[";
} else { // No children, close array.
m_os << '}';
if (childCount) {
// Recurse to children only if expanded by explicit watchmodel request
// and initialized.
// Visit children of a SymbolGroupNode only if not expanded by its dumpers.
bool skipit = false;
if (const SymbolGroupNode *realNode = node->resolveReference()->asSymbolGroupNode()) {
if (!realNode->isExpanded() || realNode->testFlags(SymbolGroupNode::Uninitialized | SymbolGroupNode::ExpandedByDumper))
skipit = true;
}
if (!skipit) {
m_os << ",children=[";
if (m_parameters.humanReadable())
m_os << '\n';
return VisitContinue;
}
}
// No children, close array.
m_os << '}';
if (m_parameters.humanReadable())
m_os << '\n';
return visitChildren ? VisitContinue : VisitSkipChildren;
return VisitSkipChildren;
}
void DumpSymbolGroupNodeVisitor::childrenVisited(const AbstractSymbolGroupNode *n, unsigned)
......
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