[commit+7.6.1] [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
Jan Kratochvil
jan.kratochvil@redhat.com
Wed Aug 28 18:04:00 GMT 2013
On Wed, 28 Aug 2013 18:50:54 +0200, Doug Evans wrote:
> I can imagine good reasons to traverse at least some symlinks for the
> user's benefit.
Which one? This is discussed in:
Subject: [patch 2/3] Use gdb_realpath in gdb_bfd_open
https://sourceware.org/ml/gdb-patches/2013-08/msg00839.html
Message-ID: <20130828160547.GC23977@host2.jankratochvil.net>
> OTOH, calling gdb_realpath is like the last thing openp does.
> I think a reasonable case can be made that it's trying to do too much, and the
> caller should call gdb_realpath if s/he wants. One could provide a wrapper
> that calls openp and then realpath to simplify things, which in some sense
> is just a case of six-of-one. I guess it just feels cleaner to build
> features out of functions instead of flags.
That seems as a good idea, I will update:
[patch 1/3] Code cleanup: OPF_DISABLE_REALPATH -> OPF_RETURN_REALPATH
https://sourceware.org/ml/gdb-patches/2013-08/msg00838.html
Message-ID: <20130828160537.GB23977@host2.jankratochvil.net>
> > 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.
>
> LGTM
Therefore checked in:
https://sourceware.org/ml/gdb-cvs/2013-08/msg00149.html
and for 7.6.1:
https://sourceware.org/ml/gdb-cvs/2013-08/msg00150.html
Thanks,
Jan
More information about the Gdb-patches
mailing list