From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9368 invoked by alias); 18 Sep 2012 15:38:10 -0000 Received: (qmail 9194 invoked by uid 22791); 18 Sep 2012 15:38:09 -0000 X-SWARE-Spam-Status: No, hits=-3.8 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; Tue, 18 Sep 2012 15:37:56 +0000 Received: from [10.109.174.174] (129-2-129-155.wireless.umd.edu [129.2.129.155]) (Authenticated sender: khooyp) by bacon.cs.umd.edu (Postfix) with ESMTPSA id 8A2C5B401AC; Tue, 18 Sep 2012 11:37:45 -0400 (EDT) Subject: Re: [PATCH] Warn about data-directory when failing to import Python "gdb" module Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Khoo Yit Phang In-Reply-To: <20120918115814.GA4659@host2.jankratochvil.net> Date: Tue, 18 Sep 2012 15:38:00 -0000 Cc: Khoo Yit Phang , Eli Zaretskii , Joel Brobecker , gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <8A40A823-A534-4F9C-AF1A-1202E98E03B0@cs.umd.edu> References: <20120917202241.GB4423@host2.jankratochvil.net> <20120917205828.GA28626@adacore.com> <83txuv26ti.fsf@gnu.org> <20120918115814.GA4659@host2.jankratochvil.net> To: Jan Kratochvil X-CSD-MailScanner-ID: 8A2C5B401AC.AFEB8 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: 1348587465.98929@Ysc33+hUUHEysqYTnzAHXg 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-09/txt/msg00366.txt.bz2 Hi, On Sep 18, 2012, at 7:58 AM, Jan Kratochvil wrote: > On Tue, 18 Sep 2012 08:17:29 +0200, Eli Zaretskii wrote: >> Is it possible to make GDB find its data-directory when it is run from >> the directory where it was built? >=20 > relocate_gdb_directory call could be adjusted to handle data-directory al= so in > the GDB build directory. If I understand relocate_gdb_directory, it already tries to relocate data-d= irectory from /usr/local/share/gdb (GDB_DATADIR on my config) to build-dire= ctory/gdb/../share/gdb. Could we move the build-directory/gdb/data-director= y there? Otherwise, do you mean to change relocate_gdb_directory to specially check = for GDB_DATADIR and replace it with buiid-directory/gdb/data-directory? Tha= t could lead to the odd possibility that an installed GDB would look for da= ta-directory in a stray build directory. I suppose this can be prevented by= checking if gdb_program_name is itself located in build-directory. Yit September 18, 2012