diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-10-30 17:16:56 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-10-30 17:47:51 +0100 |
commit | 151b785d010b85ee0b5788f5ea95c4154d7530e0 (patch) | |
tree | 6e43ac7807274828130892478ec3645ae2696f10 /src/plugins/debugger/gdb/termgdbadapter.cpp | |
parent | 6d6ed26eae39fc6d4b2e843edb8498e0008f15ef (diff) | |
download | qt-creator-151b785d010b85ee0b5788f5ea95c4154d7530e0.tar.gz |
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
Diffstat (limited to 'src/plugins/debugger/gdb/termgdbadapter.cpp')
-rw-r--r-- | src/plugins/debugger/gdb/termgdbadapter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp index e5f43eef21..b369dad4c6 100644 --- a/src/plugins/debugger/gdb/termgdbadapter.cpp +++ b/src/plugins/debugger/gdb/termgdbadapter.cpp @@ -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(); |