Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: [commit+7.6.1] [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415)
Date: Wed, 28 Aug 2013 18:04:00 -0000	[thread overview]
Message-ID: <20130828180359.GB4770@host2.jankratochvil.net> (raw)
In-Reply-To: <21022.10862.436924.879667@ruffy.mtv.corp.google.com>

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


  reply	other threads:[~2013-08-28 18:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-26 18:21 Jan Kratochvil
2013-08-26 20:29 ` Doug Evans
2013-08-27 14:09   ` Jan Kratochvil
2013-08-28 16:50     ` Doug Evans
2013-08-28 18:04       ` Jan Kratochvil [this message]
2013-09-04 10:48         ` [commit+7.6.1] " Pedro Alves
2013-09-04 16:31           ` Doug Evans
2013-09-04 16:55             ` Pedro Alves
2013-09-04 19:13           ` Jan Kratochvil
2013-09-04 16:46 ` Yufeng Zhang
2013-09-04 16:53   ` Jan Kratochvil
2013-09-04 17:28     ` Yufeng Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130828180359.GB4770@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox