aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugin.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 216e134..2cc6e25 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -699,6 +699,7 @@ do_local_gdb (AnjutaPluginSdk *sp)
{
gchar *script_name = NULL;
gint fd = 0;
+ gint child_pid;
gchar *script_contents = NULL;
GIOChannel *channel = NULL;
GIOStatus status;
@@ -760,9 +761,16 @@ do_local_gdb (AnjutaPluginSdk *sp)
cmd = g_strdup_printf (LOCAL_GDB_COMMAND, sp->triplet,
script_name, sp->gdb_local_path);
cur_dir = g_get_current_dir ();
- ianjuta_terminal_execute_command (terminal, cur_dir, cmd, NULL, &error);
-
- if (error != NULL)
+ child_pid = ianjuta_terminal_execute_command (terminal, cur_dir, cmd,
+ NULL, &error);
+ /* Currently child_pid < 0 indicate that the command execution fails, error
+ * data is not filled properly. error handling code is not removed since
+ * in future this error structure might be filled. Keep for forward
+ * compatibility
+ */
+ if (child_pid < 0)
+ g_warning("Error happned while launching local gdb command\n");
+ else if (error != NULL)
{
g_warning ("Error whilst launching local gdb command: %s", error->message);
g_clear_error (&error);