2013-05-30 Hafiz Abid Qadeer <abidh@codesourcery.com>
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Thu, 30 May 2013 12:54:17 +0000 (12:54 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Thu, 30 May 2013 12:54:17 +0000 (12:54 +0000)
* inferior.c (top level): Include tilde.h.
(add_inferior_command): Call tilde_expand on the value of 'exec'
argument.

gdb/ChangeLog
gdb/inferior.c

index a491b25abe8038dce998c7a506329f5d1ff0e002..3921b175d8b3a7be49fd86c008659f5a2b5e1a37 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-30  Hafiz Abid Qadeer  <abidh@codesourcery.com>
+
+       * inferior.c (top level): Include tilde.h.
+       (add_inferior_command): Call tilde_expand on the value of 'exec'
+       argument.
+
 2013-05-30  Pedro Alves  <pedro@codesourcery.com>
            Yao Qi  <yao@codesourcery.com>
 
index ed6b6260b33a1743b79e97f892ee3f5b11f49378..b9e9a8d9dbcd401a6676c341f7fbbb4eed79311b 100644 (file)
@@ -35,6 +35,7 @@
 #include "continuations.h"
 #include "arch-utils.h"
 #include "target-descriptions.h"
+#include "readline/tilde.h"
 
 void _initialize_inferiors (void);
 
@@ -850,7 +851,8 @@ add_inferior_command (char *args, int from_tty)
                  ++argv;
                  if (!*argv)
                    error (_("No argument to -exec"));
-                 exec = *argv;
+                 exec = tilde_expand (*argv);
+                 make_cleanup (xfree, exec);
                }
            }
          else