From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14471 invoked by alias); 7 Mar 2013 15:07:59 -0000 Received: (qmail 14461 invoked by uid 22791); 7 Mar 2013 15:07:57 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Thu, 07 Mar 2013 15:07:52 +0000 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 r27F7nr6025846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Mar 2013 10:07:50 -0500 Received: from host2.jankratochvil.net (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r27F7jx2007482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 7 Mar 2013 10:07:48 -0500 Date: Thu, 07 Mar 2013 15:07:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: Doug Evans , gdb-patches Subject: Re: [patch+doc 1/2] filename-display: 1->4 options {inferior,libs}{,-sepdebug} Message-ID: <20130307150745.GA12995@host2.jankratochvil.net> References: <20130215202536.GA20435@host2.jankratochvil.net> <20130227185345.GA21375@host2.jankratochvil.net> <20130227195251.GA29891@host2.jankratochvil.net> <51386C1C.3060107@redhat.com> <20130307120407.GA21059@host2.jankratochvil.net> <513897C7.1060709@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <513897C7.1060709@redhat.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: 2013-03/txt/msg00292.txt.bz2 On Thu, 07 Mar 2013 14:36:07 +0100, Pedro Alves wrote: > The set of system paths is defined by the OS > integrator, so seemed closer to being bounded to me. > The user can well put files wherever it wants. [...] > Irrespective of glass half empty vs half full, I guess the first > question is whether by-path is a better approach than by > have-sep-debug. It _feels_ more to the point, therefore better to > me, but I'm not really trying to impose it or block the other > approach. I wonder what others think. [...] > Using sepdebug for system/non-system also feels like will always > have corner cases, though. It complex to configure - it will need setting it by distros (from gdb.spec and similar files) and after all it is also not foolproof, people install their own binaries to /usr/bin and one may ask how should those be displayed. The primary problem is that making the setup non-trivial is IMO not worth it as the "relative" setting does not work correctly anyway. It should be IMO relative to the package build directory but in reality it is: * either "absolute" anyway if package always calls: gcc $PWD/parser/file.c * or "basename" if package always calls: cd parser; gcc file.c * or what is expected as relative if package calls: gcc parser/file.c (BTW sure one can always detect the full $PWD/parser/file.c path by looking also at DW_AT_comp_dir but that is not what "relative" does.) So if some complex solution should be done one should first fix the "relative" behavior so that it makes sense (=introduce a 4th new option). I hope everyone agrees the correct behavior is to display source filesnames relative to the unpacked package base source directory. If we already get configured distro-configurable system directories I have an idea - strip all common directories of all the source files but excluding source files which come from the distro-configurable system directories. This is where I failed with the common directories stripping draft patch before as one gets included files like /builddir/build/BUILD/glibc-2.15-a316c1f/malloc/mcheck-init.c: [patch FYI not for commit] Attempt to properly relativize executable's filenames http://sourceware.org/ml/gdb-patches/2013-02/msg00412.html Message-ID: <20130215195801.GA18966@host2.jankratochvil.net> It goes all a bit more far than I planned but OK, when you ask for it. Thanks, Jan