Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Sun, 26 Aug 2012 22:58:12 Commit: 13a6056f6e28774c013ba930e76fb7d782d7aa2c https://github.com/geany/geany-plugins/commit/13a6056f6e28774c013ba930e76fb7...
Log Message: ----------- Merge pull request #66 from cesspit/debugger
Debugger
Modified Paths: -------------- debugger/src/dbm_gdb.c
Modified: debugger/src/dbm_gdb.c 12 files changed, 8 insertions(+), 4 deletions(-) =================================================================== @@ -88,7 +88,7 @@ enum sr { static GPid target_pid = 0;
/* GSource to watch GDB exit */ -static GSource *gdb_src; +static guint gdb_src_id;
/* channels for GDB input/output */ static gint gdb_in; @@ -192,7 +192,7 @@ static void on_gdb_exit(GPid pid, gint status, gpointer data) g_list_free(files); files = NULL; - g_source_destroy(gdb_src); + g_source_remove(gdb_src_id); dbg_cbs->set_exited(0); } @@ -443,6 +443,11 @@ static gboolean on_read_from_gdb(GIOChannel * src, GIOCondition cond, gpointer d *(strrchr(line, '"')) = '\0'; target_pid = atoi(line + strlen("=thread-group-created,id="")); } + else if (!target_pid && g_str_has_prefix(line, "=thread-group-started")) + { + *(strrchr(line, '"')) = '\0'; + target_pid = atoi(strrchr(line, '"') + 1); + } else if (g_str_has_prefix(line, "=thread-created")) { int thread_id; @@ -739,8 +744,7 @@ static gboolean run(const gchar* file, const gchar* commandline, GList* env, GLi setpgid(gdb_pid, 0); /* set handler for gdb process exit event */ - g_child_watch_add(gdb_pid, on_gdb_exit, NULL); - gdb_src = g_child_watch_source_new(gdb_pid); + gdb_src_id = g_child_watch_add(gdb_pid, on_gdb_exit, NULL);
/* create GDB GIO chanels */ gdb_ch_in = g_io_channel_unix_new(gdb_in);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org