From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13041 invoked by alias); 24 Mar 2002 05:13:28 -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 13025 invoked from network); 24 Mar 2002 05:13:25 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 24 Mar 2002 05:13:25 -0000 Received: from creche.cygnus.com (ta0194.peakpeak.com [204.144.244.194]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id WAA15757; Sat, 23 Mar 2002 22:13:22 -0700 Received: (from tromey@localhost) by creche.cygnus.com (8.9.3/8.9.3) id WAA32705; Sat, 23 Mar 2002 22:46:51 -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> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: .. I wonder if I ought to tell them about my PREVIOUS LIFE as a COMPLETE STRANGER? Date: Sat, 23 Mar 2002 21:13:00 -0000 In-Reply-To: Joel Brobecker's message of "Thu, 21 Mar 2002 09:11:45 +0100" Message-ID: <878z8io6us.fsf@creche.redhat.com> X-Mailer: Gnus v5.7/Emacs 20.5 X-SW-Source: 2002-03/txt/msg00452.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> There is something in the break command that I haven't Joel> understood, because: Joel> (gdb) b toto.C:5 Joel> No source file named toto.C. Joel> (gdb) b /bonn.a/brobecke/toplevel/symlinks/toto.C:4 Joel> Note: breakpoint 1 also set at pc 0x8048583. Joel> Breakpoint 2 at 0x8048583: file /bonn.a/brobecke/toplevel_link/symlinks/toto.c, line 4. Joel> This seems odd to me that GDB refuses a breakpoint on toto.C, Joel> but accepts a breakpoint on /bonn.a/.../toto.C? If you give an absolute path to the break command, then gdb will try to find and use the real path. If you give a relative path to the break command, gdb won't do this. It will just compare what you gave it to what is in the symtab. It might compare the base name if you didn't give an exact match. See symtab.c:lookup_symtab() for the code. Joel> I also noticed an inconsistency in the filename used in the Joel> "Breakpoint 2 at ..." line, should this be also normalized? I don't know. Joel> Supposing that this problem can be corrected entirely in GVD, Joel> should I withdraw my change request? My opinion is that the primary bug here is in GVD. However there are subsidiary bugs as well. Joel> I would still prefer GDB to display toto.c rather than toto.C as Joel> the basename part, but I don't have a strong opinion so the Joel> advice of all GDB developers would be welcome. I agree it would be best if gdb could somehow tell GVD about the file name as it appears in the symtab. Then GVD could display this file name if it so chose. My reasoning here is that the file name in the symtab is most likely the one the user will recognize, since it is the one that he (or the Makefile or whatever) passed to the compiler. Tom