gdb/ChangeLog 2016-03-23 Jan Kratochvil Pedro Alves * exec.c (exec_file_locate_attach): Print warning for unsupported target_pid_to_exec_file. * remote.c (remote_pid_to_exec_file): Print warning for unsupported PACKET_qXfer_exec_file. * symfile-mem.c (add_vsyscall_page): Remove the "file" command message part. diff --git a/gdb/exec.c b/gdb/exec.c index 90811c0..a10ab9b 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -151,7 +151,13 @@ exec_file_locate_attach (int pid, int from_tty) /* Try to determine a filename from the process itself. */ exec_file = target_pid_to_exec_file (pid); if (exec_file == NULL) - return; + { + warning (_("No executable has been specified and target does not " + "support\n" + "determining executable automatically. " + "Try using the \"file\" command.")); + return; + } /* If gdb_sysroot is not empty and the discovered filename is absolute then prefix the filename with gdb_sysroot. */ diff --git a/gdb/remote.c b/gdb/remote.c index af0a08a..4e44ffd 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1311,7 +1311,10 @@ packet_ok (const char *buf, struct packet_config *config) internal_error (__FILE__, __LINE__, _("packet_ok: attempt to use a disabled packet")); - result = packet_check_result (buf); + if (strcmp (buf, "OK") == 0 && startswith (config->name, "vFile:")) + result = PACKET_UNKNOWN; + else + result = packet_check_result (buf); switch (result) { case PACKET_OK: @@ -12977,7 +12980,12 @@ remote_pid_to_exec_file (struct target_ops *self, int pid) char *annex = NULL; if (packet_support (PACKET_qXfer_exec_file) != PACKET_ENABLE) - return NULL; + { + warning (_("Remote gdbserver does not support determining executable " + "automatically.\n" + "FSF gdbserver version 7.10 or later would support that.")); + return NULL; + } if (filename != NULL) xfree (filename); diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 8eb5176..79739a6 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -214,8 +214,7 @@ add_vsyscall_page (struct target_ops *target, int from_tty) format should fix this. */ { warning (_("Could not load vsyscall page " - "because no executable was specified\n" - "try using the \"file\" command first.")); + "because no executable was specified")); return; } args.bfd = bfd;