[nemiver] Avoid gratuitously resetting the dbg command queue



commit 18ca4015ad1437a4667b32e64851691d00257b21
Author: Dodji Seketeli <dodji seketeli org>
Date:   Thu Jun 9 01:44:18 2011 +0200

    Avoid gratuitously resetting the dbg command queue
    
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::execute_program): Don't reset the command queue
    	here, as we don't mean to re-start the inferior at this point.

 src/persp/dbgperspective/nmv-dbg-perspective.cc |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 7d67c56..c6f8e80 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -586,7 +586,7 @@ public:
                           const map<UString, UString> &a_env,
                           const UString &a_cwd,
                           const vector<IDebugger::Breakpoint> &a_breaks,
-                          bool a_restarting = true,
+                          bool a_restarting = false,
                           bool a_close_opened_files = false);
 
     void attach_to_program ();
@@ -6098,7 +6098,9 @@ DBGPerspective::execute_program ()
     map<UString, UString> env = dialog.environment_variables();
 
     vector<IDebugger::Breakpoint> breaks;
-    execute_program (prog, args, env, cwd, breaks, true, true);
+    execute_program (prog, args, env, cwd, breaks,
+                     /*a_restarting=*/true,
+                     /*a_close_opened_files=*/true);
     m_priv->reused_session = false;
 }
 
@@ -6164,6 +6166,8 @@ DBGPerspective::restart_local_inferior ()
     }
 }
 
+/// Execute a program for the first time.  Do not use this to restart
+/// an existing program; rather, use restart_inferior for that.
 void
 DBGPerspective::execute_program (const UString &a_prog,
                                  const vector<UString> &a_args,
@@ -6173,7 +6177,7 @@ DBGPerspective::execute_program (const UString &a_prog,
 {
     vector<IDebugger::Breakpoint> bps;
     execute_program (a_prog, a_args, a_env,
-                     a_cwd, bps, true,
+                     a_cwd, bps, /*a_restarting=*/false,
                      a_close_opened_files);
 }
 



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