forked from qt-creator/qt-creator
Debugger: Restrict the file name pattern of potential lldb executables
We now try executables such as lldb-7 or lldb-1024, but not e.g. lldb- vscode, which used to time out the autodetection code. Change-Id: Iac3b6c4d55d34ee98073f99c8e8341011845ca92 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -702,7 +702,7 @@ void DebuggerItemManagerPrivate::autoDetectCdbDebuggers()
|
|||||||
void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
|
void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
|
||||||
{
|
{
|
||||||
const QStringList filters = {"gdb-i686-pc-mingw32", "gdb-i686-pc-mingw32.exe", "gdb",
|
const QStringList filters = {"gdb-i686-pc-mingw32", "gdb-i686-pc-mingw32.exe", "gdb",
|
||||||
"gdb.exe", "lldb", "lldb.exe", "lldb-*"};
|
"gdb.exe", "lldb", "lldb.exe", "lldb-[1-9]*"};
|
||||||
|
|
||||||
// DebuggerItem result;
|
// DebuggerItem result;
|
||||||
// result.setAutoDetected(true);
|
// result.setAutoDetected(true);
|
||||||
@@ -748,15 +748,9 @@ void DebuggerItemManagerPrivate::autoDetectGdbOrLldbDebuggers()
|
|||||||
dir.setFilter(QDir::Files | QDir::Executable);
|
dir.setFilter(QDir::Files | QDir::Executable);
|
||||||
foreach (const Utils::FileName &base, path) {
|
foreach (const Utils::FileName &base, path) {
|
||||||
dir.setPath(base.toFileInfo().absoluteFilePath());
|
dir.setPath(base.toFileInfo().absoluteFilePath());
|
||||||
foreach (const QString &entry, dir.entryList()) {
|
foreach (const QString &entry, dir.entryList())
|
||||||
if (entry.startsWith("lldb-platform-")
|
|
||||||
|| entry.startsWith("lldb-gdbserver-")
|
|
||||||
|| entry.startsWith("lldb-mi-")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
suspects.append(FileName::fromString(dir.absoluteFilePath(entry)));
|
suspects.append(FileName::fromString(dir.absoluteFilePath(entry)));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach (const FileName &command, suspects) {
|
foreach (const FileName &command, suspects) {
|
||||||
const auto commandMatches = [command](const DebuggerTreeItem *titem) {
|
const auto commandMatches = [command](const DebuggerTreeItem *titem) {
|
||||||
|
|||||||
Reference in New Issue
Block a user