Commit 058b55ad authored by hjk's avatar hjk
Browse files

debugger: work on trk integration

parent 46538f6a
......@@ -563,11 +563,11 @@ void CdbDebugEnginePrivate::clearDisplay()
m_debuggerManagerAccess->registerHandler()->removeAll();
}
bool CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
void CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
{
if (m_d->m_hDebuggeeProcess) {
warning(QLatin1String("Internal error: Attempt to start debugger while another process is being debugged."));
return false;
emit startFailed();
}
m_d->clearDisplay();
......@@ -627,7 +627,11 @@ bool CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters>
} else {
warning(errorMessage);
}
return rc;
if (rc)
emit startSuccessful();
else
emit startFailed();
}
bool CdbDebugEngine::startAttachDebugger(qint64 pid, DebuggerStartMode sm, QString *errorMessage)
......
......@@ -62,7 +62,7 @@ public:
virtual void shutdown();
virtual void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
virtual bool startDebugger(const QSharedPointer<DebuggerStartParameters> &startParameters);
virtual void startDebugger(const QSharedPointer<DebuggerStartParameters> &startParameters);
virtual void exitDebugger();
virtual void detachDebugger();
virtual void updateWatchData(const WatchData &data);
......
......@@ -182,9 +182,10 @@ void DebuggerStartParameters::clear()
///////////////////////////////////////////////////////////////////////
static IDebuggerEngine *gdbEngine = 0;
static IDebuggerEngine *winEngine = 0;
static IDebuggerEngine *scriptEngine = 0;
static IDebuggerEngine *symbianEngine = 0;
static IDebuggerEngine *tcfEngine = 0;
static IDebuggerEngine *winEngine = 0;
DebuggerManager::DebuggerManager()
: m_startParameters(new DebuggerStartParameters),
......@@ -197,9 +198,10 @@ DebuggerManager::~DebuggerManager()
{
#define doDelete(ptr) delete ptr; ptr = 0
doDelete(gdbEngine);
doDelete(winEngine);
doDelete(scriptEngine);
doDelete(symbianEngine);
doDelete(tcfEngine);
doDelete(winEngine);
#undef doDelete
}
......@@ -446,6 +448,8 @@ QList<Core::IOptionsPage*> DebuggerManager::initializeEngines(unsigned enabledTy
QList<Core::IOptionsPage*> rc;
if (enabledTypeFlags & GdbEngineType)
gdbEngine = createGdbEngine(this, &rc);
if (enabledTypeFlags & SymbianEngineType)
symbianEngine = createSymbianEngine(this, &rc);
winEngine = createWinEngine(this, (enabledTypeFlags & CdbEngineType), &rc);
if (enabledTypeFlags & ScriptEngineType)
scriptEngine = createScriptEngine(this, &rc);
......@@ -695,9 +699,10 @@ void DebuggerManager::updateWatchData(const WatchData &data)
m_engine->updateWatchData(data);
}
static inline QString msgEngineNotAvailable(const char *engine)
static QString msgEngineNotAvailable(const char *engine)
{
return DebuggerManager::tr("The application requires the debugger engine '%1', which is disabled.").arg(QLatin1String(engine));
return DebuggerManager::tr("The application requires the debugger engine '%1', "
"which is disabled.").arg(QLatin1String(engine));
}
static IDebuggerEngine *debuggerEngineForToolChain(ProjectExplorer::ToolChain::ToolChainType tc)
......@@ -739,7 +744,16 @@ static IDebuggerEngine *determineDebuggerEngine(const QString &executable,
return scriptEngine;
}
if (IDebuggerEngine *tce = debuggerEngineForToolChain(static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChainType)))
if (executable.endsWith(_(".sym"))) {
if (!symbianEngine) {
*errorMessage = msgEngineNotAvailable("Symbian Engine");
return 0;
}
return symbianEngine;
}
if (IDebuggerEngine *tce = debuggerEngineForToolChain(
static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChainType)))
return tce;
#ifndef Q_OS_WIN
......@@ -774,7 +788,8 @@ static IDebuggerEngine *determineDebuggerEngine(int /* pid */,
int toolChainType,
QString *errorMessage)
{
if (IDebuggerEngine *tce = debuggerEngineForToolChain(static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChainType)))
if (IDebuggerEngine *tce = debuggerEngineForToolChain(
static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChainType)))
return tce;
#ifdef Q_OS_WIN
// Preferably Windows debugger
......@@ -846,11 +861,15 @@ void DebuggerManager::startNewDebugger(DebuggerRunControl *runControl,
setBusyCursor(false);
setStatus(DebuggerProcessStartingUp);
if (!m_engine->startDebugger(m_startParameters)) {
setStatus(DebuggerProcessNotReady);
debuggingFinished();
return;
}
connect(m_engine, SIGNAL(startFailed()), this, SLOT(startFailed()));
m_engine->startDebugger(m_startParameters);
}
void DebuggerManager::startFailed()
{
disconnect(m_engine, SIGNAL(startFailed()), this, SLOT(startFailed()));
setStatus(DebuggerProcessNotReady);
debuggingFinished();
}
void DebuggerManager::cleanupViews()
......
......@@ -172,12 +172,18 @@ class CdbDebugEngine;
struct CdbDebugEnginePrivate;
// Flags for initialization
enum DebuggerEngineTypeFlags {
GdbEngineType = 0x1,
ScriptEngineType = 0x2,
CdbEngineType = 0x4,
TcfEngineType = 0x8,
AllEngineTypes = (GdbEngineType|ScriptEngineType|CdbEngineType|TcfEngineType)
enum DebuggerEngineTypeFlags
{
GdbEngineType = 0x01,
ScriptEngineType = 0x02,
CdbEngineType = 0x04,
TcfEngineType = 0x08,
SymbianEngineType = 0x10,
AllEngineTypes = GdbEngineType
| ScriptEngineType
| CdbEngineType
| TcfEngineType
| SymbianEngineType
};
// The construct below is not nice but enforces a bit of order. The
......@@ -324,6 +330,8 @@ public slots:
void showStatusMessage(const QString &msg, int timeout = -1); // -1 forever
private slots:
void showDebuggerOutput(const QString &msg)
{ showDebuggerOutput(LogDebug, msg); }
void showDebuggerOutput(int channel, const QString &msg);
void showDebuggerInput(int channel, const QString &msg);
void showApplicationOutput(const QString &data);
......@@ -343,6 +351,7 @@ private slots:
void attemptBreakpointSynchronization();
void reloadFullStack();
void stepByInstructionTriggered();
void startFailed();
private:
//
......
......@@ -180,6 +180,8 @@ void GdbEngine::initializeConnections()
this, SLOT(readGdbStandardError()));
connect(m_gdbProc, SIGNAL(finished(int, QProcess::ExitStatus)),
q, SLOT(exitDebugger()));
connect(m_gdbProc, SIGNAL(started()),
this, SLOT(startDebugger2()));
connect(&m_stubProc, SIGNAL(processError(QString)),
this, SLOT(stubError(QString)));
......@@ -1440,7 +1442,8 @@ void GdbEngine::exitDebugger()
if (m_gdbProc->state() == QProcess::Starting) {
debugMessage(_("WAITING FOR GDB STARTUP TO SHUTDOWN: %1")
.arg(m_gdbProc->state()));
m_gdbProc->waitForStarted();
// FIXME: handle this!
//m_gdbProc->waitForStarted();
}
if (m_gdbProc->state() == QProcess::Running) {
debugMessage(_("WAITING FOR RUNNING GDB TO SHUTDOWN: %1")
......@@ -1481,8 +1484,9 @@ int GdbEngine::currentFrame() const
return qq->stackHandler()->currentIndex();
}
bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
void GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
{
m_startParameters = *sp;
// This should be set by the constructor or in exitDebugger().
QTC_ASSERT(m_debuggingHelperState == DebuggingHelperUninitialized,
initializeVariables());
......@@ -1492,7 +1496,8 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
if (m_gdbProc->state() != QProcess::NotRunning) {
debugMessage(_("GDB IS ALREADY RUNNING, STATE: %1").arg(m_gdbProc->state()));
m_gdbProc->kill();
return false;
emit startFailed();
return;
}
//gdbArgs.prepend(_("--quiet"));
......@@ -1503,37 +1508,42 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
// nothing to do
} else if (q->startMode() == StartRemote) {
// Start the remote server
if (sp->serverStartScript.isEmpty()) {
if (m_startParameters.serverStartScript.isEmpty()) {
q->showStatusMessage(_("No server start script given. "
"Assuming server runs already."));
} else {
if (!sp->workingDir.isEmpty())
m_uploadProc.setWorkingDirectory(sp->workingDir);
if (!sp->environment.isEmpty())
m_uploadProc.setEnvironment(sp->environment);
m_uploadProc.start(_("/bin/sh ") + sp->serverStartScript);
if (!m_startParameters.workingDir.isEmpty())
m_uploadProc.setWorkingDirectory(m_startParameters.workingDir);
if (!m_startParameters.environment.isEmpty())
m_uploadProc.setEnvironment(m_startParameters.environment);
m_uploadProc.start(_("/bin/sh ") + m_startParameters.serverStartScript);
m_uploadProc.waitForStarted();
}
} else if (sp->useTerminal) {
} else if (m_startParameters.useTerminal) {
m_stubProc.stop(); // We leave the console open, so recycle it now.
m_stubProc.setWorkingDirectory(sp->workingDir);
m_stubProc.setEnvironment(sp->environment);
if (!m_stubProc.start(sp->executable, sp->processArgs))
return false; // Error message for user is delivered via a signal.
m_stubProc.setWorkingDirectory(m_startParameters.workingDir);
m_stubProc.setEnvironment(m_startParameters.environment);
if (!m_stubProc.start(m_startParameters.executable,
m_startParameters.processArgs)) {
// Error message for user is delivered via a signal.
emit startFailed();
return;
}
} else {
if (!m_outputCollector.listen()) {
QMessageBox::critical(q->mainWindow(), tr("Debugger Startup Failure"),
tr("Cannot set up communication with child process: %1")
.arg(m_outputCollector.errorString()));
return false;
emit startFailed();
return;
}
gdbArgs.prepend(_("--tty=") + m_outputCollector.serverName());
if (!sp->workingDir.isEmpty())
m_gdbProc->setWorkingDirectory(sp->workingDir);
if (!sp->environment.isEmpty())
m_gdbProc->setEnvironment(sp->environment);
if (!m_startParameters.workingDir.isEmpty())
m_gdbProc->setWorkingDirectory(m_startParameters.workingDir);
if (!m_startParameters.environment.isEmpty())
m_gdbProc->setEnvironment(m_startParameters.environment);
}
#if 0
......@@ -1542,13 +1552,18 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
qDebug() << "ScriptFile:" << q->settings()->m_scriptFile;
qDebug() << "Environment:" << m_gdbProc->environment();
qDebug() << "Arguments:" << gdbArgs;
qDebug() << "BuildDir:" << sp->buildDir;
qDebug() << "ExeFile:" << sp->executable;
qDebug() << "BuildDir:" << m_startParameters.buildDir;
qDebug() << "ExeFile:" << m_startParameters.executable;
#endif
QString loc = theDebuggerStringSetting(GdbLocation);
q->showStatusMessage(tr("Starting Debugger: ") + loc + _c(' ') + gdbArgs.join(_(" ")));
m_gdbProc->start(loc, gdbArgs);
}
void GdbEngine::startDebugger2()
{
#if 0
if (!m_gdbProc->waitForStarted()) {
QMessageBox::critical(q->mainWindow(), tr("Debugger Startup Failure"),
tr("Cannot start debugger: %1").arg(m_gdbProc->errorString()));
......@@ -1556,8 +1571,10 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
m_stubProc.blockSignals(true);
m_stubProc.stop();
m_stubProc.blockSignals(false);
return false;
emit startFailed();
return;
}
#endif
q->showStatusMessage(tr("Gdb Running..."));
......@@ -1639,39 +1656,39 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
}
if (q->startMode() == AttachExternal || q->startMode() == AttachCrashedExternal) {
postCommand(_("attach %1").arg(sp->attachPID), CB(handleAttach));
postCommand(_("attach %1").arg(m_startParameters.attachPID), CB(handleAttach));
// Task 254674 does not want to remove them
//qq->breakHandler()->removeAllBreakpoints();
} else if (q->startMode() == AttachCore) {
QFileInfo fi(sp->executable);
QFileInfo fi(m_startParameters.executable);
QString fileName = _c('"') + fi.absoluteFilePath() + _c('"');
QFileInfo fi2(sp->coreFile);
QFileInfo fi2(m_startParameters.coreFile);
// quoting core name below fails in gdb 6.8-debian
QString coreName = fi2.absoluteFilePath();
postCommand(_("-file-exec-and-symbols ") + fileName, CB(handleFileExecAndSymbols));
postCommand(_("target core ") + coreName, CB(handleTargetCore));
qq->breakHandler()->removeAllBreakpoints();
} else if (q->startMode() == StartRemote) {
postCommand(_("set architecture %1").arg(sp->remoteArchitecture));
postCommand(_("set architecture %1").arg(m_startParameters.remoteArchitecture));
qq->breakHandler()->setAllPending();
//QFileInfo fi(sp->executable);
//QFileInfo fi(m_startParameters.executable);
//QString fileName = fi.absoluteFileName();
QString fileName = sp->executable;
QString fileName = m_startParameters.executable;
postCommand(_("-file-exec-and-symbols \"%1\"").arg(fileName), CB(handleFileExecAndSymbols));
// works only for > 6.8
postCommand(_("set target-async on"), CB(handleSetTargetAsync));
} else if (sp->useTerminal) {
} else if (m_startParameters.useTerminal) {
qq->breakHandler()->setAllPending();
} else if (q->startMode() == StartInternal || q->startMode() == StartExternal) {
QFileInfo fi(sp->executable);
QFileInfo fi(m_startParameters.executable);
QString fileName = _c('"') + fi.absoluteFilePath() + _c('"');
postCommand(_("-file-exec-and-symbols ") + fileName, CB(handleFileExecAndSymbols));
//postCommand(_("file ") + fileName, handleFileExecAndSymbols);
#ifdef Q_OS_MAC
postCommand(_("sharedlibrary apply-load-rules all"));
#endif
if (!sp->processArgs.isEmpty())
postCommand(_("-exec-arguments ") + sp->processArgs.join(_(" ")));
if (!m_startParameters.processArgs.isEmpty())
postCommand(_("-exec-arguments ") + m_startParameters.processArgs.join(_(" ")));
#ifndef Q_OS_MAC
if (!m_dumperInjectionLoad)
postCommand(_("set auto-solib-add off"));
......@@ -1686,7 +1703,7 @@ bool GdbEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
qq->breakHandler()->setAllPending();
}
return true;
emit startSuccessful();
}
void GdbEngine::continueInferior()
......
......@@ -31,6 +31,7 @@
#define DEBUGGER_GDBENGINE_H
#include "idebuggerengine.h"
#include "debuggermanager.h" // only for StartParameters
#include "gdbmi.h"
#include "gdbprocessbase.h"
#include "outputcollector.h"
......@@ -86,6 +87,8 @@ public:
this, SIGNAL(readyReadStandardOutput()));
connect(&m_proc, SIGNAL(readyReadStandardError()),
this, SIGNAL(readyReadStandardError()));
connect(&m_proc, SIGNAL(started()),
this, SIGNAL(started()));
connect(&m_proc, SIGNAL(finished(int, QProcess::ExitStatus)),
this, SIGNAL(finished(int, QProcess::ExitStatus)));
}
......@@ -133,7 +136,8 @@ private:
void shutdown();
void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
bool startDebugger(const QSharedPointer<DebuggerStartParameters> &sp);
void startDebugger(const QSharedPointer<DebuggerStartParameters> &sp);
Q_SLOT void startDebugger2();
void exitDebugger();
void detachDebugger();
......@@ -430,6 +434,7 @@ private:
DebuggerManager * const q;
IDebuggerManagerAccessForEngines * const qq;
DebuggerStartParameters m_startParameters;
// make sure to re-initialize new members in initializeVariables();
};
......
......@@ -51,7 +51,7 @@ public:
QIODevice::OpenMode mode = QIODevice::ReadWrite) = 0;
virtual void kill() = 0;
virtual void terminate() = 0;
virtual bool waitForStarted(int msecs = 30000) = 0;
//virtual bool waitForStarted(int msecs = 30000) = 0;
virtual bool waitForFinished(int msecs = 30000) = 0;
virtual QProcess::ProcessState state() const = 0;
virtual QString errorString() const = 0;
......@@ -63,6 +63,7 @@ public:
signals:
void error(QProcess::ProcessError);
void started();
void readyReadStandardOutput();
void readyReadStandardError();
void finished(int, QProcess::ExitStatus);
......
......@@ -55,12 +55,14 @@ class WatchData;
class IDebuggerEngine : public QObject
{
Q_OBJECT
public:
IDebuggerEngine(QObject *parent = 0) : QObject(parent) {}
virtual void shutdown() = 0;
virtual void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos) = 0;
virtual bool startDebugger(const QSharedPointer<DebuggerStartParameters> &startParameters) = 0;
virtual void startDebugger(const QSharedPointer<DebuggerStartParameters> &startParameters) = 0;
virtual void exitDebugger() = 0;
virtual void detachDebugger() {}
virtual void updateWatchData(const WatchData &data) = 0;
......@@ -101,6 +103,10 @@ public:
virtual void fetchDisassembler(DisassemblerViewAgent *, const StackFrame &) {}
virtual void setRegisterValue(int regnr, const QString &value)
{ Q_UNUSED(regnr); Q_UNUSED(value); }
signals:
void startSuccessful();
void startFailed();
};
} // namespace Internal
......
......@@ -217,7 +217,7 @@ void ScriptEngine::exitDebugger()
qq->notifyInferiorExited();
}
bool ScriptEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
void ScriptEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &sp)
{
if (!m_scriptEngine)
m_scriptEngine = new QScriptEngine(this);
......@@ -233,15 +233,17 @@ bool ScriptEngine::startDebugger(const QSharedPointer<DebuggerStartParameters> &
QFileInfo fi(sp->executable);
m_scriptFileName = fi.absoluteFilePath();
QFile scriptFile(m_scriptFileName);
if (!scriptFile.open(QIODevice::ReadOnly))
return false;
if (!scriptFile.open(QIODevice::ReadOnly)) {
emit startFailed();
return;
}
QTextStream stream(&scriptFile);
m_scriptContents = stream.readAll();
scriptFile.close();
attemptBreakpointSynchronization();
qq->notifyInferiorRunningRequested();
QTimer::singleShot(0, this, SLOT(runInferior()));
return true;
emit startSuccessful();
}
void ScriptEngine::continueInferior()
......
......@@ -75,7 +75,7 @@ private:
void shutdown();
void setToolTipExpression(const QPoint &mousePos, TextEditor::ITextEditor *editor, int cursorPos);
bool startDebugger(const QSharedPointer<DebuggerStartParameters> &sp);
void startDebugger(const QSharedPointer<DebuggerStartParameters> &sp);
void exitDebugger();
......
HEADERS += \
$$PWD/trkutils.h \
$$PWD/trkclient.h \
$$PWD/symbianadapter.h \
#$$PWD/gdboptionspage.h \
SOURCES += \
$$PWD/trkutils.cpp \
$$PWD/trkclient.cpp \
$$PWD/symbianadapter.cpp \
$$PWD/symbianengine.cpp \
......
......@@ -104,7 +104,7 @@ SymbianAdapter::SymbianAdapter()
SymbianAdapter::~SymbianAdapter()
{
m_gdbServer.close();
logMessage("Shutting down.\n", true);
logMessage("Shutting down.\n");
}
void SymbianAdapter::trkLogMessage(const QString &msg)
......@@ -193,10 +193,10 @@ void SymbianAdapter::startInferior()
//sendTrkMessage(TRK_WRITE_QUEUE_NOOP_CODE, TrkCB(startGdbServer));
}
void SymbianAdapter::logMessage(const QString &msg, bool force)
void SymbianAdapter::logMessage(const QString &msg)
{
if (m_verbose || force)
emit output(QString(), msg);
if (m_verbose)
emit output(msg);
}
//
......@@ -289,17 +289,17 @@ bool SymbianAdapter::sendGdbServerPacket(const QByteArray &packet, bool doFlush)
{
if (!m_gdbConnection) {
logMessage(QString::fromLatin1("Cannot write to gdb: No connection (%1)")
.arg(QString::fromLatin1(packet)), true);
.arg(QString::fromLatin1(packet)));
return false;
}
if (m_gdbConnection->state() != QAbstractSocket::ConnectedState) {
logMessage(QString::fromLatin1("Cannot write to gdb: Not connected (%1)")
.arg(QString::fromLatin1(packet)), true);
.arg(QString::fromLatin1(packet)));
return false;
}
if (m_gdbConnection->write(packet) == -1) {
logMessage(QString::fromLatin1("Cannot write to gdb: %1 (%2)")
.arg(m_gdbConnection->errorString()).arg(QString::fromLatin1(packet)), true);
.arg(m_gdbConnection->errorString()).arg(QString::fromLatin1(packet)));
return false;
}
if (doFlush)
......@@ -720,6 +720,7 @@ void SymbianAdapter::handleGdbServerCommand(const QByteArray &cmd)
if (bp == 0) {
logMessage(QString::fromLatin1("NO RECORDED BP AT 0x%1, %2")
.arg(addr, 0, 16).arg(len));
sendGdbServerMessage("E00");
} else {
//---IDE------------------------------------------------------
// Command: 0x1C Clear Break
......@@ -748,7 +749,7 @@ void SymbianAdapter::handleGdbServerCommand(const QByteArray &cmd)
if (ok1 && ok2) {
const QString msg = QString::fromLatin1("Read of OS auxilary "
"vector (%1, %2) not implemented.").arg(offset).arg(length);
logMessage(msgGdbPacket(msg), true);
logMessage(msgGdbPacket(msg));
sendGdbServerMessage("E20", msg.toLatin1());
handled = true;
}
......@@ -757,7 +758,7 @@ void SymbianAdapter::handleGdbServerCommand(const QByteArray &cmd)
if (!handled) {
const QString msg = QLatin1String("FIXME unknown 'XFER'-request: ")
+ QString::fromAscii(cmd);
logMessage(msgGdbPacket(msg), true);
logMessage(msgGdbPacket(msg));
sendGdbServerMessage("E20", msg.toLatin1());
}
} // qPart/qXfer
......@@ -820,7 +821,7 @@ void SymbianAdapter::handleTrkResult(const TrkResult &result)
QString logMsg;
QTextStream(&logMsg) << prefix << "NAK: for token=" << result.token
<< " ERROR: " << errorMessage(result.data.at(0)) << ' ' << str;
logMessage(logMsg, true);
logMessage(logMsg);
break;
}
case 0x90: { // Notified Stopped
......@@ -1221,7 +1222,7 @@ void SymbianAdapter::handleTrkVersions(const TrkResult &result)
void SymbianAdapter::handleDisconnect(const TrkResult & /*result*/)
{
logMessage(QLatin1String("Trk disconnected"), true);
logMessage(QLatin1String("Trk disconnected"));
}
void SymbianAdapter::readMemory(uint addr, uint len)
......@@ -1284,9 +1285,9 @@ void SymbianAdapter::connectProcess(QProcess *proc)
void SymbianAdapter::sendOutput(QObject *sender, const QString &data)
{
if (sender)
emit output(sender->objectName() + " : ", data);
emit output(sender->objectName() + " : " + data);
else
emit output(QString(), data);
emit output(data);
}
void SymbianAdapter::handleProcError(QProcess::ProcessError error)
......@@ -1328,13 +1329,13 @@ void SymbianAdapter::startGdb()
{
if (!m_gdbServer.listen(QHostAddress(gdbServerIP()), gdbServerPort())) {
logMessage(QString("Unable to start the gdb server at %1: %2.")
.arg(m_gdbServerName).arg(m_gdbServer.errorString()), true);
.arg(m_gdbServerName).arg(m_gdbServer.errorString()));
QCoreApplication::exit(5);
return;
}
logMessage(QString("Gdb server running on %1.\nRegister endianness: %3.")