From 58d89c4625e102058bcd8b73a9024898a7e76bfd Mon Sep 17 00:00:00 2001 From: hjk <qtc-commiter@nokia.com> Date: Wed, 3 Dec 2008 12:03:46 +0100 Subject: [PATCH] issue a warning when trying to attaching to "wrong" pids --- src/plugins/debugger/debuggermanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/debugger/debuggermanager.cpp b/src/plugins/debugger/debuggermanager.cpp index 04875e12fd5..f696d728467 100644 --- a/src/plugins/debugger/debuggermanager.cpp +++ b/src/plugins/debugger/debuggermanager.cpp @@ -791,6 +791,11 @@ bool DebuggerManager::startNewDebugger(StartMode mode) m_processArgs = QStringList(); m_workingDir = QString(); m_attachedPID = dlg.attachPID(); + if (m_attachedPID == 0) { + QMessageBox::warning(mainWindow(), tr("Warning"), + tr("Cannot attach to PID 0")); + return false; + } } else if (startMode() == startInternal) { if (m_executable.isEmpty()) { QString startDirectory = m_executable; -- GitLab