OSDN Git Service

Debugger[CDB]: Fix console on Windows XP.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 12 May 2011 15:19:42 +0000 (17:19 +0200)
committerhjk <qtc-committer@nokia.com>
Mon, 16 May 2011 10:32:51 +0000 (12:32 +0200)
Attach to suspended application and doing resume manually
does not work. Use special options for console.

Reviewed-by: hjk
Tested-by: Alessandro Portale <alessandro.portale@nokia.com>
src/plugins/debugger/cdb/cdbengine.cpp

index 083e004..1ab00a7 100644 (file)
@@ -742,8 +742,12 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
     case AttachExternal:
     case AttachCrashedExternal:
         arguments << QLatin1String("-p") << QString::number(sp.attachPID);
-        if (sp.startMode == AttachCrashedExternal)
+        if (sp.startMode == AttachCrashedExternal) {
             arguments << QLatin1String("-e") << sp.crashParameter << QLatin1String("-g");
+        } else {
+            if (isConsole(startParameters()))
+                arguments << QLatin1String("-pr") << QLatin1String("-pb");
+        }
         break;
     default:
         *errorMessage = QString::fromLatin1("Internal error: Unsupported start mode %1.").arg(sp.startMode);
@@ -812,9 +816,6 @@ void CdbEngine::runEngine()
 {
     if (debug)
         qDebug("runEngine");
-    // Resume the threads frozen by the console stub.
-    if (isConsole(startParameters()))
-        postCommand("~* m", 0);
     foreach (const QString &breakEvent, m_options->breakEvents)
             postCommand(QByteArray("sxe ") + breakEvent.toAscii(), 0);
     postCommand("g", 0);