[nemiver/varobjs-support] Make graphical variable finding be recursive
- From: Dodji Seketeli <dodji src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver/varobjs-support] Make graphical variable finding be recursive
- Date: Sun, 12 Apr 2009 16:51:26 -0400 (EDT)
commit 53dbcdd3f18807bd48c6d405bbce55928ac82ec4
Author: Dodji Seketeli <dodji redhat com>
Date: Sun Apr 12 22:09:27 2009 +0200
Make graphical variable finding be recursive
* src/persp/dbgperspective/nmv-variables-utils.cc:
(find_a_variable): Make the find be recursive, depth first.
This way, this function can now find variable members as well.
At the same time, don't error when we find an empty variable.
Empty (dummy) variables can now exist in the tree. They exist when
the parent variable node needs to be unfolded, but hasn't been
unfolded yet. In that case, the parent node has a dummy (empty)
variable that is there just so that an expander appears on the
parent node, inviting the user to unfold it. Then, the UI can catch
the node expansion event and sneak in the proper children node.
---
src/persp/dbgperspective/nmv-variables-utils.cc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/persp/dbgperspective/nmv-variables-utils.cc b/src/persp/dbgperspective/nmv-variables-utils.cc
index d677fd7..457b7a4 100644
--- a/src/persp/dbgperspective/nmv-variables-utils.cc
+++ b/src/persp/dbgperspective/nmv-variables-utils.cc
@@ -170,13 +170,15 @@ find_a_variable (const IDebugger::VariableSafePtr a_var,
++row_it) {
var = row_it->get_value (get_variable_columns ().variable);
if (!var) {
- LOG_ERROR ("hit a null variable");
+ LOG_DD ("hit a null variable");
continue;
}
LOG_DD ("reading var: " << var->name ());
if (var->name ().raw () == a_var->name ().raw ()) {
a_out_row_it = row_it;
return true;
+ } else if (find_a_variable (a_var, row_it, a_out_row_it)) {
+ return true;
}
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]