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
        {
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to