From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27745 invoked by alias); 14 Jun 2019 14:31:14 -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 21248 invoked by uid 89); 14 Jun 2019 14:31:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=symlink, redo, HX-Languages-Length:992 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Jun 2019 14:30:59 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 868215608A; Fri, 14 Jun 2019 10:30:55 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YkDkYm49sKih; Fri, 14 Jun 2019 10:30:55 -0400 (EDT) Received: from murgatroyd (174-29-48-168.hlrn.qwest.net [174.29.48.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 20510117EA6; Fri, 14 Jun 2019 10:30:55 -0400 (EDT) From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Only compute realpath when basenames_may_differ is set References: <20190530170315.9938-1-tromey@adacore.com> Date: Fri, 14 Jun 2019 14:31:00 -0000 In-Reply-To: <20190530170315.9938-1-tromey@adacore.com> (Tom Tromey's message of "Thu, 30 May 2019 11:03:15 -0600") Message-ID: <87zhmkme75.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-06/txt/msg00260.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> A user noted that, when sources are symlinked, gdb annotations will Tom> print the real path, rather than the name of the symlink. Tom> It seems to me that it is better to print the name of the file that Tom> was actually used in the build, unless there is some reason not to. Tom> This patch implements this, with the caveat that it will not work when Tom> basenames-may-differ is enabled. The way this mode is currently Tom> implemented, returning the symbolic (not real) path is not possible. Tom> While I think it would be good to redo the source file name cache and Tom> perhaps integrate it with class source_cache, I haven't done so here. Tom> Regression tested on x86-64 Fedora 29. Tom> gdb/ChangeLog Tom> 2019-05-30 Tom Tromey Tom> * source.c (find_and_open_source): Respect basenames_may_differ. I'm checking this in now. Tom