[gnome-builder] gdb: implement debugger option for breakpoint on main()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] gdb: implement debugger option for breakpoint on main()
- Date: Fri, 7 May 2021 16:42:16 +0000 (UTC)
commit c77f7ba91457e311130b6e9256525b66f1319b03
Author: Christian Hergert <chergert redhat com>
Date: Fri May 7 09:42:09 2021 -0700
gdb: implement debugger option for breakpoint on main()
src/plugins/gdb/gbp-gdb-debugger.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index 6b8df2dc9..8dd90833e 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -40,6 +40,7 @@ struct _GbpGdbDebugger
GFile *builddir;
DzlSignalGroup *runner_signals;
+ GSettings *settings;
/* This is the number for the fd in the inferior process.
* It is not opened/owned by this instance (as it is in a
@@ -1471,7 +1472,10 @@ gbp_gdb_debugger_move_async (IdeDebugger *debugger,
switch (movement)
{
case IDE_DEBUGGER_MOVEMENT_START:
- command = "-exec-run --all --start";
+ if (g_settings_get_boolean (self->settings, "debugger-breakpoint-on-main"))
+ command = "-exec-run --all --start";
+ else
+ command = "-exec-run --all";
break;
case IDE_DEBUGGER_MOVEMENT_CONTINUE:
@@ -2541,6 +2545,7 @@ gbp_gdb_debugger_finalize (GObject *object)
/* Ensure no tasks were queued after dispose call */
g_assert (self->cmdqueue.length == 0);
+ g_clear_object (&self->settings);
g_clear_object (&self->io_stream);
g_clear_object (&self->read_cancellable);
g_clear_pointer (&self->parser, gdbwire_mi_parser_destroy);
@@ -2600,6 +2605,7 @@ gbp_gdb_debugger_init (GbpGdbDebugger *self)
self, gbp_gdb_debugger_output_callback
};
+ self->settings = g_settings_new ("org.gnome.builder.build");
self->parser = gdbwire_mi_parser_create (callbacks);
self->read_cancellable = g_cancellable_new ();
self->read_buffer = g_malloc (READ_BUFFER_LEN);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]