Commit f42ad24d authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

remove dead code

parent 2ec0bc9f
......@@ -55,8 +55,6 @@ public:
virtual QByteArray readAllStandardError() = 0;
virtual QByteArray readAllStandardOutput() = 0;
virtual void write(const QByteArray &data) = 0;
virtual void setWorkingDirectory(const QString &dir) = 0;
virtual void setEnvironment(const QStringList &env) = 0;
virtual bool isTrkAdapter() const = 0;
virtual void startAdapter() = 0;
......@@ -80,8 +78,6 @@ signals:
void inferiorShutDown();
void inferiorShutdownFailed(const QString &msg);
void inferiorPidChanged(qint64 pid);
void readyReadStandardOutput();
void readyReadStandardError();
......
......@@ -128,21 +128,6 @@ void AttachGdbAdapter::handleAttach(const GdbResponse &response)
}
}
void AttachGdbAdapter::handleContinue(const GdbResponse &response)
{
QTC_ASSERT(state() == InferiorStarting, qDebug() << state());
if (response.resultClass == GdbResultRunning) {
setState(InferiorRunning);
debugMessage(_("INFERIOR STARTED"));
showStatusMessage(tr("Inferior running."));
} else {
QTC_ASSERT(response.resultClass == GdbResultError, /**/);
const QByteArray &msg = response.data.findChild("msg").data();
setState(InferiorStartFailed);
emit inferiorStartFailed(msg);
}
}
void AttachGdbAdapter::interruptInferior()
{
debugMessage(_("TRYING TO INTERUPT INFERIOR"));
......
......@@ -56,8 +56,6 @@ private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
bool dumpersAvailable() const { return false; }
......@@ -68,7 +66,6 @@ private:
void shutdown();
void handleAttach(const GdbResponse &response);
void handleContinue(const GdbResponse &response);
void handleDetach(const GdbResponse &response);
void handleExit(const GdbResponse &response);
......
......@@ -56,8 +56,6 @@ private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
bool dumpersAvailable() const { return false; }
......
......@@ -116,9 +116,9 @@ void PlainGdbAdapter::startAdapter()
gdbArgs.prepend(_("--tty=") + m_engine->m_outputCollector.serverName());
if (!startParameters().workingDir.isEmpty())
setWorkingDirectory(startParameters().workingDir);
m_gdbProc.setWorkingDirectory(startParameters().workingDir);
if (!startParameters().environment.isEmpty())
setEnvironment(startParameters().environment);
m_gdbProc.setEnvironment(startParameters().environment);
}
m_gdbProc.start(theDebuggerStringSetting(GdbLocation), gdbArgs);
......@@ -164,49 +164,6 @@ void PlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response)
}
}
void PlainGdbAdapter::handleInfoTarget(const GdbResponse &response)
{
QTC_ASSERT(state() == DebuggerNotReady, qDebug() << state());
#if defined(Q_OS_MAC)
Q_UNUSED(response)
#else
/*
#ifdef Q_OS_MAC
m_engine->postCommand(_("sharedlibrary apply-load-rules all"));
// On MacOS, breaking in at the entry point wreaks havoc.
m_engine->postCommand(_("tbreak main"));
m_waitingForFirstBreakpointToBeHit = true;
m_engine->postCommand(_("-exec-run"), CB(handleExecRun));
#else
// FIXME:
// if (!m_dumperInjectionLoad)
// m_engine->postCommand(_("set auto-solib-add off"));
m_engine->postCommand(_("info target"), CB(handleInfoTarget));
#endif
*/
if (response.resultClass == GdbResultDone) {
// [some leading stdout here]
// >&" Entry point: 0x80831f0 0x08048134 - 0x08048147 is .interp\n"
// [some trailing stdout here]
QString msg = _(response.data.findChild("consolestreamoutput").data());
QRegExp needle(_("\\bEntry point: (0x[0-9a-f]+)\\b"));
if (needle.indexIn(msg) != -1) {
//debugMessage(_("STREAM: ") + msg + " " + needle.cap(1));
m_engine->postCommand(_("tbreak *") + needle.cap(1));
// FIXME: m_waitingForFirstBreakpointToBeHit = true;
setState(InferiorRunningRequested);
m_engine->postCommand(_("-exec-run"), CB(handleExecRun));
} else {
debugMessage(_("PARSING START ADDRESS FAILED: ") + msg);
emit inferiorStartFailed(_("Parsing start address failed"));
}
} else if (response.resultClass == GdbResultError) {
debugMessage(_("FETCHING START ADDRESS FAILED: " + response.toString()));
emit inferiorStartFailed(_("Fetching start address failed"));
}
#endif
}
void PlainGdbAdapter::handleExecRun(const GdbResponse &response)
{
if (response.resultClass == GdbResultRunning) {
......
......@@ -57,8 +57,6 @@ public:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
bool dumpersAvailable() const { return true; }
......@@ -74,7 +72,6 @@ private:
void handleExit(const GdbResponse &response);
void handleStubAttached(const GdbResponse &response);
void handleExecRun(const GdbResponse &response);
void handleInfoTarget(const GdbResponse &response);
void emitAdapterStartFailed(const QString &msg);
Q_SLOT void handleGdbFinished(int, QProcess::ExitStatus status);
......
......@@ -56,8 +56,6 @@ private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
bool dumpersAvailable() const { return true; }
......
......@@ -2061,16 +2061,6 @@ void TrkGdbAdapter::handleDirectStep3(const TrkResult &result)
logMessage("HANDLE DIRECT STEP2: " + stringFromArray(result.data));
}
void TrkGdbAdapter::setWorkingDirectory(const QString &dir)
{
m_gdbProc.setWorkingDirectory(dir);
}
void TrkGdbAdapter::setEnvironment(const QStringList &env)
{
m_gdbProc.setEnvironment(env);
}
void TrkGdbAdapter::cleanup()
{
if (m_trkDevice.isOpen())
......
......@@ -169,8 +169,6 @@ public:
QByteArray readAllStandardError();
QByteArray readAllStandardOutput();
void write(const QByteArray &data);
void setWorkingDirectory(const QString &dir);
void setEnvironment(const QStringList &env);
bool isTrkAdapter() const { return true; }
bool dumpersAvailable() const { return false; }
......
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