forked from qt-creator/qt-creator
Debugger: Do configuration error checking early on.
Add a configuration checking method to the Debugger manager, depending on toolchain, wire it to the engines. Check that in the debugger run controls. Add a convenience method to ICore that shows a warning message with a "Settings" button, pointing the user to a configuration error on a settings page. Remove leftovers of the dumper parser. Acked-by: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -1409,6 +1409,24 @@ int GdbEngine::currentFrame() const
|
||||
return manager()->stackHandler()->currentIndex();
|
||||
}
|
||||
|
||||
bool GdbEngine::checkConfiguration(int toolChain, QString *errorMessage, QString *settingsPage) const
|
||||
{
|
||||
switch (toolChain) {
|
||||
case ProjectExplorer::ToolChain::WINSCW: // S60
|
||||
case ProjectExplorer::ToolChain::GCCE:
|
||||
case ProjectExplorer::ToolChain::RVCT_ARMV5:
|
||||
case ProjectExplorer::ToolChain::RVCT_ARMV6:
|
||||
if (!m_trkOptions->check(errorMessage)) {
|
||||
if (settingsPage)
|
||||
*settingsPage = TrkOptionsPage::settingsId();
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
AbstractGdbAdapter *GdbEngine::createAdapter(const DebuggerStartParametersPtr &sp)
|
||||
{
|
||||
switch (sp->toolChainType) {
|
||||
@@ -3983,7 +4001,8 @@ void GdbEngine::handleAdapterStartFailed(const QString &msg, const QString &sett
|
||||
{
|
||||
setState(AdapterStartFailed);
|
||||
debugMessage(_("ADAPTER START FAILED"));
|
||||
warningWithSettings(tr("Adapter start failed"), msg, QString(), settingsIdHint);
|
||||
Core::ICore::instance()->showWarningWithOptions(tr("Adapter start failed"), msg, QString(),
|
||||
QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY), settingsIdHint);
|
||||
shutdown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user