From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9995 invoked by alias); 8 Feb 2008 22:20:24 -0000 Received: (qmail 9985 invoked by uid 22791); 8 Feb 2008 22:20:21 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Feb 2008 22:19:59 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 503F598300; Fri, 8 Feb 2008 22:19:57 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 15C7C9810C; Fri, 8 Feb 2008 22:19:57 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JNbZb-0002jL-O9; Fri, 08 Feb 2008 17:19:55 -0500 Date: Fri, 08 Feb 2008 22:20:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [rfc] Use substitute-path for filename portion too Message-ID: <20080208221955.GA10092@caradoc.them.org> Mail-Followup-To: Doug Evans , Joel Brobecker , gdb-patches@sourceware.org References: <20080207174645.GA19452@caradoc.them.org> <20080207175658.GB3907@adacore.com> <20080207181346.GA21484@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-02/txt/msg00158.txt.bz2 On Thu, Feb 07, 2008 at 04:30:30PM -0800, Doug Evans wrote: > There is one related issue that I'd like to get fixed. If there are > two files foo.c, and I want to set a breakpoint in one of them, there > is currently no robust way to do that. If DW_AT_name includes _some_ > directory information then it can work, i.e. I can say break > bar/foo.c:3 and it will only find bar/foo.c even if there is > baz/foo.c. But this only works if DW_AT_name contains the requisite > directory instead of DW_AT_comp_dir containing the entire directory. > This can be achieved by specifying the path to gcc, e.g. gcc -c -g > bar/foo.c -o bar/foo.o instead of (cd bar && gcc -c -g foo.c). > > I think what should happen is that if I say "break bar/foo.c:3" then > gdb should do the appropriate searching even if DW_AT_name is only > "foo.c". If there is a collision gdb should probably either give an > error or give the user a choice - I can't imagine the user wanting to > choose "all" but I suppose that could be an option. I definitely agree that we need to improve handling of this case (though I'm not sure it's related). -- Daniel Jacobowitz CodeSourcery