From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17222 invoked by alias); 6 Oct 2012 19:36:27 -0000 Received: (qmail 17205 invoked by uid 22791); 6 Oct 2012 19:36:27 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from server-nat-6.cs.umd.edu (HELO bacon.cs.umd.edu) (128.8.127.149) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Oct 2012 19:36:20 +0000 Received: from [192.168.2.10] (pool-72-83-72-24.washdc.east.verizon.net [72.83.72.24]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 0CC60B406CF; Sat, 6 Oct 2012 15:36:17 -0400 (EDT) Subject: Re: [PATCH] Also install data-directory into the build directory as computed by relocate_gdb_directory Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: <83a9vz769w.fsf@gnu.org> Date: Sat, 06 Oct 2012 19:36:00 -0000 Cc: Khoo Yit Phang , dje@google.com, brobecker@adacore.com, jan.kratochvil@redhat.com, gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <564A38E3-9230-4FEB-A53A-970BDA2C142B@cs.umd.edu> 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> To: Eli Zaretskii X-CSD-MailScanner-ID: 0CC60B406CF.AF764 X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=not spam, ALL_TRUSTED -50.00) X-CSD-MailScanner-From: khooyp@cs.umd.edu X-CSD-MailScanner-Watermark: 1350156979.22273@3oMCdswB5ZPf0j4NnuslIw 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/msg00108.txt.bz2 Hi, 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 >>=20 >> 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 pr= esence of other files/directories, and some other application happens to us= e 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. >=20 > 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 assu= mption that we should avoid if possible (who knows what's out there). Of co= urse, we can greatly minimize the risk by checking for more files and/or th= e contents of files. But it is possible to avoid this assumption, e.g., the= other two solutions in my previous email, hence my preferences. Yit October 6, 2012