diff options
author | David Schulz <david.schulz@nokia.com> | 2012-01-16 15:24:04 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-01-25 12:16:00 +0100 |
commit | e7e74db758ee3964ad8898eb398652f5db00a181 (patch) | |
tree | d87b84a64b3c13abbfe9023a05c37f1472b74269 /src/plugins/debugger/shared/hostutils.cpp | |
parent | 1bb1c2884f02346b510bbf8d9b02c3db57701e9e (diff) | |
download | qt-creator-e7e74db758ee3964ad8898eb398652f5db00a181.tar.gz |
Edit debugger so win64interrupt is called
when trying to debug a 64bit application under windows.
Task-number: QTCREATORBUG-2521
Change-Id: I38922a6bed09640ce88184e6913a9fbb1d7433de
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/debugger/shared/hostutils.cpp')
-rw-r--r-- | src/plugins/debugger/shared/hostutils.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/debugger/shared/hostutils.cpp b/src/plugins/debugger/shared/hostutils.cpp index 671e94336d..7e67648eab 100644 --- a/src/plugins/debugger/shared/hostutils.cpp +++ b/src/plugins/debugger/shared/hostutils.cpp @@ -146,7 +146,7 @@ bool winResumeThread(unsigned long dwThreadId, QString *errorMessage) } // Open the process and break into it -bool winDebugBreakProcess(unsigned long pid, QString *errorMessage) +bool winDebugBreakProcess(unsigned long pid, QString *errorMessage, bool isCdb64bit) { bool ok = false; HANDLE inferior = NULL; @@ -160,7 +160,21 @@ bool winDebugBreakProcess(unsigned long pid, QString *errorMessage) arg(pid).arg(Utils::winErrorMessage(GetLastError())); break; } - if (!DebugBreakProcess(inferior)) { + + if (isCdb64bit) { + switch (QProcess::execute(QCoreApplication::applicationDirPath() + QString::fromLatin1("/win64interrupt.exe %1").arg(pid))) { + case -2: + *errorMessage = QString::fromLatin1("Cannot start win64interrupt.exe. Check src/tools/win64interrupt/win64interrupt.c for more information."); + break; + case 0: + ok = true; + break; + default: + *errorMessage = QString::fromLatin1("win64interrupt.exe could not break the process with the pid %1.").arg(pid); + break; + } + break; + } else if (!DebugBreakProcess(inferior)) { *errorMessage = QString::fromLatin1("DebugBreakProcess failed: %1").arg(Utils::winErrorMessage(GetLastError())); break; } |