[nemiver] 689575 - Freeze when local variable values are refreshed



commit 330dde537dc7b13893c483a3769d101508bec3db
Author: Dodji Seketeli <dodji seketeli org>
Date:   Sun Jan 13 16:21:15 2013 +0100

    689575 - Freeze when local variable values are refreshed
    
    	* src/dbgengine/nmv-gdb-engine.cc
    	(OnListChangedVariableHandler::do_handle): Avoid quadratic
    	updating of the changed sub-variables of a given variable by
    	giving VarChange::apply_to_variable a last argument that is always
    	an empty list.

 src/dbgengine/nmv-gdb-engine.cc |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index aafe35d..f51bafd 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -2997,9 +2997,7 @@ struct OnListChangedVariableHandler : public OutputHandler
             a_in.output ().result_record ().var_changes ();
 
         IDebugger::VariableSafePtr variable = a_in.command ().variable ();
-        // This contains the sub-variables of 'variable' that changed,
-        // as well as 'variable' itself.
-        list<VariableSafePtr> changed_sub_vars;        
+
         // Each element of var_changes is either a change of variable
         // itself, or a change of one its children.  So apply those
         // changes to variable so that it reflects its new state, and
@@ -3008,6 +3006,9 @@ struct OnListChangedVariableHandler : public OutputHandler
         for (list<VarChangePtr>::const_iterator i = var_changes.begin ();
              i != var_changes.end ();
              ++i) {
+            // This contains the sub-variables of 'variable' that changed,
+            // as well as 'variable' itself.
+            list<VariableSafePtr> changed_sub_vars;
             // Apply each variable change to variable.  The result is
             // going to be a list of VariableSafePtr (variable itself,
             // as well as each sub-variable that got changed) that is



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]