[gnome-builder/wip/gtk4-port: 1638/1774] plugins/gdb: exit debugger when inferior exits
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1638/1774] plugins/gdb: exit debugger when inferior exits
- Date: Mon, 11 Jul 2022 22:31:52 +0000 (UTC)
commit 83399dcb94b4075f80ea57cc7e586e5f35fd99bf
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 24 00:07:46 2022 -0700
plugins/gdb: exit debugger when inferior exits
src/plugins/gdb/gbp-gdb-debugger.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index dae04347d..256344892 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -651,6 +651,14 @@ gbp_gdb_debugger_handle_stopped (GbpGdbDebugger *self,
ide_debugger_emit_thread_selected (IDE_DEBUGGER (self), thread);
ide_debugger_emit_stopped (IDE_DEBUGGER (self), stop_reason, breakpoint);
+
+ /* Currently, we expect to have gdb exit with the program. We might change that
+ * at some point, but it's currently the expectation.
+ */
+ if (stop_reason == IDE_DEBUGGER_STOP_EXITED_SIGNALED ||
+ stop_reason == IDE_DEBUGGER_STOP_EXITED_NORMALLY ||
+ stop_reason == IDE_DEBUGGER_STOP_EXITED)
+ gbp_gdb_debugger_exec_async (self, "-gdb-exit", NULL, NULL, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]