[nemiver] Fix "restart loosing inferior argument" bug
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Fix "restart loosing inferior argument" bug
- Date: Wed, 9 Oct 2013 07:48:44 +0000 (UTC)
commit fd3141abba23d60039f3ea75f1870e56b1ec7d5e
Author: Dodji Seketeli <dodji seketeli org>
Date: Wed Oct 9 02:45:03 2013 +0200
Fix "restart loosing inferior argument" bug
* src/dbgengine/nmv-gdb-engine.cc (GDBEngine::load_program): Do
not reset the command queue *after* launching a fresh GDB. That
might drop many useful commands sent to the new GDB instance and
thus make us loose important information such as the arguments to
the inferior. Rather, reset the command queue before launching a
fresh new GDB.
src/dbgengine/nmv-gdb-engine.cc | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index cf0d4b7..b4a12fa 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -3207,6 +3207,13 @@ GDBEngine::load_program (const UString &a_prog,
m_priv->tty_fd = a_slave_tty_fd;
m_priv->get_tty_attributes ();
+ // In case we are restarting GDB after a crash, the command
+ // queue might be stuck. Let's restart it.
+ if (a_force) {
+ LOG_DD ("Reset command queue");
+ m_priv->reset_command_queue ();
+ }
+
if (m_priv->launch_gdb_and_set_args (a_working_dir,
a_source_search_dirs,
a_prog, a_argv,
@@ -3215,13 +3222,6 @@ GDBEngine::load_program (const UString &a_prog,
m_priv->uses_launch_tty = a_uses_launch_tty;
- // In case we are restarting GDB after a crash, the command
- // queue might be stuck. Let's restart it.
- if (a_force) {
- LOG_DD ("Reset command queue");
- m_priv->reset_command_queue ();
- }
-
queue_command (Command ("load-program",
"set breakpoint pending on"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]