nemiver r844 - in trunk: . src/persp/dbgperspective
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r844 - in trunk: . src/persp/dbgperspective
- Date: Thu, 19 Jun 2008 15:40:10 +0000 (UTC)
Author: dodji
Date: Thu Jun 19 15:40:10 2008
New Revision: 844
URL: http://svn.gnome.org/viewvc/nemiver?rev=844&view=rev
Log:
fix bug #499873 â Variable 'this' not found
* src/persp/dbgperspective/nmv-local-vars-inspector2.cc:
(Priv::re_init_tree_view()): don't forget to clean the
variable walkers as well as the widget. Otherwise, the content of
the walker won't reflect the content of the widget.
(Priv::on_func_arg_visited_signal()): when stepping in the same
function, while walking a function arguments variable, check if the
function args subtree (in the widget) is empty. If the subtree is
empty, append the variable the function arguments subtree.
Otherwise, if you try to 'update' an empty subtree, you will get an
error message saying "could not find variable in inspector: foo".
The root reason why the subtree is empty in the first place, is that
it must be populated by a call to debugger->list_frames_arguments().
Problem is that for some unknown reason, that call fails often, due
do GDB suckage.
This should fix bug #499873 â Variable 'this' not found.
Modified:
trunk/ChangeLog
trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc
Modified: trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc (original)
+++ trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc Thu Jun 19 15:40:10 2008
@@ -132,6 +132,10 @@
LOG_FUNCTION_SCOPE_NORMAL_DD;
THROW_IF_FAIL (tree_store);
tree_store->clear ();
+ IVarListWalkerSafePtr walker_list = get_local_vars_walker_list ();
+ walker_list->remove_variables ();
+ walker_list = get_function_args_vars_walker_list ();
+ walker_list->remove_variables ();
previous_function_name = "";
is_new_frame = true;
@@ -167,13 +171,22 @@
}
- void get_function_arguments_row_iterator (Gtk::TreeModel::iterator &a_it)
+ void get_function_arguments_row_iterator
+ (Gtk::TreeModel::iterator &a_it) const
{
THROW_IF_FAIL (function_arguments_row_ref);
a_it = tree_store->get_iter
(function_arguments_row_ref->get_path ());
}
+ bool is_function_arguments_subtree_empty () const
+ {
+ Gtk::TreeModel::iterator it;
+
+ get_function_arguments_row_iterator (it);
+ return it->children ().empty ();
+ }
+
void get_local_variables_row_iterator (Gtk::TreeModel::iterator &a_it)
{
THROW_IF_FAIL (local_variables_row_ref);
@@ -642,9 +655,16 @@
THROW_IF_FAIL (a_walker->get_variable ());
if (is_new_frame) {
+ LOG_DD ("appending an argument to substree");
append_a_function_argument (a_walker->get_variable ());
} else {
- update_a_function_argument (a_walker->get_variable ());
+ if (is_function_arguments_subtree_empty ()) {
+ LOG_DD ("appending an argument to substree");
+ append_a_function_argument (a_walker->get_variable ());
+ } else {
+ LOG_DD ("updating an argument in substree");
+ update_a_function_argument (a_walker->get_variable ());
+ }
}
NEMIVER_CATCH
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]