forked from qt-creator/qt-creator
		
	debugger: add a 'break at main' checkbox in the 'start and debug external' dialog
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user