aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-12 14:49:54 +0100
committercon <qtc-committer@nokia.com>2009-11-12 17:26:10 +0100
commit7a1da73ca6d0de8520560c075ac2f66d13b1ac3a (patch)
tree54ee16fdfb691abb74429b37491e573fcf35f1fc
parent69bd99bd1d9d22fcb036270b84c5289a0cad18ae (diff)
don't track shared library events on gdb < 7, after all.
The problem is that the shlib events disturb bounded execution requests and there is no way to recover from this - the debugger will effectively turn "step over" into "continue". this is nicely explained in http://vladimir_prus.blogspot.com/2007/12/debugger-stories-pending-breakpoints.html (cherry picked from commit 0939a7f77f06e6206c9a4eeb665d7cd5dd7118d1)
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 1e36ea5816..2996be1917 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1153,6 +1153,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
}
setState(InferiorStopped);
+#if 0 // See http://vladimir_prus.blogspot.com/2007/12/debugger-stories-pending-breakpoints.html
// Due to LD_PRELOADing the dumpers, these events can occur even before
// reaching the entry point. So handle it before the entry point hacks below.
if (reason.isEmpty() && m_gdbVersion < 70000 && !m_isMacGdb) {
@@ -1179,6 +1180,7 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
return;
}
}
+#endif
#ifdef Q_OS_LINUX
if (!m_entryPoint.isEmpty()) {
@@ -1272,6 +1274,12 @@ void GdbEngine::handleStop1(const GdbMi &data)
if (m_sourcesListOutdated)
reloadSourceFilesInternal(); // This needs to be done before fullName() may need it
+ // Older gdb versions do not produce "library loaded" messages
+ // so the breakpoint update is not triggered.
+ if (m_gdbVersion < 70000 && !m_isMacGdb && !m_sourcesListUpdating
+ && manager()->breakHandler()->size() > 0)
+ postCommand(_("-break-list"), CB(handleBreakList));
+
QByteArray reason = data.findChild("reason").data();
if (reason == "breakpoint-hit") {
showStatusMessage(tr("Stopped at breakpoint."));
@@ -2247,8 +2255,10 @@ void GdbEngine::reloadModulesInternal()
{
m_modulesListOutdated = false;
postCommand(_("info shared"), NeedsStop, CB(handleModulesList));
+#if 0
if (m_gdbVersion < 70000 && !m_isMacGdb)
postCommand(_("set stop-on-solib-events 1"));
+#endif
}
void GdbEngine::handleModulesList(const GdbResponse &response)
@@ -2317,8 +2327,10 @@ void GdbEngine::reloadSourceFilesInternal()
m_sourcesListOutdated = false;
postCommand(_("-file-list-exec-source-files"), NeedsStop, CB(handleQuerySources));
postCommand(_("-break-list"), CB(handleBreakList));
+#if 0
if (m_gdbVersion < 70000 && !m_isMacGdb)
postCommand(_("set stop-on-solib-events 1"));
+#endif
}