forked from qt-creator/qt-creator
Cdb: Setup symbol paths before attaching to a process
Change-Id: I075661ac95da3937dae8c918b83fcc4449d9b56e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -547,6 +547,15 @@ bool CdbEngine::launchCDB(const DebuggerRunParameters &sp, QString *errorMessage
|
||||
if (!sourcePaths.isEmpty())
|
||||
arguments << "-srcpath" << sourcePaths.join(';');
|
||||
|
||||
QStringList symbolPaths = stringListSetting(CdbSymbolPaths);
|
||||
QString symbolPath = sp.inferior.environment.value("_NT_ALT_SYMBOL_PATH");
|
||||
if (!symbolPath.isEmpty())
|
||||
symbolPaths += symbolPath;
|
||||
symbolPath = sp.inferior.environment.value("_NT_SYMBOL_PATH");
|
||||
if (!symbolPath.isEmpty())
|
||||
symbolPaths += symbolPath;
|
||||
arguments << "-y" << (symbolPaths.isEmpty() ? "\"\"" : symbolPaths.join(';'));
|
||||
|
||||
// Compile argument string preserving quotes
|
||||
QString nativeArguments = expand(stringSetting(CdbAdditionalArguments));
|
||||
switch (sp.startMode) {
|
||||
@@ -640,17 +649,6 @@ void CdbEngine::setupInferior()
|
||||
[this, id](const DebuggerResponse &r) { handleBreakInsert(r, id); }});
|
||||
}
|
||||
|
||||
// setting up symbol search path
|
||||
QStringList symbolPaths = stringListSetting(CdbSymbolPaths);
|
||||
const QProcessEnvironment &env = m_process.processEnvironment();
|
||||
QString symbolPath = env.value("_NT_ALT_SYMBOL_PATH");
|
||||
if (!symbolPath.isEmpty())
|
||||
symbolPaths += symbolPath;
|
||||
symbolPath = env.value("_NT_SYMBOL_PATH");
|
||||
if (!symbolPath.isEmpty())
|
||||
symbolPaths += symbolPath;
|
||||
runCommand({".sympath \"" + symbolPaths.join(';') + '"', NoFlags});
|
||||
|
||||
runCommand({"sxn 0x4000001f", NoFlags}); // Do not break on WowX86 exceptions.
|
||||
runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints.
|
||||
runCommand({".asm source_line", NoFlags}); // Source line in assembly
|
||||
|
Reference in New Issue
Block a user