forked from qt-creator/qt-creator
Debugger: Introduce a pty based channel to inferiors
This is experimental for now and requires QTC_USE_PTY=1 in the environment to be used. Change-Id: I460ce7b9283467d481e903f731f4243b7e5ec094 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com> Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include "registerhandler.h"
|
||||
#include "sourcefileshandler.h"
|
||||
#include "stackhandler.h"
|
||||
#include "terminal.h"
|
||||
#include "threadshandler.h"
|
||||
#include "watchhandler.h"
|
||||
#include <debugger/shared/peutils.h>
|
||||
@@ -299,6 +300,7 @@ public:
|
||||
// State of RemoteSetup signal/slots.
|
||||
RemoteSetupState m_remoteSetupState;
|
||||
|
||||
Terminal m_terminal;
|
||||
qint64 m_inferiorPid;
|
||||
|
||||
ModulesHandler m_modulesHandler;
|
||||
@@ -542,6 +544,20 @@ void DebuggerEngine::startDebugger(DebuggerRunControl *runControl)
|
||||
d->m_lastGoodState = DebuggerNotReady;
|
||||
d->m_targetState = DebuggerNotReady;
|
||||
d->m_progress.setProgressValue(200);
|
||||
|
||||
d->m_terminal.setup();
|
||||
if (d->m_terminal.isUsable()) {
|
||||
connect(&d->m_terminal, &Terminal::stdOutReady, [this, runControl](const QString &msg) {
|
||||
runControl->appendMessage(msg, Utils::StdOutFormatSameLine);
|
||||
});
|
||||
connect(&d->m_terminal, &Terminal::stdErrReady, [this, runControl](const QString &msg) {
|
||||
runControl->appendMessage(msg, Utils::StdErrFormatSameLine);
|
||||
});
|
||||
connect(&d->m_terminal, &Terminal::error, [this, runControl](const QString &msg) {
|
||||
runControl->appendMessage(msg, Utils::ErrorMessageFormat);
|
||||
});
|
||||
}
|
||||
|
||||
d->queueSetupEngine();
|
||||
}
|
||||
|
||||
@@ -1383,6 +1399,11 @@ DebuggerRunControl *DebuggerEngine::runControl() const
|
||||
return d->runControl();
|
||||
}
|
||||
|
||||
Terminal *DebuggerEngine::terminal() const
|
||||
{
|
||||
return &d->m_terminal;
|
||||
}
|
||||
|
||||
bool DebuggerEngine::setToolTipExpression(TextEditor::TextEditorWidget *,
|
||||
const DebuggerToolTipContext &)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user