Shutdown gdb when 'close' event happens.

This should take care of detaching from a remote pid.
This commit is contained in:
Ernie Pasveer
2022-03-12 09:24:28 -06:00
parent 9a5c230032
commit 48e36c08e9
3 changed files with 17 additions and 0 deletions
+14
View File
@@ -749,6 +749,20 @@ void SeerGdbWidget::handleGdbCoreFileExecutable () {
handleGdbCommand(QString("-target-select core %1").arg(executableCoreFilename()));
}
void SeerGdbWidget::handleGdbShutdown () {
if (isGdbRuning() == false) {
return;
}
// Give the gdb and 'exit' command.
// This should handle detaching from an attached pid.
handleGdbExit();
// Kill the gdb.
killGdb();
}
void SeerGdbWidget::handleGdbRunToLine (QString fullname, int lineno) {
if (executableLaunchMode() == "") {
+1
View File
@@ -111,6 +111,7 @@ class SeerGdbWidget : public QWidget, protected Ui::SeerGdbWidgetForm {
void handleGdbAttachExecutable ();
void handleGdbConnectExecutable ();
void handleGdbCoreFileExecutable ();
void handleGdbShutdown ();
void handleGdbRunToLine (QString fullname, int lineno);
void handleGdbNext ();
void handleGdbStep ();
+2
View File
@@ -106,6 +106,8 @@ SeerMainWindow::SeerMainWindow(QWidget* parent) : QMainWindow(parent) {
QObject::connect(runStatus, &SeerRunStatusIndicator::statusChanged, this, &SeerMainWindow::handleRunStatusChanged);
QObject::connect(qApp, &QApplication::aboutToQuit, gdbWidget, &SeerGdbWidget::handleGdbShutdown);
// Restore window settings.
readSettings();