Commit e7cb7471 authored by Friedemann Kleint's avatar Friedemann Kleint

Debugger: Fix Action enabling, implement breakOnMain for CDB.

parent 2e1954ae
......@@ -820,6 +820,12 @@ void CdbEngine::setupInferior()
if (debug)
qDebug("setupInferior");
attemptBreakpointSynchronization();
if (startParameters().breakOnMain) {
const BreakpointParameters bp(BreakpointAtMain);
postCommand(cdbAddBreakpointCommand(bp, m_sourcePathMappings,
BreakpointId(-1), true), 0);
}
postCommand("sxn 0x4000001f", 0); // Do not break on WowX86 exceptions.
postCommand(".asm source_line", 0); // Source line in assembly
postExtensionCommand("pid", QByteArray(), 0, &CdbEngine::handlePid);
......
......@@ -1396,15 +1396,7 @@ void DebuggerPluginPrivate::startExternalApplication()
// Set up an ARM Symbian Abi
sp.toolChainAbi = Abi(Abi::ArmArchitecture, Abi::SymbianOS, Abi::SymbianDeviceFlavor, Abi::ElfFormat, false);
if (dlg.breakAtMain()) {
#ifdef Q_OS_WIN
// FIXME: wrong on non-Qt based binaries
breakHandler()->breakByFunction("qMain");
#else
breakHandler()->breakByFunction("main");
#endif
}
sp.breakOnMain = dlg.breakAtMain();
if (RunControl *rc = m_debuggerRunControlFactory->create(sp))
startDebugger(rc);
}
......@@ -2100,7 +2092,10 @@ void DebuggerPluginPrivate::updateDebugActions()
{
ProjectExplorerPlugin *pe = ProjectExplorerPlugin::instance();
Project *project = pe->startupProject();
m_debugAction->setEnabled(pe->canRun(project, Constants::DEBUGMODE));
m_debugAction->setEnabled(pe->canRun(project, _(Constants::DEBUGMODE)));
const bool canStepInto = pe->canRun(project, _(Constants::DEBUGMODE2));
m_stepAction->setEnabled(canStepInto);
m_nextAction->setEnabled(canStepInto);
}
void DebuggerPluginPrivate::onCoreAboutToOpen()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment