summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@theqtcompany.com>2016-03-18 14:17:25 +0100
committerDavid Schulz <david.schulz@theqtcompany.com>2016-03-18 14:16:31 +0000
commit1da7c060cb3bab17099227d10e6bc6b51572c592 (patch)
treed5dc2c480bededf505a83ffc2c07b2acba90f0dc
parenta029aafdf0b612192a5e2a09fcb410b1ab67d880 (diff)
downloadqt-creator-1da7c060cb3bab17099227d10e6bc6b51572c592.tar.gz
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 <christian.stenger@theqtcompany.com>
-rw-r--r--src/plugins/debugger/cdb/cdbengine.cpp15
1 files 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.