anjuta r3683 - in trunk: . plugins/gdb
- From: sgranjoux svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r3683 - in trunk: . plugins/gdb
- Date: Sun, 17 Feb 2008 11:52:15 +0000 (GMT)
Author: sgranjoux
Date: Sun Feb 17 11:52:15 2008
New Revision: 3683
URL: http://svn.gnome.org/viewvc/anjuta?rev=3683&view=rev
Log:
* plugins/gdb/debugger.c:
Load executable in gdb with space in path name
Modified:
trunk/ChangeLog
trunk/plugins/gdb/debugger.c
Modified: trunk/plugins/gdb/debugger.c
==============================================================================
--- trunk/plugins/gdb/debugger.c (original)
+++ trunk/plugins/gdb/debugger.c Sun Feb 17 11:52:15 2008
@@ -733,7 +733,9 @@
if (exec_dir)
{
- dir = g_strconcat (" -directory=", exec_dir, NULL);
+ gchar *quoted_exec_dir = g_shell_quote (exec_dir);
+ dir = g_strconcat (" -directory=", quoted_exec_dir, NULL);
+ g_free (quoted_exec_dir);
dir_list = g_list_prepend (dir_list, exec_dir);
}
else
@@ -782,21 +784,23 @@
if (prog && strlen(prog) > 0)
{
+ gchar *quoted_prog = g_shell_quote (prog);
if (exec_dir)
chdir (exec_dir);
if (is_libtool_prog == FALSE)
{
command_str = g_strdup_printf (GDB_PATH " -f -n -i=mi2 %s %s "
"-x %s/gdb.init %s", dir, term == NULL ? "" : term,
- PACKAGE_DATA_DIR, prog);
+ PACKAGE_DATA_DIR, quoted_prog);
}
else
{
command_str = g_strdup_printf ("libtool --mode=execute " GDB_PATH
" -f -n -i=mi2 %s %s "
"-x %s/gdb.init %s", dir, term == NULL ? "" : term,
- PACKAGE_DATA_DIR, prog);
+ PACKAGE_DATA_DIR, quoted_prog);
}
+ g_free (quoted_prog);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]