From 5fcfe159cf53194cb6fb94d1bbd0c4e8e77d7578 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 30 Oct 2019 09:12:18 +0100 Subject: Debugger: adjust resetting the symbol server after cdb update The cdb symbol server can currently only be cleared by setting the symbol path via .sympath command and an empty string. Change-Id: I013b106856d87dbc2de0fdcaa876fd6d9378fb63 Reviewed-by: Christian Stenger --- src/plugins/debugger/cdb/cdbengine.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 4e04a02fc4..798013ed42 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -394,14 +394,7 @@ void CdbEngine::setupEngine() if (!sourcePaths.isEmpty()) debugger.addArgs({"-srcpath", sourcePaths.join(';')}); - QStringList symbolPaths = stringListSetting(CdbSymbolPaths); - QString symbolPath = sp.inferior.environment.expandedValueForKey("_NT_ALT_SYMBOL_PATH"); - if (!symbolPath.isEmpty()) - symbolPaths += symbolPath; - symbolPath = sp.inferior.environment.expandedValueForKey("_NT_SYMBOL_PATH"); - if (!symbolPath.isEmpty()) - symbolPaths += symbolPath; - debugger.addArgs({"-y", symbolPaths.join(';')}); + debugger.addArgs({"-y", QChar('"') + stringListSetting(CdbSymbolPaths).join(';') + '"'}); switch (sp.startMode) { case StartInternal: @@ -501,6 +494,16 @@ void CdbEngine::handleInitialSessionIdle() } // Take ownership of the breakpoint. Requests insertion. TODO: Cpp only? BreakpointManager::claimBreakpointsForEngine(this); + + QStringList symbolPaths = stringListSetting(CdbSymbolPaths); + QString symbolPath = rp.inferior.environment.expandedValueForKey("_NT_ALT_SYMBOL_PATH"); + if (!symbolPath.isEmpty()) + symbolPaths += symbolPath; + symbolPath = rp.inferior.environment.expandedValueForKey("_NT_SYMBOL_PATH"); + if (!symbolPath.isEmpty()) + symbolPaths += symbolPath; + + runCommand({QString(".sympath \"") + symbolPaths.join(';') + '"'}); runCommand({".symopt+0x8000"}); // disable searching public symbol table - improving the symbol lookup speed runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions. runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints. -- cgit v1.2.1