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:
Friedemann Kleint
2009-10-08 17:23:27 +02:00
parent c6de8d457b
commit 22ab8d5662
19 changed files with 225 additions and 222 deletions

View File

@@ -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();
}