From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8605 invoked by alias); 17 Jul 2013 17:24:45 -0000 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 Received: (qmail 8596 invoked by uid 89); 17 Jul 2013 17:24:45 -0000 X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS,TW_BG,TW_DW,TW_GT,TW_LR,TW_RW,TW_WX,TW_XR autolearn=no version=3.3.1 Received: from Unknown (HELO mail-ie0-f171.google.com) (209.85.223.171) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 17:24:44 +0000 Received: by mail-ie0-f171.google.com with SMTP id qd12so4691854ieb.30 for ; Wed, 17 Jul 2013 10:24:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=06eznhPkRvYFTDK/jEckXZE0uWI2M5mut7i+dP0Lm1Y=; b=JfG5f4nKMbouTV+9hEQpEU72fAWk0VCXl+pvuVR0PDq2uWVuvK55/MUP+4GFUl6QFJ JaEzpnplMue31qEO6GScejV88gvPjmO8cmhm0ealsc4gyjzcR/Zsxoahd6wzsrfX80VR +jACkaIx0pJK7ESx3pPbh24j+JiZIB+Gzd5W754s8I2XpT9nBD3h3dks5sz+GCQpC14l +h3EfLYPHwsVuI0b1PsCl7+AgZACdp/+JHd4naGJMnRLZvlPc2KF83h237vcE63vS/W9 okCUC7aAtU7u11djZSDa+8PRKvRgE5CTEyWwZ8vsmF73soNAWaBpw79ICA4nNj0DVkfO /kiQ== MIME-Version: 1.0 X-Received: by 10.42.122.19 with SMTP id l19mr5262197icr.12.1374081876988; Wed, 17 Jul 2013 10:24:36 -0700 (PDT) Received: by 10.64.62.67 with HTTP; Wed, 17 Jul 2013 10:24:36 -0700 (PDT) In-Reply-To: <20130717165045.GA7275@host2.jankratochvil.net> References: <20130127223135.GB15252@host2.jankratochvil.net> <0377C58828D86C4588AEEC42FC3B85A71762FE8D@IRSMSX105.ger.corp.intel.com> <20130717165045.GA7275@host2.jankratochvil.net> Date: Wed, 17 Jul 2013 17:24:00 -0000 Message-ID: Subject: Re: [patchv2 1/11] Remove xfullpath (use gdb_realpath instead) From: Doug Evans To: Jan Kratochvil Cc: "Agovic, Sanimir" , "gdb-patches@sourceware.org" , Cary Coutant , Sterling Augustine Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmGR7NRSIZdbqLCO3zDxQRW2hxZBMo15ZVQkCczFYWHiyhL3YhBv9MDVfQ2WDmCcExnCCdxp9M7N2S9VL6IHOIpC8JpSCLP69Y6kJAt44oRcyh7P806ULQp1Q6E9JBnwd2TjfZABFPFZCFgnGkK3TSZt9XeG1zZmBpdAcSJhEae8DJsc8iFq7fLEDZXPM3V227DIG6NzOux9mAm6RkEGf0pv1jR7w== X-SW-Source: 2013-07/txt/msg00405.txt.bz2 On Wed, Jul 17, 2013 at 9:50 AM, Jan Kratochvil wrote: > On Wed, 17 Jul 2013 18:12:53 +0200, Doug Evans wrote: >> Ah, forgot a reason. [How not unexpected, sigh.] >> >> If a binary has an auxiliary file (e.g., a separate debug info file or >> a -gdb.py file) then gdb won't be able to find them - the auxiliary >> files could be named and/or located based on the realpath name. > > In general GDB does many comparison for file identity by: > strcmp (xfullpath (a), xfullpath (b)) == 0 > > It would be much more efficient to do: > stat (a).st_{dev,ino} == stat (b).st_{dev,ino} > > Going to check what to do with the argv[0] problem, there seems to be xfullpath > excessive. > > I do not know what happens with ${binary}.dwp. But .debug files were always > symlinked similar way to their original binary files: > > lrwxrwxrwx 1 root root 27 Jun 19 00:23 /lib64/libgtk-x11-2.0.so -> libgtk-x11-2.0.so.0.2400.19* > lrwxrwxrwx 1 root root 27 Jun 19 00:23 /lib64/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.19* > -rwxr-xr-x 1 root root 4779088 Jun 16 22:05 /lib64/libgtk-x11-2.0.so.0.2400.19* > lrwxrwxrwx 1 root root 33 Jun 19 00:23 /usr/lib/debug/lib64/libgtk-x11-2.0.so.debug -> libgtk-x11-2.0.so.0.2400.19.debug > lrwxrwxrwx 1 root root 33 Jun 19 00:23 /usr/lib/debug/lib64/libgtk-x11-2.0.so.0.debug -> libgtk-x11-2.0.so.0.2400.19.debug > -r--r--r-- 1 root root 13663732 Jun 16 22:05 /usr/lib/debug/lib64/libgtk-x11-2.0.so.0.2400.19.debug > > So I would say this is a bug in the script generating *.dwp, isn't it? re: dwp: No, it's an artifact of the underlying build system. It's not dwp-specific in any way. [Imagine a build tree that is actually a symlink forest.]