From c17619ed023b8e98a0655a12727481582da38bf8 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Mon, 29 Mar 2010 15:58:52 +0200
Subject: [PATCH] debugger: replace -exec-until with the old tbreak + continue
 combo.

---
 src/plugins/debugger/gdb/gdbengine.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index c24de18af37..502c96e3eda 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1930,9 +1930,18 @@ void GdbEngine::executeRunToLine(const QString &fileName, int lineNumber)
     setTokenBarrier();
     setState(InferiorRunningRequested);
     showStatusMessage(tr("Run to line %1 requested...").arg(lineNumber), 5000);
+#if 1
+    QByteArray loc = '"' + breakLocation(fileName).toLocal8Bit() + '"' + ':'
+        + QByteArray::number(lineNumber);
+    postCommand("tbreak " + loc);
+    postCommand("continue", RunRequest);
+#else
+    // Seems to jump to unpredicatable places. Observed in the manual
+    // tests in the Foo::Foo() constructor with both gdb 6.8 and 7.1.
     QByteArray args = '"' + breakLocation(fileName).toLocal8Bit() + '"' + ':'
         + QByteArray::number(lineNumber);
     postCommand("-exec-until " + args, RunRequest, CB(handleExecuteContinue));
+#endif
 }
 
 void GdbEngine::executeRunToFunction(const QString &functionName)
-- 
GitLab