From 017b6bb91cef1f344cbe8f94828e19468cb2e074 Mon Sep 17 00:00:00 2001
From: Colomban Wendling <ban@herbesfolles.org>
Date: Wed, 22 Oct 2014 16:40:02 +0200
Subject: [PATCH] debugger: Fix crash with GDB 7.7

GDB 7.7 doesn't understand `&` as an argument to `-exec-run`.

Moreover, the code handling errors from GDB has an issue with this
error and leads to a crash.

Closes https://sourceforge.net/p/geany-plugins/bugs/112/
---
 debugger/src/dbm_gdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debugger/src/dbm_gdb.c b/debugger/src/dbm_gdb.c
index 09a483a..b51b8a8 100644
--- a/debugger/src/dbm_gdb.c
+++ b/debugger/src/dbm_gdb.c
@@ -369,7 +369,7 @@ static gboolean on_read_async_output(GIOChannel * src, GIOCondition cond, gpoint
 				update_files();
 
 				/* -exec-run */
-				exec_async_command("-exec-run &");
+				exec_async_command("-exec-run");
 			}
 		}
 		else
@@ -895,7 +895,7 @@ static gboolean run(const gchar* file, const gchar* commandline, GList* env, GLi
 static void restart(void)
 {
 	dbg_cbs->clear_messages();
-	exec_async_command("-exec-run &");
+	exec_async_command("-exec-run");
 }
 	
 /*
