From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26793 invoked by alias); 6 Oct 2012 20:07:23 -0000 Received: (qmail 26736 invoked by uid 22791); 6 Oct 2012 20:07:14 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_NIX_SPAM,SPF_SOFTFAIL,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Oct 2012 20:07:10 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MBH00I00MEAU600@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Sat, 06 Oct 2012 22:06:27 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBH00HVXMIQN1M0@a-mtaout22.012.net.il>; Sat, 06 Oct 2012 22:06:27 +0200 (IST) Date: Sat, 06 Oct 2012 20:07:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory In-reply-to: <564A38E3-9230-4FEB-A53A-970BDA2C142B@cs.umd.edu> To: Khoo Yit Phang Cc: khooyp@cs.umd.edu, dje@google.com, brobecker@adacore.com, jan.kratochvil@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <838vbj74cn.fsf@gnu.org> References: <9F52A338-A158-44DC-90C1-F46503859613@cs.umd.edu> <285502C6-1395-4049-9D55-031EDA3AD06D@cs.umd.edu> <20120924170348.GI4146@adacore.com> <20120927091737.GB2980@adacore.com> <20121004000840.GI3028@adacore.com> <20121004013358.GJ3028@adacore.com> <20121004145105.GP3028@adacore.com> <970CCEFD-FF30-4ED4-9ED9-F9C6A5400120@cs.umd.edu> <83a9vz769w.fsf@gnu.org> <564A38E3-9230-4FEB-A53A-970BDA2C142B@cs.umd.edu> X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00109.txt.bz2 > From: Khoo Yit Phang > Date: Sat, 6 Oct 2012 15:36:13 -0400 > Cc: Khoo Yit Phang , > dje@google.com, > brobecker@adacore.com, > jan.kratochvil@redhat.com, > gdb-patches@sourceware.org > > On Oct 6, 2012, at 3:24 PM, Eli Zaretskii wrote: > > >> From: Khoo Yit Phang > >> Date: Sat, 6 Oct 2012 15:02:00 -0400 > >> Cc: Khoo Yit Phang , Joel Brobecker , Jan Kratochvil , GDB Patches > >> > >> I think the bigger issue is that $BUILDDIR/gdb/data-directory overrides the standard data-directory. If we detect run-from-builddir based on the presence of other files/directories, and some other application happens to use the same files/directories, then the user is basically stuck with either a non-working gdb (sans -data-directory) or having to uninstall that other application. > > > > I see no reason to assume that we will not be able to reliably detect > > a GDB build directory and to distinguish between that and other > > projects. Surely, we can find at least one or 2 files that only exist > > in GDB. > > But we have to make assumptions about other applications that are not under our control, that they do not use the same files, which I think is an assumption that we should avoid if possible (who knows what's out there). How many other packages will have a file called doc/gdb.info or doc/gdbint.info in their build tree? How many of them will have something called i386-cygwin-tdep.o or mi/mi-cmds.o? I could find many more files whose probability to be in a non-GDB tree is exactly zero. I think the problem you are afraid of doesn't exist.