aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2009-04-09 11:35:58 +0200
committerhjk <qtc-committer@nokia.com>2009-04-09 11:37:55 +0200
commit971c1999d2baf31dc3e1c28b0702ea84f4bb0a49 (patch)
treeae59287005223372c0a7e63503610ab26c5a0ba3
parentcb75dd05ea34e4554e2247bfca98e55f3c2d2e39 (diff)
debugger: provide an entry saying <no information> if an object has no
children (or no debug information available)
-rw-r--r--src/plugins/debugger/gdbengine.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/debugger/gdbengine.cpp b/src/plugins/debugger/gdbengine.cpp
index 9c52125b62..906b38a72b 100644
--- a/src/plugins/debugger/gdbengine.cpp
+++ b/src/plugins/debugger/gdbengine.cpp
@@ -3955,9 +3955,23 @@ void GdbEngine::handleVarListChildren(const GdbResultRecord &record,
foreach (const GdbMi &child, children.children())
handleVarListChildrenHelper(child, data);
- if (!isAccessSpecifier(data.variable.split('.').takeLast())) {
+ if (children.children().isEmpty()) {
+ // happens e.g. if no debug information is present or
+ // if the class really has no children
+ WatchData data1;
+ data1.iname = data.iname + ".child";
+ data1.value = tr("<no information>");
+ data1.childCount = 0;
+ data1.setAllUnneeded();
+ insertData(data1);
+ data.setAllUnneeded();
+ insertData(data);
+ } else if (!isAccessSpecifier(data.variable.split('.').takeLast())) {
data.setChildrenUnneeded();
insertData(data);
+ } else {
+ // this skips the spurious "public", "private" etc levels
+ // gdb produces
}
} else if (record.resultClass == GdbResultError) {
data.setError(record.data.findChild("msg").data());