diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2016-04-06 15:57:08 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2016-04-06 15:57:08 +0200 |
commit | fef3cb9f3aa84018d10866f89228ae3f23e5ca7e (patch) | |
tree | 91ff8134277961ab695c5fa892bc441cb08f52e5 /gdb/exec.c | |
parent | 15dd01b1209ec92b361dd2547708dd17ffc2a786 (diff) | |
download | fsf-binutils-gdb-fef3cb9f3aa84018d10866f89228ae3f23e5ca7e.zip fsf-binutils-gdb-fef3cb9f3aa84018d10866f89228ae3f23e5ca7e.tar.gz fsf-binutils-gdb-fef3cb9f3aa84018d10866f89228ae3f23e5ca7e.tar.bz2 |
Print the "file" command suggestion in exec_file_locate_attach
currently:
$ gdbserver-7.9 :1234 true &
$ gdb -q -ex 'target remote :1234' # that -q is not relevant here
Remote debugging using :1234
warning: Could not load vsyscall page because no executable was specified
try using the "file" command first.
0x00007ffff7ddcc80 in ?? ()
(gdb) b main
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) _
Provide more suggestive message to use the "file" command.
gdb/ChangeLog
2016-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
Pedro Alves <palves@redhat.com>
* exec.c (exec_file_locate_attach): Print warning for unsupported
target_pid_to_exec_file.
* symfile-mem.c (add_vsyscall_page): Remove the "file" command
message part.
Diffstat (limited to 'gdb/exec.c')
-rw-r--r-- | gdb/exec.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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. */ |