forked from qt-creator/qt-creator
debugger: remove old workaround recording the entry point
This was for kernel i386 2.6.24-23-ubuntu and gdb 6.8. This is pre-python, i.e. not supported anymore. Change-Id: I1d73dbd6fd7730e15ebab334eb9d043b210eb631 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -1372,28 +1372,6 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
|||||||
notifyInferiorStopOk();
|
notifyInferiorStopOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startParameters().toolChainAbi.os() == Abi::LinuxOS && !m_entryPoint.isEmpty()) {
|
|
||||||
// This is needed as long as we support stock gdb 6.8.
|
|
||||||
if (frame.findChild("addr").data() == m_entryPoint) {
|
|
||||||
// There are two expected reasons for getting here:
|
|
||||||
// 1) For some reason, attaching to a stopped process causes *two*
|
|
||||||
// SIGSTOPs
|
|
||||||
// when trying to continue (kernel i386 2.6.24-23-ubuntu, gdb 6.8).
|
|
||||||
// Interestingly enough, on MacOSX no signal is delivered at all.
|
|
||||||
// 2) The explicit tbreak at the entry point we set to query the PID.
|
|
||||||
// Gdb <= 6.8 reports a frame but no reason, 6.8.50+ reports
|
|
||||||
// everything.
|
|
||||||
// The case of the user really setting a breakpoint at _start is simply
|
|
||||||
// unsupported.
|
|
||||||
if (!inferiorPid()) // For programs without -pthread under gdb <= 6.8.
|
|
||||||
postCommand("info proc", CB(handleInfoProc));
|
|
||||||
continueInferiorInternal();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// We are past the initial stop(s). No need to waste time on further checks.
|
|
||||||
m_entryPoint.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isQmlStepBreakpoint1(rid))
|
if (isQmlStepBreakpoint1(rid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -484,8 +484,6 @@ private: ////////// Inferior Management //////////
|
|||||||
void maybeHandleInferiorPidChanged(const QString &pid);
|
void maybeHandleInferiorPidChanged(const QString &pid);
|
||||||
void handleInfoProc(const GdbResponse &response);
|
void handleInfoProc(const GdbResponse &response);
|
||||||
|
|
||||||
QByteArray m_entryPoint;
|
|
||||||
|
|
||||||
private: ////////// View & Data Stuff //////////
|
private: ////////// View & Data Stuff //////////
|
||||||
|
|
||||||
void selectThread(int index);
|
void selectThread(int index);
|
||||||
|
|||||||
@@ -162,9 +162,6 @@ void TermGdbAdapter::handleStubAttached(const GdbResponse &response)
|
|||||||
showMessage(_("INFERIOR ATTACHED"));
|
showMessage(_("INFERIOR ATTACHED"));
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
m_engine->handleInferiorPrepared();
|
m_engine->handleInferiorPrepared();
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
m_engine->postCommand("-stack-list-frames 0 0", CB(handleEntryPoint));
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
case GdbResultError:
|
case GdbResultError:
|
||||||
m_engine->notifyInferiorSetupFailed(QString::fromLocal8Bit(response.data.findChild("msg").data()));
|
m_engine->notifyInferiorSetupFailed(QString::fromLocal8Bit(response.data.findChild("msg").data()));
|
||||||
@@ -182,17 +179,6 @@ void TermGdbAdapter::runEngine()
|
|||||||
m_engine->continueInferiorInternal();
|
m_engine->continueInferiorInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
void TermGdbAdapter::handleEntryPoint(const GdbResponse &response)
|
|
||||||
{
|
|
||||||
if (response.resultClass == GdbResultDone) {
|
|
||||||
GdbMi stack = response.data.findChild("stack");
|
|
||||||
if (stack.isValid() && stack.childCount() == 1)
|
|
||||||
m_engine->m_entryPoint = stack.childAt(0).findChild("addr").data();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void TermGdbAdapter::interruptInferior()
|
void TermGdbAdapter::interruptInferior()
|
||||||
{
|
{
|
||||||
const qint64 attachedPID = m_engine->inferiorPid();
|
const qint64 attachedPID = m_engine->inferiorPid();
|
||||||
|
|||||||
@@ -68,9 +68,6 @@ private:
|
|||||||
AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
|
AbstractGdbProcess *gdbProc() { return &m_gdbProc; }
|
||||||
|
|
||||||
void handleStubAttached(const GdbResponse &response);
|
void handleStubAttached(const GdbResponse &response);
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
void handleEntryPoint(const GdbResponse &response);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Q_SLOT void handleInferiorSetupOk();
|
Q_SLOT void handleInferiorSetupOk();
|
||||||
Q_SLOT void stubExited();
|
Q_SLOT void stubExited();
|
||||||
|
|||||||
Reference in New Issue
Block a user