Commit 903a50a6 authored by hjk's avatar hjk
Browse files

debugger: work on trk integration

parent 75a3112a
......@@ -1355,14 +1355,18 @@ void DebuggerManager::modulesDockToggled(bool on)
void DebuggerManager::showDebuggerOutput(int channel, const QString &msg)
{
QTC_ASSERT(m_outputWindow, return);
m_outputWindow->showOutput(channel, msg);
if (m_outputWindow)
m_outputWindow->showOutput(channel, msg);
else
qDebug() << "OUTPUT: " << channel << msg;
}
void DebuggerManager::showDebuggerInput(int channel, const QString &msg)
{
QTC_ASSERT(m_outputWindow, return);
m_outputWindow->showInput(channel, msg);
if (m_outputWindow)
m_outputWindow->showInput(channel, msg);
else
qDebug() << "INPUT: " << channel << msg;
}
......
......@@ -191,6 +191,7 @@ void SymbianAdapter::startInferior()
appendString(&ba, file, TargetByteOrder);
sendTrkMessage(0x40, TrkCB(handleCreateProcess), ba); // Create Item
//sendTrkMessage(TRK_WRITE_QUEUE_NOOP_CODE, TrkCB(startGdbServer));
emit started();
}
void SymbianAdapter::logMessage(const QString &msg)
......@@ -1292,7 +1293,8 @@ void SymbianAdapter::sendOutput(QObject *sender, const QString &data)
void SymbianAdapter::handleProcError(QProcess::ProcessError error)
{
sendOutput(sender(), QString("Process Error %1").arg(error));
sendOutput(sender(),
QString("Process Error %1: %2").arg(error).arg(errorString()));
}
void SymbianAdapter::handleProcFinished(int exitCode, QProcess::ExitStatus exitStatus)
......@@ -1511,25 +1513,25 @@ void SymbianAdapter::handleRfcommReadyReadStandardOutput()
void SymbianAdapter::start(const QString &program, const QStringList &args,
QIODevice::OpenMode mode)
{
qDebug() << "SYMBIAN START";
Q_UNUSED(mode);
qDebug() << "SYMBIAN START" << program << args << mode;
run();
//m_gdbProc.start(program, args, mode);
}
void SymbianAdapter::kill()
{
//m_gdbProc.kill();
m_gdbProc.kill();
}
void SymbianAdapter::terminate()
{
//m_gdbProc.terminate();
m_gdbProc.terminate();
}
bool SymbianAdapter::waitForFinished(int msecs)
{
//return m_gdbProc.waitForFinished(msecs);
return true;
return m_gdbProc.waitForFinished(msecs);
//return true;
}
QProcess::ProcessState SymbianAdapter::state() const
......
......@@ -96,6 +96,7 @@ public slots:
signals:
void output(const QString &msg);
void startSuccessful();
private slots:
void handleProcError(QProcess::ProcessError error);
......
......@@ -52,9 +52,10 @@ IDebuggerEngine *createSymbianEngine(DebuggerManager *parent,
Q_UNUSED(opts);
//opts->push_back(new GdbOptionsPage);
SymbianAdapter *adapter = new SymbianAdapter;
GdbEngine *engine = new GdbEngine(parent, adapter);
QObject::connect(adapter, SIGNAL(output(QString)),
parent, SLOT(showDebuggerOutput(QString)));
return new GdbEngine(parent, adapter);
return engine;
}
} // namespace Internal
......
DEFINES += DEBUG_TRK=0
DEBUGGERHOME = ../../../src/plugins/debugger/symbian
INCLUDEPATH *= $$DEBUGGERHOME
INCLUDEPATH *= $$PWD $$DEBUGGERHOME
SOURCES += \
$$DEBUGGERHOME/trkutils.cpp \
......
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