[nemiver/follow-fork-mode: 27/35] refactor session cleaning actions for new inferior



commit e972ab232f2c5571e116a53adf371f86077cfade
Author: Dodji Seketeli <dodji gnome org>
Date:   Mon Apr 26 19:18:06 2010 +0200

    refactor session cleaning actions for new inferior
    
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::execute_program): Factorize session cleaning
    	actions when starting a new inferior.

 src/persp/dbgperspective/nmv-dbg-perspective.cc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 2262a8f..7304d86 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -6483,8 +6483,8 @@ DBGPerspective::execute_program
                                 : true;
     LOG_DD ("is new prog: " << is_new_program);
 
-    // delete old breakpoints, if any.
     if (is_new_program) {
+        // delete old breakpoints, if any.
         map<int, IDebugger::Breakpoint>::const_iterator bp_it;
         for (bp_it = m_priv->breakpoints.begin ();
              bp_it != m_priv->breakpoints.end ();
@@ -6494,16 +6494,16 @@ DBGPerspective::execute_program
                                 (bp_it->first,
                                  I_DEBUGGER_COOKIE_EXECUTE_PROGRAM);
         }
-    }
 
-    // If we are debugging a new program,
-    // clear data gathered by the old session
-    if (is_new_program)
+        // If we are debugging a new program,
+        // clear data gathered by the old session
         clear_session_data ();
+    }
 
     clear_status_notebook ();
 
     LOG_DD ("load program");
+
     // now really load the inferior program (i.e: the one to be debugged)
     dbg_engine->load_program (prog, a_args, a_cwd, source_search_dirs,
                               get_terminal_name ());



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