KDE/kdevelop/debuggers/gdb
Niko Sams
niko.sams at gmail.com
Mon Oct 19 16:49:55 UTC 2009
While I understand the reason for this commit, it breaks to things:
* gdbtest fails because it waits for PausedState
* the continue/stop buttons are not disabled anymore while the
application is running
Any Ideas how we can solve this?
Niko
On Fri, Sep 11, 2009 at 18:50, Vladimir Prus <ghost at cs.msu.su> wrote:
> SVN commit 1022390 by vprus:
>
> Kill the s_appRunning state.
>
> For one thing, GDB in non-stop mode does not even have such
> a concept, as each thread can be run and stopped individually.
> Secondly, this is only used to display status messages, to
> a non-existent status bar.
>
>
> M +8 -7 debugsession.cpp
> M +1 -2 gdbglobal.h
>
>
> --- trunk/KDE/kdevelop/debuggers/gdb/debugsession.cpp #1022389:1022390
> @@ -215,6 +215,13 @@
> }
> }
>
> + // VP, 2009-9-11: temporary disabled because:
> + // - we don't have status bar at present
> + // - it's not clear how to display 'running/stopped' when
> + // we have non-stop
> + // A better general solution would be to keep running/stopped
> + // state for each thread in the framestack model.
> +#if 0
> if (changedState & s_appRunning) {
> if (newState & s_appRunning) {
> message = i18n("Application is running");
> @@ -241,6 +248,7 @@
> }
> }
> }
> +#endif
>
> // And now? :-)
> kDebug(9012) << "Debugger state: " << newState << ": ";
> @@ -281,9 +289,6 @@
> setStateOff(s_appNotStarted|s_programExited);
> setStateOn(s_attached);
>
> - //set current state to running, after attaching we will get *stopped response
> - setStateOn(s_appRunning);
> -
> if (stateIsOn(s_dbgNotStarted))
> startDebugger(0);
>
> @@ -678,7 +683,6 @@
> {
> /* By default, reload all state on program stop. */
> state_reload_needed = true;
> - setStateOff(s_appRunning);
>
> QString reason;
> if (r.hasField("reason")) reason = r["reason"].literal();
> @@ -857,7 +861,6 @@
> QString line = s.message;
> if (line.startsWith("Program terminated")) {
> //when examining core file
> - setStateOff(s_appRunning);
> setStateOn(s_appNotStarted|s_programExited);
> } else if (line.startsWith("The program no longer exists")
> || line.startsWith("Program exited"))
> @@ -1451,7 +1454,6 @@
> STATE_CHECK(s_shuttingDown);
> STATE_CHECK(s_explicitBreakInto);
> STATE_CHECK(s_dbgBusy);
> - STATE_CHECK(s_appRunning);
> #undef STATE_CHECK
>
> if (!found)
> @@ -1466,7 +1468,6 @@
>
> void DebugSession::programRunning()
> {
> - setStateOn(s_appRunning);
> raiseEvent(program_running);
> }
>
> --- trunk/KDE/kdevelop/debuggers/gdb/gdbglobal.h #1022389:1022390
> @@ -37,8 +37,7 @@
> s_shuttingDown = 4096,
> s_explicitBreakInto = (s_shuttingDown << 1),
> s_dbgBusy = (s_explicitBreakInto << 1),
> - s_appRunning = (s_dbgBusy << 1),
> - s_lastDbgState = (s_appRunning << 1)
> + s_lastDbgState = (s_dbgBusy << 1)
>
> };
>
>
More information about the KDevelop-devel
mailing list