From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30954 invoked by alias); 20 Mar 2002 22:16:24 -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 30790 invoked from network); 20 Mar 2002 22:16:13 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 20 Mar 2002 22:16:13 -0000 Received: from creche.cygnus.com (ta0201.peakpeak.com [204.144.244.201]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id PAA06167; Wed, 20 Mar 2002 15:15:39 -0700 Received: (from tromey@localhost) by creche.cygnus.com (8.9.3/8.9.3) id PAA18703; Wed, 20 Mar 2002 15:48:09 -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> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: I smell a RANCID CORN DOG! Date: Wed, 20 Mar 2002 14:16:00 -0000 In-Reply-To: Joel Brobecker's message of "Tue, 19 Mar 2002 17:12:37 +0100" Message-ID: <87adt2ri93.fsf@creche.redhat.com> X-Mailer: Gnus v5.7/Emacs 20.5 X-SW-Source: 2002-03/txt/msg00396.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> The problem appears when some of the files used to build the Joel> application are symbolic links and when GDB annotations are Joel> activated. For us, this happens when GVD, our graphical Joel> front-end, drives GDB. Joel> Breakpoint 1, break_me () at toto.c:4 Joel> yy/bonn.a/brobecke/symlinks/toto.C:4:23:beg:0x804846b Joel> As you see, GDB has translated toto.c into toto.C. This Joel> translation causes GDB to think that the inferior stopped in a Joel> file named toto.C (which is not known to GDB, since the compiler Joel> used only toto.c). As a consequence, when the user tries to put Joel> breakpoints using the GVD, GVD issues the following break Joel> command Joel> (gdb) break toto.C:4 gdb tells GVD that the file is "/bonn.a/brobecke/symlinks/toto.C". Why does GVD then use just the base name? Won't this be incorrect if there is more than one file with the same name? (The very problem my original patch was intended to fix.) Wouldn't changing GVD to pass the exact same file name back to gdb give correct results in every case? Joel> I think I found a way to keep the fix to his problem and then at Joel> the same time fix our issue: instead of canonicalizing the Joel> entire filename, I suggest that we only expand the directory Joel> prefix (ie the part returned by the "dirname" unix command). I suspect this won't be correct in all cases, but I don't have a ready counterexample. Tom