From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16819 invoked by alias); 28 Aug 2013 18:04:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16806 invoked by uid 89); 28 Aug 2013 18:04:06 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Aug 2013 18:04:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7SI43pS025066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Aug 2013 14:04:03 -0400 Received: from host2.jankratochvil.net (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7SI40UQ012157 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 28 Aug 2013 14:04:02 -0400 Date: Wed, 28 Aug 2013 18:04:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: gdb-patches@sourceware.org Subject: [commit+7.6.1] [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415) Message-ID: <20130828180359.GB4770@host2.jankratochvil.net> References: <20130826182111.GA19509@host2.jankratochvil.net> <21019.47767.404597.352962@ruffy.mtv.corp.google.com> <20130827140915.GA17861@host2.jankratochvil.net> <21022.10862.436924.879667@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21022.10862.436924.879667@ruffy.mtv.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-08/txt/msg00847.txt.bz2 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 > > > > 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 > > > > 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