forked from qt-creator/qt-creator
terminal adapter: make skipping of initial SIGSTOPs more reliable
first, _start being resolvable depends on libc-dbg being installed. second, depending on the frame being in the dynloader makes it a) work only for dynamic executables and b) fail on multi-target systems (due to a hard-coded file name). so instead just remember the entry point, as we are already there anyway. Reviewed-By: hjk
This commit is contained in:
@@ -119,6 +119,9 @@ void TermGdbAdapter::handleStubAttached(const GdbResponse &response)
|
||||
setState(InferiorStopped);
|
||||
debugMessage(_("INFERIOR ATTACHED"));
|
||||
emit inferiorPrepared();
|
||||
#ifdef Q_OS_LINUX
|
||||
m_engine->postCommand(_("-stack-list-frames 0 0"), CB(handleEntryPoint));
|
||||
#endif
|
||||
} else if (response.resultClass == GdbResultError) {
|
||||
QString msg = _(response.data.findChild("msg").data());
|
||||
emit inferiorStartFailed(msg);
|
||||
@@ -130,6 +133,17 @@ void TermGdbAdapter::startInferiorPhase2()
|
||||
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()
|
||||
{
|
||||
const qint64 attachedPID = m_engine->inferiorPid();
|
||||
|
||||
Reference in New Issue
Block a user