From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31362 invoked by alias); 9 May 2012 20:34:41 -0000 Received: (qmail 31228 invoked by uid 22791); 9 May 2012 20:34:38 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 20:34:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q49KXtTW004312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 May 2012 16:33:55 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q49KXpo6024195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 9 May 2012 16:33:53 -0400 Date: Wed, 09 May 2012 20:34:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [patch 2/2] Implement multi-component --with-auto-load-dir Message-ID: <20120509203350.GA15551@host2.jankratochvil.net> References: <20120509154847.GB12692@host2.jankratochvil.net> <20120509201743.GL15555@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120509201743.GL15555@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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-05/txt/msg00316.txt.bz2 Hi Joel, On Wed, 09 May 2012 22:17:43 +0200, Joel Brobecker wrote: > I really do not understand what this new setting is about. Can you > just give me a quick concrete example of what wouldn't work with > the current code, and how this gets solved by the new setting? With Fedora scl-utils ("alternative packaging") you have both regular /usr/share/gdb/auto-load/ and also the "alternative" /opt/rh/upgradeset/root/usr/share/gdb/auto-load/ as there is both regular GDB and the "upgradeset" (=newer) GDB. While for example libstdc++ Pretty Printers is located in both (coincidentally, because it is bundled with GDB in some versions): /usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.16-gdb.py /opt/rh/upgradeset/root/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.16-gdb.py with the latter variant having more recent GDB macros and therefore preferred by newer GDB located in /opt/rh/upgradeset/root/usr/bin/gdb which is using its default configured /opt/rh/upgradeset/root/usr/share/gdb/auto-load/ it will be a problem that /usr/share/gdb/auto-load/lib64/libglib-2.0.so.0.3000.3-gdb.py is not loaded at all because it does not have any "upgradeset" variant in /opt/rh/upgradeset/root/usr/share/gdb/auto-load/ . This means we need multiple auto-load/ directories (unless we want to introduce some shell scripting symlinks magic etc.). > I was hoping at some point that this would allow us to have auto-loaded > scripts without having to have the same path structure in the auto-load > directory as in the executable (by that, I mean that if you are > debugging /work/build/gcc-feature-a/gcc/cc1, you don't need to have > cc1-gdb.gdb defined in your auto-load directory as > auto-load/work/build/gcc-feature-a/gcc/cc1-gdb.gdb. It'd just be > sufficient to have cc1-gdb.gdb defined in your scripts-directory. > But looking at the code, I don't think that this is what we are > talking about. I do not think these two features are related. I can think about some ideas but I do not see a super-elegant one for it now. Thanks, Jan