From ecf48086de63dc767b37f5a63faf0e6b438c5641 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 30 Oct 2009 17:40:33 +0100 Subject: [PATCH 01/10] Checkout wizard: Hangs on Windows when VCS binary is missing. due to StartFailed being emitted from start(). Set state correctly, improve error reporting. Reviewed-by: con --- src/plugins/vcsbase/checkoutjobs.cpp | 11 +++++++++-- src/plugins/vcsbase/checkoutprogresswizardpage.cpp | 7 ++++--- src/plugins/vcsbase/checkoutwizarddialog.cpp | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/plugins/vcsbase/checkoutjobs.cpp b/src/plugins/vcsbase/checkoutjobs.cpp index 7a419a00982..257068d5b50 100644 --- a/src/plugins/vcsbase/checkoutjobs.cpp +++ b/src/plugins/vcsbase/checkoutjobs.cpp @@ -94,9 +94,16 @@ void ProcessCheckoutJob::slotOutput() emit output(s); } -void ProcessCheckoutJob::slotError(QProcess::ProcessError /* error */) +void ProcessCheckoutJob::slotError(QProcess::ProcessError error) { - emit failed(d->process.errorString()); + switch (error) { + case QProcess::FailedToStart: + emit failed(tr("Unable to start %1: %2").arg(d->binary, d->process.errorString())); + break; + default: + emit failed(d->process.errorString()); + break; + } } void ProcessCheckoutJob::slotFinished (int exitCode, QProcess::ExitStatus exitStatus) diff --git a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp index 6af15fb0f8b..8fcaef51fc3 100644 --- a/src/plugins/vcsbase/checkoutprogresswizardpage.cpp +++ b/src/plugins/vcsbase/checkoutprogresswizardpage.cpp @@ -63,10 +63,11 @@ void CheckoutProgressWizardPage::start(const QSharedPointer connect(job.data(), SIGNAL(succeeded()), this, SLOT(slotSucceeded())); QApplication::setOverrideCursor(Qt::WaitCursor); ui->logPlainTextEdit->clear(); - setSubTitle(tr("Checkout started...")); - job->start(); + setSubTitle(tr("Checkout started...")); m_state = Running; - + // Note: Process jobs can emit failed() right from + // the start() method on Windows. + job->start(); } void CheckoutProgressWizardPage::slotFailed(const QString &why) diff --git a/src/plugins/vcsbase/checkoutwizarddialog.cpp b/src/plugins/vcsbase/checkoutwizarddialog.cpp index 9cb5a6a45e8..36b9c271ee0 100644 --- a/src/plugins/vcsbase/checkoutwizarddialog.cpp +++ b/src/plugins/vcsbase/checkoutwizarddialog.cpp @@ -70,9 +70,9 @@ void CheckoutWizardDialog::slotTerminated(bool success) void CheckoutWizardDialog::start(const QSharedPointer &job) { - m_progressPage->start(job); // No "back" available while running. button(QWizard::BackButton)->setEnabled(false); + m_progressPage->start(job); } void CheckoutWizardDialog::reject() From c17dff426876ff96cd6d0fb397208f74d15ab811 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 30 Oct 2009 17:44:51 +0100 Subject: [PATCH 02/10] Debugger: Make Message prompt a gui-app. Reviewed-by: Oswald Buddenhagen --- src/tools/qtcdebugger/qtcdebugger.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tools/qtcdebugger/qtcdebugger.pro b/src/tools/qtcdebugger/qtcdebugger.pro index f336112edc6..3ebed68e697 100644 --- a/src/tools/qtcdebugger/qtcdebugger.pro +++ b/src/tools/qtcdebugger/qtcdebugger.pro @@ -1,6 +1,5 @@ TARGET = qtcdebugger TEMPLATE = app -CONFIG += console SOURCES += main.cpp LIBS *= -lpsapi From e6be1526f1ce9361ca9acc6b1e1dc50166853828 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Oct 2009 17:49:37 +0100 Subject: [PATCH 03/10] make fullname parsing on windows less optimistic seems like gdb 6.8 isn't any better than 6.4 wrt file name normalization. Reviewed-By: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 3351ea8cf23..37c089a1b9f 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1319,16 +1319,12 @@ QString GdbEngine::fullName(const QString &fileName) QString GdbEngine::cleanupFullName(const QString &fileName) { QTC_ASSERT(!fileName.isEmpty(), return QString()) - if (m_gdbVersion < 60800) { - // The symbian gdb 6.4 seems to deliver "fullnames" which - // a) have no drive letter and b) are not normalized. - QFileInfo fi(fileName); - if (!fi.isReadable()) - return QString(); - return QDir::cleanPath(fi.absoluteFilePath()); - } else { - return fileName; - } + // Gdb on windows often delivers "fullnames" which + // a) have no drive letter and b) are not normalized. + QFileInfo fi(fileName); + if (!fi.isReadable()) + return QString(); + return QDir::cleanPath(fi.absoluteFilePath()); } #endif From ff72733ccdc2cf29ba22c90178d090e909b1e247 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Oct 2009 17:50:53 +0100 Subject: [PATCH 04/10] fix assertions relating to stack frames without a fullname d'oh, of course, such frames *do* exist. Reviewed-By: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 37c089a1b9f..f6ab953e5d4 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2253,9 +2253,11 @@ StackFrame GdbEngine::parseStackFrame(const GdbMi &frameMi, int level) //qDebug() << "HANDLING FRAME:" << frameMi.toString(); StackFrame frame; frame.level = level; - // We might want to fall back to "file" once we have a mapping which - // is more complete than gdb's own ... - frame.file = cleanupFullName(QFile::decodeName(frameMi.findChild("fullname").data())); + GdbMi fullName = frameMi.findChild("fullname"); + if (fullName.isValid()) + frame.file = cleanupFullName(QFile::decodeName(fullName.data())); + else + frame.file = QFile::decodeName(frameMi.findChild("file").data()); frame.function = _(frameMi.findChild("func").data()); frame.from = _(frameMi.findChild("from").data()); frame.line = frameMi.findChild("line").data().toInt(); From 2eade14143fc739c251cf33bb559e6f60c81f5b9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Oct 2009 18:16:31 +0100 Subject: [PATCH 05/10] remove superfluous casts --- share/qtcreator/gdbmacros/gdbmacros.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 11f83c65c90..a2d6c372525 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -633,7 +633,7 @@ QDumper &QDumper::put(const void *p) if (p) { // Pointer is 'long long' on WIN_64, only static const char *printFormat = sizeof(quintptr) == sizeof(long) ? "0x%lx" : "0x%llx"; - pos += sprintf(outBuffer + pos, printFormat, reinterpret_cast(p)); + pos += sprintf(outBuffer + pos, printFormat, p); } else { pos += sprintf(outBuffer + pos, ""); } @@ -1068,8 +1068,7 @@ static void qDumpQAbstractItem(QDumper &d) mm->p = mm->m = 0; static const char *printFormat = sizeof(quintptr) == sizeof(long) ? "%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx"; - sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, - reinterpret_cast(&mm->p), reinterpret_cast(&mm->m)); + sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m); } const QAbstractItemModel *m = mi.model(); const int rowCount = m->rowCount(mi); From 36a4fddaf04031c105a8c77c20c402018f365994 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 29 Oct 2009 18:24:08 +0100 Subject: [PATCH 06/10] less confusing: use the data type which was meant --- share/qtcreator/gdbmacros/gdbmacros.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index a2d6c372525..bbc6862202f 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -632,7 +632,7 @@ QDumper &QDumper::put(const void *p) { if (p) { // Pointer is 'long long' on WIN_64, only - static const char *printFormat = sizeof(quintptr) == sizeof(long) ? "0x%lx" : "0x%llx"; + static const char *printFormat = sizeof(void *) == sizeof(long) ? "0x%lx" : "0x%llx"; pos += sprintf(outBuffer + pos, printFormat, p); } else { pos += sprintf(outBuffer + pos, ""); @@ -1066,7 +1066,7 @@ static void qDumpQAbstractItem(QDumper &d) ModelIndex *mm = reinterpret_cast(&mi); mm->r = mm->c = 0; mm->p = mm->m = 0; - static const char *printFormat = sizeof(quintptr) == sizeof(long) ? + static const char *printFormat = sizeof(void *) == sizeof(long) ? "%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx"; sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m); } @@ -2145,10 +2145,10 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value, break; #endif default: { - static const char *qTypeFormat = sizeof(quintptr) == sizeof(long) ? + static const char *qTypeFormat = sizeof(void *) == sizeof(long) ? "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%lx)" : "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%llx)"; - static const char *nonQTypeFormat = sizeof(quintptr) == sizeof(long) ? + static const char *nonQTypeFormat = sizeof(void *) == sizeof(long) ? "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%lx)" : "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)"; char buf[1000]; From 9d20a2abb45af2b1bd038acb191ece351d958d74 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Oct 2009 17:40:29 +0100 Subject: [PATCH 07/10] make attaching adapters more robust to make the behavior consistent across gdb versions, ignore the initial *stopped which gdb7 delivers while attaching. Reviewed-By: hjk --- src/plugins/debugger/gdb/attachgdbadapter.cpp | 12 ++---------- src/plugins/debugger/gdb/gdbengine.cpp | 15 ++++++++------- src/plugins/debugger/gdb/remotegdbadapter.cpp | 3 ++- src/plugins/debugger/gdb/termgdbadapter.cpp | 3 ++- src/plugins/debugger/gdb/trkgdbadapter.cpp | 1 + 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/plugins/debugger/gdb/attachgdbadapter.cpp b/src/plugins/debugger/gdb/attachgdbadapter.cpp index 4c0968233f2..0f6b50b6bd7 100644 --- a/src/plugins/debugger/gdb/attachgdbadapter.cpp +++ b/src/plugins/debugger/gdb/attachgdbadapter.cpp @@ -77,17 +77,9 @@ void AttachGdbAdapter::startInferior() void AttachGdbAdapter::handleAttach(const GdbResponse &response) { + QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); if (response.resultClass == GdbResultDone) { - // We don't know the exact 6.8.50 build where gdb started emitting - // *stopped here, so allow for some slack. - if (m_engine->m_gdbVersion < 60850) { - QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); - setState(InferiorStopped); - } else if (m_engine->m_gdbVersion < 70000 && state() == InferiorStarting) { - setState(InferiorStopped); - } else { - QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); - } + setState(InferiorStopped); debugMessage(_("INFERIOR ATTACHED")); showStatusMessage(msgAttachedToStoppedInferior()); emit inferiorPrepared(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index f6ab953e5d4..133b20fe2b9 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -889,6 +889,7 @@ void GdbEngine::updateAll() { QTC_ASSERT(state() == InferiorUnrunnable || state() == InferiorStopped, /**/); tryLoadDebuggingHelpers(); + reloadModulesInternal(); postCommand(_("-stack-list-frames"), WatchUpdate, CB(handleStackListFrames), QVariant::fromValue(StackCookie(false, true))); manager()->stackHandler()->setCurrentIndex(0); @@ -1009,6 +1010,11 @@ void GdbEngine::handleAqcuiredInferior() void GdbEngine::handleStopResponse(const GdbMi &data) { + // This is gdb 7+'s initial *stopped in response to attach. + // For consistency, we just discard it. + if (state() == InferiorStarting) + return; + const QByteArray reason = data.findChild("reason").data(); if (isExitedReason(reason)) { @@ -1051,16 +1057,12 @@ void GdbEngine::handleStopResponse(const GdbMi &data) return; } - bool initHelpers = true; if (state() == InferiorRunning) { // Stop triggered by a breakpoint or otherwise not directly // initiated by the user. setState(InferiorStopping); } else { - if (state() == InferiorStarting) - initHelpers = false; - else - QTC_ASSERT(state() == InferiorStopping, qDebug() << state()); + QTC_ASSERT(state() == InferiorStopping, qDebug() << state()); } setState(InferiorStopped); @@ -1138,8 +1140,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data) } } - if (initHelpers && m_debuggingHelperState != DebuggingHelperUninitialized) - initHelpers = false; + bool initHelpers = (m_debuggingHelperState == DebuggingHelperUninitialized); // Don't load helpers on stops triggered by signals unless it's // an intentional trap. if (initHelpers && reason == "signal-received" diff --git a/src/plugins/debugger/gdb/remotegdbadapter.cpp b/src/plugins/debugger/gdb/remotegdbadapter.cpp index 006f314584a..d49a03aaced 100644 --- a/src/plugins/debugger/gdb/remotegdbadapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbadapter.cpp @@ -191,8 +191,9 @@ void RemoteGdbAdapter::handleFileExecAndSymbols(const GdbResponse &response) void RemoteGdbAdapter::handleTargetRemote(const GdbResponse &record) { + QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); if (record.resultClass == GdbResultDone) { - QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); + setState(InferiorStopped); // gdb server will stop the remote application itself. debugMessage(_("INFERIOR STARTED")); showStatusMessage(msgAttachedToStoppedInferior()); diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp index fbdc6a6dd84..e5f43eef211 100644 --- a/src/plugins/debugger/gdb/termgdbadapter.cpp +++ b/src/plugins/debugger/gdb/termgdbadapter.cpp @@ -114,8 +114,9 @@ void TermGdbAdapter::startInferior() void TermGdbAdapter::handleStubAttached(const GdbResponse &response) { + QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); if (response.resultClass == GdbResultDone) { - QTC_ASSERT(state() == InferiorStopped, qDebug() << state()); + setState(InferiorStopped); debugMessage(_("INFERIOR ATTACHED")); emit inferiorPrepared(); } else if (response.resultClass == GdbResultError) { diff --git a/src/plugins/debugger/gdb/trkgdbadapter.cpp b/src/plugins/debugger/gdb/trkgdbadapter.cpp index 82ce54376bd..dcbe2851eea 100644 --- a/src/plugins/debugger/gdb/trkgdbadapter.cpp +++ b/src/plugins/debugger/gdb/trkgdbadapter.cpp @@ -1616,6 +1616,7 @@ void TrkGdbAdapter::handleTargetRemote(const GdbResponse &record) { QTC_ASSERT(state() == InferiorStarting, qDebug() << state()); if (record.resultClass == GdbResultDone) { + setState(InferiorStopped); emit inferiorPrepared(); } else { QString msg = tr("Connecting to TRK server adapter failed:\n") From 6d6ed26eae39fc6d4b2e843edb8498e0008f15ef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Oct 2009 15:07:17 +0100 Subject: [PATCH 08/10] frames with debug info but without source cannot be navigated to ... - in the source view, that is. so grey them out in the stack view. Reviewed-By: hjk --- src/plugins/debugger/gdb/gdbengine.cpp | 3 +-- src/plugins/debugger/stackhandler.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 133b20fe2b9..2fdde0ac2a1 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -2312,8 +2312,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response) #endif // Initialize top frame to the first valid frame. - // FIXME: Check for QFile(frame.fullname).isReadable()? - const bool isValid = !frame.file.isEmpty() && !frame.function.isEmpty(); + const bool isValid = frame.isUsable() && !frame.function.isEmpty(); if (isValid && targetFrame == -1) targetFrame = i; } diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index fa6b972e555..d2b146b9134 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -203,7 +203,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const if (index.row() == m_stackFrames.size()) return QAbstractTableModel::flags(index); const StackFrame &frame = m_stackFrames.at(index.row()); - const bool isValid = (!frame.file.isEmpty() && !frame.function.isEmpty()) + const bool isValid = (frame.isUsable() && !frame.function.isEmpty()) || theDebuggerBoolSetting(OperateByInstruction); return isValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0); } From 151b785d010b85ee0b5788f5ea95c4154d7530e0 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Oct 2009 17:16:56 +0100 Subject: [PATCH 09/10] 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 --- src/plugins/debugger/gdb/gdbengine.cpp | 22 +++++++++++++-------- src/plugins/debugger/gdb/gdbengine.h | 4 ++++ src/plugins/debugger/gdb/termgdbadapter.cpp | 14 +++++++++++++ src/plugins/debugger/gdb/termgdbadapter.h | 3 +++ 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 2fdde0ac2a1..06d5b1f3394 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -285,6 +285,9 @@ void GdbEngine::initializeVariables() m_currentFunctionArgs.clear(); m_currentFrame.clear(); m_dumperHelper.clear(); +#ifdef Q_OS_LINUX + m_entryPoint.clear(); +#endif } QString GdbEngine::errorMessage(QProcess::ProcessError error) @@ -1068,16 +1071,19 @@ void GdbEngine::handleStopResponse(const GdbMi &data) #ifdef Q_OS_LINUX // For some reason, attaching to a stopped process causes *two* stops - // when trying to continue (kernel 2.6.24-23-ubuntu). + // when trying to continue (kernel i386 2.6.24-23-ubuntu, gdb 6.8). // Interestingly enough, on MacOSX no signal is delivered at all. - if (reason == "signal-received" - && data.findChild("signal-name").data() == "SIGSTOP") { - GdbMi frameData = data.findChild("frame"); - if (frameData.findChild("func").data() == "_start" - && frameData.findChild("from").data() == "/lib/ld-linux.so.2") { - continueInferiorInternal(); - return; + if (!m_entryPoint.isEmpty()) { + if (reason == "signal-received" + && data.findChild("signal-name").data() == "SIGSTOP") { + GdbMi frameData = data.findChild("frame"); + if (frameData.findChild("addr").data() == m_entryPoint) { + continueInferiorInternal(); + return; + } } + // We are past the initial stops. No need to waste time on further checks. + m_entryPoint.clear(); } #endif diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 1229cc17d9d..2636d16c8dd 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -294,6 +294,10 @@ private: ////////// Inferior Management ////////// void handleInferiorPidChanged(qint64 pid) { manager()->notifyInferiorPidChanged(pid); } void maybeHandleInferiorPidChanged(const QString &pid); +#ifdef Q_OS_LINUX + QByteArray m_entryPoint; +#endif + private: ////////// View & Data Stuff ////////// virtual void selectThread(int index); diff --git a/src/plugins/debugger/gdb/termgdbadapter.cpp b/src/plugins/debugger/gdb/termgdbadapter.cpp index e5f43eef211..b369dad4c6d 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(); diff --git a/src/plugins/debugger/gdb/termgdbadapter.h b/src/plugins/debugger/gdb/termgdbadapter.h index 11fb04a2c4c..1b98eed9874 100644 --- a/src/plugins/debugger/gdb/termgdbadapter.h +++ b/src/plugins/debugger/gdb/termgdbadapter.h @@ -60,6 +60,9 @@ public: private: void handleStubAttached(const GdbResponse &response); +#ifdef Q_OS_LINUX + void handleEntryPoint(const GdbResponse &response); +#endif Q_SLOT void handleInferiorStarted(); Q_SLOT void stubExited(); From cc7bd7d139f8ae45dad7e4df034707d83803b41d Mon Sep 17 00:00:00 2001 From: con Date: Fri, 30 Oct 2009 17:58:14 +0100 Subject: [PATCH 10/10] Minimal translation fix. Reviewed-by: Friedemann Kleint --- share/qtcreator/translations/qtcreator_de.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index fa61bcbb885..6768a4e2b0e 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -11815,7 +11815,7 @@ unter Versionsverwaltung (%2) gestellt werden? Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) - Debug-Version des Frameworks verwenden (DYLD_IMAGE_SUFFIX=_debug) + Debug-Version von Frameworks verwenden (DYLD_IMAGE_SUFFIX=_debug)