forked from qt-creator/qt-creator
Debugger: Use ProcessResultData a bit more
Instead of its individual items. Change-Id: Icd668a61de1c2de676e0a44769f1c1bb5375c523 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/stringutils.h>
|
||||
#include <utils/winutils.h>
|
||||
@@ -708,7 +709,7 @@ void CdbEngine::processFinished()
|
||||
elapsedLogTime(), qPrintable(stateName(state())),
|
||||
m_process.exitStatus(), m_process.exitCode());
|
||||
|
||||
notifyDebuggerProcessFinished(m_process.exitCode(), m_process.exitStatus(), "CDB");
|
||||
notifyDebuggerProcessFinished(m_process.resultData(), "CDB");
|
||||
}
|
||||
|
||||
void CdbEngine::detachDebugger()
|
||||
|
@@ -77,6 +77,7 @@
|
||||
#include <utils/checkablemessagebox.h>
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/processhandle.h>
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/styledbar.h>
|
||||
@@ -1789,14 +1790,14 @@ void DebuggerEngine::showMessage(const QString &msg, int channel, int timeout) c
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
|
||||
QProcess::ExitStatus exitStatus, const QString &backendName)
|
||||
void DebuggerEngine::notifyDebuggerProcessFinished(const ProcessResultData &result,
|
||||
const QString &backendName)
|
||||
{
|
||||
showMessage(QString("%1 PROCESS FINISHED, status %2, exit code %3 (0x%4)")
|
||||
.arg(backendName)
|
||||
.arg(exitStatus)
|
||||
.arg(exitCode)
|
||||
.arg(QString::number(exitCode, 16)));
|
||||
.arg(result.m_exitStatus)
|
||||
.arg(result.m_exitCode)
|
||||
.arg(QString::number(result.m_exitCode, 16)));
|
||||
|
||||
switch (state()) {
|
||||
case DebuggerFinished:
|
||||
@@ -1816,9 +1817,9 @@ void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
|
||||
default: {
|
||||
// Initiate shutdown sequence
|
||||
notifyInferiorIll();
|
||||
const QString msg = exitStatus == QProcess::CrashExit ?
|
||||
const QString msg = result.m_exitStatus == QProcess::CrashExit ?
|
||||
tr("The %1 process terminated.") :
|
||||
tr("The %2 process terminated unexpectedly (exit code %1).").arg(exitCode);
|
||||
tr("The %2 process terminated unexpectedly (exit code %1).").arg(result.m_exitCode);
|
||||
AsynchronousMessageBox::critical(tr("Unexpected %1 Exit").arg(backendName),
|
||||
msg.arg(backendName));
|
||||
break;
|
||||
|
@@ -27,18 +27,17 @@
|
||||
|
||||
#include "debugger_global.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggeritem.h"
|
||||
#include "debuggerprotocol.h"
|
||||
#include "breakhandler.h"
|
||||
#include "projectexplorer/abi.h"
|
||||
#include "threadshandler.h"
|
||||
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <projectexplorer/devicesupport/idevicefwd.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
#include <texteditor/textmark.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QProcess>
|
||||
#include <utils/filepath.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QDebug;
|
||||
@@ -50,6 +49,7 @@ namespace Core { class IOptionsPage; }
|
||||
namespace Utils {
|
||||
class MacroExpander;
|
||||
class Perspective;
|
||||
class ProcessResultData;
|
||||
} // Utils
|
||||
|
||||
namespace Debugger {
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
|
||||
protected:
|
||||
void setDebuggerName(const QString &name);
|
||||
void notifyDebuggerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus,
|
||||
void notifyDebuggerProcessFinished(const Utils::ProcessResultData &resultData,
|
||||
const QString &backendName);
|
||||
|
||||
virtual void setState(DebuggerState state, bool forced = false);
|
||||
|
@@ -61,6 +61,7 @@
|
||||
#include <app/app_version.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/stringutils.h>
|
||||
@@ -4095,7 +4096,7 @@ void GdbEngine::handleGdbDone()
|
||||
if (m_commandTimer.isActive())
|
||||
m_commandTimer.stop();
|
||||
|
||||
notifyDebuggerProcessFinished(m_gdbProc.exitCode(), m_gdbProc.exitStatus(), "GDB");
|
||||
notifyDebuggerProcessFinished(m_gdbProc.resultData(), "GDB");
|
||||
}
|
||||
|
||||
void GdbEngine::abortDebuggerProcess()
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <debugger/terminal.h>
|
||||
|
||||
#include <debugger/breakhandler.h>
|
||||
#include <debugger/debuggeritem.h>
|
||||
#include <debugger/debuggersourcepathmappingwidget.h>
|
||||
#include <debugger/disassemblerlines.h>
|
||||
#include <debugger/moduleshandler.h>
|
||||
@@ -49,6 +50,7 @@
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
@@ -832,7 +834,7 @@ QString LldbEngine::errorMessage(QProcess::ProcessError error) const
|
||||
|
||||
void LldbEngine::handleLldbFinished()
|
||||
{
|
||||
notifyDebuggerProcessFinished(m_lldbProc.exitCode(), m_lldbProc.exitStatus(), "LLDB");
|
||||
notifyDebuggerProcessFinished(m_lldbProc.resultData(), "LLDB");
|
||||
}
|
||||
|
||||
void LldbEngine::readLldbStandardError()
|
||||
|
Reference in New Issue
Block a user