diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index e94d75d..2059fac 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -510,7 +510,17 @@ void SeerMainWindow::handleRunExecutable () { } void SeerMainWindow::handleStartExecutable () { - gdbWidget->handleGdbRunExecutable("inmain"); + + QString breakfunction = gdbWidget->executableBreakpointFunctionName(); + + // No break function, attempt to stop in "main". + if (breakfunction == "") { + gdbWidget->handleGdbRunExecutable("inmain"); + + // Otherwise, attempt to stop in the function. + }else{ + gdbWidget->handleGdbRunExecutable("infunction"); + } } void SeerMainWindow::handleStyleMenuChanged () {