diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a491b25abe8..3921b175d8b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-05-30 Hafiz Abid Qadeer + + * inferior.c (top level): Include tilde.h. + (add_inferior_command): Call tilde_expand on the value of 'exec' + argument. + 2013-05-30 Pedro Alves Yao Qi diff --git a/gdb/inferior.c b/gdb/inferior.c index ed6b6260b33..b9e9a8d9dbc 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -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