debugger: add a 'break at main' checkbox in the 'start and debug external' dialog

This commit is contained in:
hjk
2009-06-12 12:57:22 +02:00
parent 94b1b1fd7b
commit b052ce2c21
8 changed files with 57 additions and 24 deletions

View File

@@ -279,6 +279,8 @@ void DebuggerManager::init()
this, SIGNAL(setSessionValueRequested(QString,QVariant)));
connect(breakView, SIGNAL(breakByFunctionRequested(QString)),
this, SLOT(breakByFunction(QString)), Qt::QueuedConnection);
connect(breakView, SIGNAL(breakByFunctionMainRequested()),
this, SLOT(breakByFunctionMain()), Qt::QueuedConnection);
// Modules
QAbstractItemView *modulesView =
@@ -1106,6 +1108,16 @@ void DebuggerManager::setBreakpoint(const QString &fileName, int lineNumber)
attemptBreakpointSynchronization();
}
void DebuggerManager::breakByFunctionMain()
{
#ifdef Q_OS_WIN
// FIXME: wrong on non-Qt based binaries
emit breakByFunction("qMain");
#else
emit breakByFunction("main");
#endif
}
void DebuggerManager::breakByFunction(const QString &functionName)
{
QTC_ASSERT(m_breakHandler, return);