make attaching adapters more robust

to make the behavior consistent across gdb versions, ignore the initial
*stopped which gdb7 delivers while attaching.

Reviewed-By: hjk
This commit is contained in:
Oswald Buddenhagen
2009-10-30 17:40:29 +01:00
parent 36a4fddaf0
commit 9d20a2abb4
5 changed files with 15 additions and 19 deletions

View File

@@ -191,8 +191,9 @@ void RemoteGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
void RemoteGdbAdapter::handleTargetRemote(const GdbResponse &record)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (record.resultClass == GdbResultDone) {
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
setState(InferiorStopped);
// gdb server will stop the remote application itself.
debugMessage(_("INFERIOR STARTED"));
showStatusMessage(msgAttachedToStoppedInferior());