diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-08-28 17:52:03 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-08-28 17:52:03 +0000 |
commit | 1f0c498857f8ece90893be592ee2e4f967a6d999 (patch) | |
tree | 92f1b9e8ca3fbcbc7fc0f0376ef8cb839393978c /gdb/inferior.c | |
parent | 602e3198bc03297b7d9cb34ed3838272254eba1f (diff) | |
download | gdb-1f0c498857f8ece90893be592ee2e4f967a6d999.zip gdb-1f0c498857f8ece90893be592ee2e4f967a6d999.tar.gz gdb-1f0c498857f8ece90893be592ee2e4f967a6d999.tar.bz2 |
PR gdb/15415
gdb/
2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
PR gdb/15415
* corefile.c (get_exec_file): Use exec_filename.
* defs.h (OPF_DISABLE_REALPATH): New definition. Add new comment.
* exec.c (exec_close): Free EXEC_FILENAME.
(exec_file_attach): New variable canonical_pathname. Use
OPF_DISABLE_REALPATH. Call gdb_realpath explicitly. Set
EXEC_FILENAME.
* exec.h (exec_filename): New.
* inferior.c (print_inferior, inferior_command): Use
PSPACE_EXEC_FILENAME.
* mi/mi-main.c (print_one_inferior): Likewise.
* progspace.c (clone_program_space, print_program_space): Likewise.
* progspace.h (struct program_space): New field pspace_exec_filename.
* source.c (openp): Describe OPF_DISABLE_REALPATH. New variable
realpath_fptr, initialize it from OPF_DISABLE_REALPATH, use it.
gdb/testsuite/
2013-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
PR gdb/15415
* gdb.base/argv0-symlink.c: New file.
* gdb.base/argv0-symlink.exp: New file.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index b9e9a8d..d5866e1 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -588,9 +588,8 @@ print_inferior (struct ui_out *uiout, char *requested_inferiors) ui_out_field_string (uiout, "target-id", inferior_pid_to_str (inf->pid)); - if (inf->pspace->ebfd) - ui_out_field_string (uiout, "exec", - bfd_get_filename (inf->pspace->ebfd)); + if (inf->pspace->pspace_exec_filename != NULL) + ui_out_field_string (uiout, "exec", inf->pspace->pspace_exec_filename); else ui_out_field_skip (uiout, "exec"); @@ -704,8 +703,8 @@ inferior_command (char *args, int from_tty) printf_filtered (_("[Switching to inferior %d [%s] (%s)]\n"), inf->num, inferior_pid_to_str (inf->pid), - (inf->pspace->ebfd - ? bfd_get_filename (inf->pspace->ebfd) + (inf->pspace->pspace_exec_filename != NULL + ? inf->pspace->pspace_exec_filename : _("<noexec>"))); if (inf->pid != 0) |