diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f6898fc0be..a3fa56f873 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-07-24 Pedro Alves + + * fork-child.c (fork_inferior): Print argv[0] instead of exec_file. + 2015-07-24 Pedro Alves * aarch64-linux-nat.c: Include nat/gdb_ptrace.h instead of diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 66c07fbf39..4ba62b09ac 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -365,7 +365,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, /* If we get here, it's an error. */ save_errno = errno; - fprintf_unfiltered (gdb_stderr, "Cannot exec %s", exec_file); + fprintf_unfiltered (gdb_stderr, "Cannot exec %s", argv[0]); for (i = 1; argv[i] != NULL; i++) fprintf_unfiltered (gdb_stderr, " %s", argv[i]); fprintf_unfiltered (gdb_stderr, ".\n");