Commit 76e02578 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: remove infoTargetNecessary



Was only used for gdb < 7.0, and is not necessary on Mac.

Change-Id: I9992d7aad52833f1e40d97395147bf1d2d546cf4
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent c2eb4532
......@@ -71,13 +71,6 @@ void AbstractPlainGdbAdapter::handleFileExecAndSymbols(const GdbResponse &respon
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
if (response.resultClass == GdbResultDone) {
if (infoTargetNecessary()) {
// Old gdbs do not announce the PID for programs without pthreads.
// Note that successfully preloading the debugging helpers will
// automatically load pthreads, so this will be unnecessary.
if (m_engine->m_gdbVersion < 70000)
m_engine->postCommand("info target", CB(handleInfoTarget));
}
m_engine->handleInferiorPrepared();
} else {
QByteArray ba = response.data.findChild("msg").data();
......@@ -114,26 +107,5 @@ void AbstractPlainGdbAdapter::handleExecRun(const GdbResponse &response)
}
}
void AbstractPlainGdbAdapter::handleInfoTarget(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
// [some leading stdout here]
// >&" Entry point: 0x80831f0 0x08048134 - 0x08048147 is .interp\n"
// [some trailing stdout here]
QString msg = _(response.consoleStreamOutput);
QRegExp needle(_("\\bEntry point: 0x([0-9a-f]+)\\b"));
if (needle.indexIn(msg) != -1) {
m_engine->m_entryPoint =
"0x" + needle.cap(1).toLatin1().rightJustified(sizeof(void *) * 2, '0');
m_engine->postCommand("tbreak *0x" + needle.cap(1).toAscii());
// Do nothing here - inferiorPrepared handles the sequencing.
} else {
m_engine->notifyInferiorSetupFailed(_("Parsing start address failed"));
}
} else if (response.resultClass == GdbResultError) {
m_engine->notifyInferiorSetupFailed(_("Fetching start address failed"));
}
}
} // namespace Debugger
} // namespace Internal
......@@ -49,12 +49,8 @@ public:
virtual void setupInferior();
void runEngine();
protected:
void handleInfoTarget(const GdbResponse &response);
private:
virtual QByteArray execFilePath() const = 0;
virtual bool infoTargetNecessary() const = 0;
virtual QByteArray toLocalEncoding(const QString &str) const = 0;
virtual QString fromLocalEncoding(const QByteArray &ba) const = 0;
void handleExecRun(const GdbResponse &response);
......
......@@ -194,15 +194,6 @@ QByteArray LocalPlainGdbAdapter::execFilePath() const
.absoluteFilePath().toLocal8Bit();
}
bool LocalPlainGdbAdapter::infoTargetNecessary() const
{
#ifdef Q_OS_LINUX
return true;
#else
return false;
#endif
}
QByteArray LocalPlainGdbAdapter::toLocalEncoding(const QString &s) const
{
return s.toLocal8Bit();
......
......@@ -64,10 +64,9 @@ private:
DumperHandling dumperHandling() const;
AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
virtual QByteArray execFilePath() const;
virtual bool infoTargetNecessary() const;
virtual QByteArray toLocalEncoding(const QString &s) const;
virtual QString fromLocalEncoding(const QByteArray &b) const;
QByteArray execFilePath() const;
QByteArray toLocalEncoding(const QString &s) const;
QString fromLocalEncoding(const QByteArray &b) const;
void checkForReleaseBuild();
OutputCollector m_outputCollector;
......
......@@ -74,11 +74,6 @@ QByteArray RemotePlainGdbAdapter::execFilePath() const
return startParameters().executable.toUtf8();
}
bool RemotePlainGdbAdapter::infoTargetNecessary() const
{
return true;
}
QByteArray RemotePlainGdbAdapter::toLocalEncoding(const QString &s) const
{
return s.toUtf8();
......
......@@ -62,10 +62,9 @@ private:
AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
DumperHandling dumperHandling() const { return DumperLoadedByGdbPreload; }
virtual QByteArray execFilePath() const;
virtual bool infoTargetNecessary() const;
virtual QByteArray toLocalEncoding(const QString &s) const;
virtual QString fromLocalEncoding(const QByteArray &b) const;
QByteArray execFilePath() const;
QByteArray toLocalEncoding(const QString &s) const;
QString fromLocalEncoding(const QByteArray &b) const;
void handleApplicationOutput(const QByteArray &output);
RemoteGdbProcess m_gdbProc;
......
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