summaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-08-28 17:52:02 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-08-28 17:52:02 +0000
commitf863b373957343fa4fdfd8f00548925a8af73413 (patch)
tree57a9094e64afba936ae23ce6d61ffc4434aa002b /gdb/progspace.c
parent24af3f3f3f4baab0815a8b1093bbc01842b837a3 (diff)
downloadgdb-f863b373957343fa4fdfd8f00548925a8af73413.tar.gz
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/progspace.c')
-rw-r--r--gdb/progspace.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 590ea9b6927..52460ab84f8 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -196,8 +196,8 @@ clone_program_space (struct program_space *dest, struct program_space *src)
set_current_program_space (dest);
- if (src->ebfd != NULL)
- exec_file_attach (bfd_get_filename (src->ebfd), 0);
+ if (src->pspace_exec_filename != NULL)
+ exec_file_attach (src->pspace_exec_filename, 0);
if (src->symfile_object_file != NULL)
symbol_file_add_main (src->symfile_object_file->name, 0);
@@ -336,9 +336,8 @@ print_program_space (struct ui_out *uiout, int requested)
ui_out_field_int (uiout, "id", pspace->num);
- if (pspace->ebfd)
- ui_out_field_string (uiout, "exec",
- bfd_get_filename (pspace->ebfd));
+ if (pspace->pspace_exec_filename)
+ ui_out_field_string (uiout, "exec", pspace->pspace_exec_filename);
else
ui_out_field_skip (uiout, "exec");