Commit 9144cb24 authored by hjk's avatar hjk Committed by Kai Koehne

debugger: implement direct interrupt of the gdb process on windows

Change-Id: I1882f1a49cca84456e9f94e608308d2c571fed67
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 696dd9a7
......@@ -32,14 +32,16 @@
#include "localgdbprocess.h"
#include <utils/qtcassert.h>
#include "procinterrupt.h"
#include "debuggerconstants.h"
#ifdef Q_OS_UNIX
#include <errno.h>
#include <signal.h>
#include <string.h>
#ifdef Q_OS_WIN
#include <utils/winutils.h>
#endif
#include <utils/qtcassert.h>
namespace Debugger {
namespace Internal {
......@@ -87,16 +89,13 @@ void LocalGdbProcess::kill()
bool LocalGdbProcess::interrupt()
{
#ifdef Q_OS_UNIX
Q_PID pid = m_gdbProc.pid();
int res = ::kill(pid, SIGINT);
if (res != 0)
m_errorString = QString::fromLocal8Bit(strerror(errno));
return res == 0;
long pid;
#ifdef Q_OS_WIN
pid = Utils::winQPidToPid(m_gdbProc.pid());
#else
QTC_ASSERT(false, "NOT IMPLEMENTED");
return false;
pid = m_gdbProc.pid();
#endif
return interruptProcess(pid, GdbEngineType, &m_errorString);
}
QProcess::ProcessState LocalGdbProcess::state() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment