From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18623 invoked by alias); 24 Apr 2009 14:52:39 -0000 Received: (qmail 18533 invoked by uid 22791); 24 Apr 2009 14:52:37 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 24 Apr 2009 14:52:29 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3OEqLuX006264; Fri, 24 Apr 2009 10:52:21 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3OEqJ5R030542; Fri, 24 Apr 2009 10:52:19 -0400 Received: from opsy.redhat.com (vpn-12-101.rdu.redhat.com [10.11.12.101]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3OEqIca010124; Fri, 24 Apr 2009 10:52:18 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 77DB8C881B1; Fri, 24 Apr 2009 08:52:17 -0600 (MDT) To: Francois Rigault Cc: gdb-patches@sourceware.org, Daniel Jacobowitz , Joel Brobecker Subject: Re: [Patch] Improve path lookup of absolute source file References: <20090315193005.GA9294@adacore.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 24 Apr 2009 14:52:00 -0000 In-Reply-To: (Francois Rigault's message of "Tue\, 17 Mar 2009 15\:37\:33 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-04/txt/msg00692.txt.bz2 >>>>> "Francois" == Francois Rigault writes: This particular problem has 3 pending patches... the one from this thread, and also: http://sourceware.org/ml/gdb-patches/2008-06/msg00027.html http://sourceware.org/ml/gdb-patches/2009-01/msg00325.html Of these I prefer the approach taken by the patch I'm replying to, because it solves the symlink problem. The first patch also changes lookup_symtab, so I'm not sure whether the patch I'm responding to is sufficient. Francois> In the patch below, the file name lookup is done in 2 times : Francois> The first pass will try to resolve the file name only if basenames Francois> match. The second pass will try to resolve the file name as before, Francois> resolving all the files path from the symtab. This sounds reasonable to me. It may change the order in which files are found, but I don't think we provide any guarantees about that. Do you have a copyright assignment on file? This patch is big enough to require one. The patch itself looks reasonable, though it has a number of formatting nits to pick. We can work these out once the paperwork issue is dealt with. Alternatively, if one of the other patch submitters wants to rewrite his patch to take the 2-pass approach, that would be fine too. It seems to me that the 2-pass approach means that a typo in the command will still make gdb pause for a long time while it searches all the psymtabs (and fails). Perhaps the loop needs a QUIT? I don't know if that is safe here or not, though the calls to make_cleanup make me think that is probably is. Tom