diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2017-08-14 14:24:03 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-08-14 15:12:40 +0000 |
commit | 7ab6e345fe42608dcf26d5aac5a91dc31720baa0 (patch) | |
tree | e62b1761803707de464931ed010239a125d1636d | |
parent | 89dbe978b154774cb2781fe4b48da958fb53b05c (diff) |
Support debug requests from Task Manager
If debugging was started from Task Manager Windows does
not follow the format given in the registry but always uses
"<debugger> -p <pid>".
By ignoring the -p parameter and using "debug" instead of
"wincrashevent" we can also support this use case from QtC's
debugger.
The message which is shown in this case will be adapted as
soon as this change hits master but with the current approach
the situation is greatly improved for 4.4.
Task-number: QTCREATORBUG-18194
Change-Id: I871a19f0cd68f61337d1e6c224ecc3c22a02c989
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/tools/qtcdebugger/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/qtcdebugger/main.cpp b/src/tools/qtcdebugger/main.cpp index 6dee4d966f9..574edc5954e 100644 --- a/src/tools/qtcdebugger/main.cpp +++ b/src/tools/qtcdebugger/main.cpp @@ -102,6 +102,8 @@ static bool parseArguments(const QStringList &args, QString *errorMessage) optIsWow = true; } else if (arg == QLatin1String("nogui")) { noguiMode = true; + } else if (arg == QLatin1String("p")) { + // Ignore, see QTCREATORBUG-18194. } else { *errorMessage = QString::fromLatin1("Unexpected option: %1").arg(arg); return false; @@ -282,8 +284,13 @@ bool startCreatorAsDebugger(bool asClient, QString *errorMessage) // Send to running Creator: Unstable with directly linked CDB engine. if (asClient) args << QLatin1String("-client"); - args << QLatin1String("-wincrashevent") - << QString::fromLatin1("%1:%2").arg(argWinCrashEvent).arg(argProcessId); + if (argWinCrashEvent != 0) { + args << QLatin1String("-wincrashevent") + << QString::fromLatin1("%1:%2").arg(argWinCrashEvent).arg(argProcessId); + } else { + args << QLatin1String("-debug") + << QString::fromLatin1("%1").arg(argProcessId); + } if (debug) qDebug() << binary << args; QProcess p; |