From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12852 invoked by alias); 25 Mar 2002 17:23:31 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12843 invoked from network); 25 Mar 2002 17:23:29 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 25 Mar 2002 17:23:29 -0000 Received: from creche.cygnus.com (ta0205.peakpeak.com [204.144.244.205]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA18550; Mon, 25 Mar 2002 10:23:17 -0700 Received: (from tromey@localhost) by creche.cygnus.com (8.9.3/8.9.3) id KAA11235; Mon, 25 Mar 2002 10:57:10 -0700 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] gdb_realpath causes problems with GVD References: <20020319171236.D6465@act-europe.fr> <87adt2ri93.fsf@creche.redhat.com> <20020321091144.A30346@act-europe.fr> <20020321124411.A3351@act-europe.fr> <87663mo5uh.fsf@creche.redhat.com> <20020325102204.A1974@act-europe.fr> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: Life is selling REVOLUTIONARY HAIR PRODUCTS! Date: Mon, 25 Mar 2002 09:23:00 -0000 In-Reply-To: Joel Brobecker's message of "Mon, 25 Mar 2002 10:22:04 +0100" Message-ID: <873cyoh6oa.fsf@creche.redhat.com> X-SW-Source: 2002-03/txt/msg00463.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> I think it is wrong to force the user to follow links (I'm Joel> trying to find a not so strong way to voice my opinion, but not Joel> being a native speaker I can't find any). I don't understand. The way things stand right now, if the user uses an absolute path, then realpath is used to determine whether the file matches. Note that any absolute path will work here. If the user provides a relative path -- which is indeed what most humans, as opposed to GUI wrappers, actually do -- then the realpath stuff isn't used. So users can always use the file name that they know (the one that is in their Makefile), and gdb will understand. I don't see when a user would be forced to follow a link. The case that is causing you problems is when gdb prints the real file name, and then the user tries to set a breakpoint using just the basename of that file name. This seems like an unlikely scenario to me. Joel> Let me suggest the following: Joel> - Use xfullpath when printing the filename in "info line" Joel> - Try both xfullpath and then gdb_realpath when setting breakpoints. Joel> That way, we remain consistent between the filenames known to the user, Joel> the filenames displayed by GDB, but at the same time being lenient in Joel> what we accept. Joel> What do you think? Would that work for you? If it doesn't affect the feature I care about, then it doesn't matter to me. The feature in question is having a way to tell gdb unambiguously which file a breakpoint should appear in. The current mechanism for this is to use an absolute path. Another choice would be to compare what the user types in against the basename of the realpath. This isn't any more ambiguous than what already goes on in the relative-path case. This would work around the GVD bug, and it wouldn't affect the full-path case. Tom