From 1da7c060cb3bab17099227d10e6bc6b51572c592 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 18 Mar 2016 14:17:25 +0100 Subject: Debugger: Always set the cdb symbolpath. In newer cdb versions the default symbol path points to the microsoft symbol server. This can lead to a very long start up time for inferiors including many modules, because every module is verified against that symbol server. Unless the user does not explicitly set such a symbol server in the cdb settings do not use a symbol server. Change-Id: I0b24e2dd12f6cef98c55f4f57f0c800cecfc3c3f Reviewed-by: Christian Stenger --- src/plugins/debugger/cdb/cdbengine.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 4e7e2e90b7..cd8de514b5 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -544,9 +544,6 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage if (boolSetting(IgnoreFirstChanceAccessViolation)) arguments << QLatin1String("-x"); - const QStringList &symbolPaths = stringListSetting(CdbSymbolPaths); - if (!symbolPaths.isEmpty()) - arguments << QLatin1String("-y") << symbolPaths.join(QLatin1Char(';')); const QStringList &sourcePaths = stringListSetting(CdbSourcePaths); if (!sourcePaths.isEmpty()) arguments << QLatin1String("-srcpath") << sourcePaths.join(QLatin1Char(';')); @@ -642,6 +639,18 @@ void CdbEngine::setupInferior() runCommand({cdbAddBreakpointCommand(bp, m_sourcePathMappings, id, true), BuiltinCommand, [this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }}); } + + // setting up symbol search path + QStringList symbolPaths = stringListSetting(CdbSymbolPaths); + const QProcessEnvironment &env = QProcessEnvironment::systemEnvironment(); + QString symbolPath = env.value(QLatin1String("_NT_ALT_SYMBOL_PATH")); + if (!symbolPath.isEmpty()) + symbolPaths += symbolPath; + symbolPath = env.value(QLatin1String("_NT_SYMBOL_PATH")); + if (!symbolPath.isEmpty()) + symbolPaths += symbolPath; + runCommand({".sympath \"" + symbolPaths.join(QLatin1Char(';')).toLatin1() + '"', NoFlags}); + runCommand({"!sym noisy", NoFlags}); // Show symbol load information. runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions. runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints. -- cgit v1.2.1