[gnome-builder/gnome-builder-41] flatpak: allow spawning gnome-builder-flatpak with gdbserver
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-41] flatpak: allow spawning gnome-builder-flatpak with gdbserver
- Date: Thu, 18 Nov 2021 22:15:57 +0000 (UTC)
commit ec11ccbe51c5aae3b32650d2b4a6c40fc0b4b07e
Author: Christian Hergert <chergert redhat com>
Date: Thu Nov 18 12:58:32 2021 -0800
flatpak: allow spawning gnome-builder-flatpak with gdbserver
In the case we need to debug this, it is really handy to be able to connect
to the gnome-builder-flatpak process with gdbserver.
src/plugins/flatpak/gbp-flatpak-client.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-client.c b/src/plugins/flatpak/gbp-flatpak-client.c
index ec6443651..5c5d19112 100644
--- a/src/plugins/flatpak/gbp-flatpak-client.c
+++ b/src/plugins/flatpak/gbp-flatpak-client.c
@@ -176,10 +176,14 @@ gbp_flatpak_client_parent_set (IdeObject *object,
G_SUBPROCESS_FLAGS_STDIN_PIPE);
ide_subprocess_launcher_set_cwd (launcher, g_get_home_dir ());
ide_subprocess_launcher_set_clear_env (launcher, FALSE);
-#if 0
- ide_subprocess_launcher_push_argv (launcher, "gdbserver");
- ide_subprocess_launcher_push_argv (launcher, "localhost:8888");
-#endif
+
+ if (g_getenv ("BUILDER_FLATPAK_DEBUG") != NULL)
+ {
+ ide_subprocess_launcher_setenv (launcher, "G_DEBUG", "fatal-criticals", TRUE);
+ ide_subprocess_launcher_push_argv (launcher, "gdbserver");
+ ide_subprocess_launcher_push_argv (launcher, "localhost:8888");
+ }
+
ide_subprocess_launcher_push_argv (launcher, PACKAGE_LIBEXECDIR"/gnome-builder-flatpak");
self->supervisor = ide_subprocess_supervisor_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]