forked from qt-creator/qt-creator
Debugger: Don't pass comments as custom commands to backends
GDB creates disturbing replies for them. Fixes: QTCREATORBUG-25666 Change-Id: If6223d1065cb96301e3e25aec15e653702e78d08 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1884,8 +1884,15 @@ QString DebuggerEngine::expand(const QString &string) const
|
||||
|
||||
QString DebuggerEngine::nativeStartupCommands() const
|
||||
{
|
||||
return expand(QStringList({debuggerSettings()->gdbStartupCommands.value(),
|
||||
runParameters().additionalStartupCommands}).join('\n'));
|
||||
QStringList lines = debuggerSettings()->gdbStartupCommands.value().split('\n');
|
||||
lines += runParameters().additionalStartupCommands.split('\n');
|
||||
|
||||
lines = Utils::filtered(lines, [](const QString line) {
|
||||
const QString trimmed = line.trimmed();
|
||||
return !trimmed.isEmpty() && !trimmed.startsWith('#');
|
||||
});
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
Perspective *DebuggerEngine::perspective() const
|
||||
|
||||
Reference in New Issue
Block a user