Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
- index 353a6f2..8f64c46 100644
- --- a/src/plugins/debugger/gdb/gdboptionspage.cpp
- +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
- @@ -74,6 +74,95 @@ void GdbOptionsPage::readGdbSettings() /* static */
- abiToGdbMap.insert(abi.toString(), binary);
- }
- settings->endArray();
- +
- + // Map old settings (pre 2.2):
- + const QChar separator = QLatin1Char(',');
- + const QString keyRoot = QLatin1String("GdbBinaries/GdbBinaries");
- + for (int i = 1; ; i++) {
- + const QString value = settings->value(keyRoot + QString::number(i)).toString();
- + if (value.isEmpty())
- + break;
- + // Split apart comma-separated binary and its numerical toolchains.
- + QStringList tokens = value.split(separator);
- + if (tokens.size() < 2)
- + break;
- +
- + const QString binary = tokens.front();
- + // Skip non-existent absolute binaries allowing for upgrades by the installer.
- + // Force a rewrite of the settings file.
- + const QFileInfo binaryInfo(binary);
- + if (binaryInfo.isAbsolute() && !binaryInfo.isExecutable()) {
- + const QString msg = QString::fromLatin1("Warning: The gdb binary '%1' does not exist, skipping.\n").arg(binary);
- + qWarning("%s", qPrintable(msg));
- + continue;
- + }
- +
- + // Create entries for all toolchains.
- + tokens.pop_front();
- + foreach (const QString &t, tokens) {
- + // Paranoia: Check if the there is already a binary configured for the toolchain.
- + QString abi;
- + switch (t.toInt())
- + {
- + case 0: // GCC
- + case 1: // Linux ICC
- +#ifndef Q_OS_WIN
- + abi = ProjectExplorer::Abi::hostAbi().toString();
- +#endif
- + break;
- + case 2: // MinGW
- + case 3: // MSVC
- + case 4: // WINCE
- +#ifdef Q_OS_WIN
- + abi = ProjectExplorer::Abi::hostAbi().toString();
- +#endif
- + break;
- + case 5: // WINSCW
- + abi = ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Symbian,
- + ProjectExplorer::Abi::Symbian_emulator,
- + ProjectExplorer::Abi::Format_ELF,
- + 32).toString();
- + break;
- + case 6: // GCCE
- + case 7: // RVCT 2, ARM v5
- + case 8: // RVCT 2, ARM v6
- + case 11: // RVCT GNUPOC
- + case 12: // RVCT 4, ARM v5
- + case 13: // RVCT 4, ARM v6
- + abi = ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Symbian,
- + ProjectExplorer::Abi::Symbian_device,
- + ProjectExplorer::Abi::Format_ELF,
- + 32).toString();
- + break;
- + case 9: // GCC Maemo5
- + abi = ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux,
- + ProjectExplorer::Abi::Linux_maemo,
- + ProjectExplorer::Abi::Format_ELF,
- + 32).toString();
- +
- + break;
- + case 14: // GCC Harmattan
- + abi = ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux,
- + ProjectExplorer::Abi::Linux_harmattan,
- + ProjectExplorer::Abi::Format_ELF,
- + 32).toString();
- + break;
- + case 15: // GCC Meego
- + abi = ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux,
- + ProjectExplorer::Abi::Linux_meego,
- + ProjectExplorer::Abi::Format_ELF,
- + 32).toString();
- + break;
- + default:
- + break;
- + }
- + if (abi.isEmpty() || abiToGdbMap.contains(abi))
- + continue;
- +
- + abiToGdbMap.insert(abi, binary);
- + }
- + }
- +
- gdbMappingChanged = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement