OSDN Git Service

QmlCppDebugger: Set cpp breakpoints right on startup (again)
authorKai Koehne <kai.koehne@nokia.com>
Thu, 29 Sep 2011 13:12:43 +0000 (15:12 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Tue, 4 Oct 2011 15:12:37 +0000 (17:12 +0200)
Previous commit allows to hit cpp breakpoints before the QML engine
is up and running, so there is no need anymore to set breakpoints early
on.

Change-Id: Ia0de490d54057d51c4585c56fa9083de982ba97b
Reviewed-on: http://codereview.qt-project.org/5896
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
src/plugins/debugger/cdb/cdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp

index ba5c06a..32bb468 100644 (file)
@@ -840,15 +840,13 @@ void CdbEngine::setupInferior()
 {
     if (debug)
         qDebug("setupInferior");
-    if (!isSlaveEngine()) {
-        // QmlCppEngine expects the QML engine to be connected before any breakpoints are hit
-        // (attemptBreakpointSynchronization() will be directly called then)
-        attemptBreakpointSynchronization();
-        if (startParameters().breakOnMain) {
-            const BreakpointParameters bp(BreakpointAtMain);
-            postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings,
-                                                BreakpointModelId(-1), true), 0);
-        }
+    // QmlCppEngine expects the QML engine to be connected before any breakpoints are hit
+    // (attemptBreakpointSynchronization() will be directly called then)
+    attemptBreakpointSynchronization();
+    if (startParameters().breakOnMain) {
+        const BreakpointParameters bp(BreakpointAtMain);
+        postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings,
+                                            BreakpointModelId(-1), true), 0);
     }
     postCommand("sxn 0x4000001f", 0); // Do not break on WowX86 exceptions.
     postCommand(".asm source_line", 0); // Source line in assembly
index 1bbf7eb..1f008fb 100644 (file)
@@ -4804,7 +4804,7 @@ void GdbEngine::handleInferiorPrepared()
     QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
 
     // Initial attempt to set breakpoints.
-    if (sp.startMode != AttachCore && !isSlaveEngine()) {
+    if (sp.startMode != AttachCore) {
         showStatusMessage(tr("Setting breakpoints..."));
         showMessage(tr("Setting breakpoints..."));
         attemptBreakpointSynchronization();