Re: [PATCH] Fix IDebugger state after loading a program
- From: Dodji Seketeli <dodji seketeli org>
- To: The mailing list of the Nemiver project <nemiver-list gnome org>
- Subject: Re: [PATCH] Fix IDebugger state after loading a program
- Date: Sun, 23 Jun 2013 13:34:58 +0200
Hello Fabien,
Fabien Parent <parent f gmail com> a écrit:
* src/dbgengine/nmv-gdb-engine.cc
(GDBEngine::load_program): After loading a program set
the IDebugger state to INFERIOR_LOADED instead of RUNNING.
Thank you for the patch.
I'd appreciate that you give more information about bad user experience
that you were experiencing due to this issue. What was happening?
Also, I kept meaning to add regression tests for this state management
thing. It's tricky and we don't have regression tests for it yet.
Do you think it'd be possible to write a little test, like e.g,
test-breakpoint.cc that only loads the mighty fooprog program and make
sure the IDebugger::state_changed_signal event gets fired appropriately
with the right state? That would make this commit completely neat.
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index cf0d4b7..96c27a3 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -3267,6 +3267,7 @@ GDBEngine::load_program (const UString &a_prog,
}
}
m_priv->set_tty_path (a_slave_tty_path, "load-program");
+ set_state(IDebugger::INFERIOR_LOADED);
return true;
}
The patch otherwise looks OK to me. I'd just like to hear about your
feedback to my comments above before committing.
Thank you again.
Cheers.
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]