From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8310 invoked by alias); 12 Nov 2002 23:59:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 8303 invoked from network); 12 Nov 2002 23:59:34 -0000 Received: from unknown (HELO mail1.thewrittenword.com) (67.89.104.183) by sources.redhat.com with SMTP; 12 Nov 2002 23:59:34 -0000 Received: (from china@localhost) by mail1.thewrittenword.com (8.11.4/8.11.4) id gACNxT764549; Tue, 12 Nov 2002 17:59:29 -0600 (CST) (envelope-from gdb@thewrittenword.com) Date: Tue, 12 Nov 2002 15:59:00 -0000 From: Albert Chin To: gdb@sources.redhat.com Cc: peter.torngaard@nokia.com Subject: Re: Source files as symlinks for 5.2.1 Message-ID: <20021112175929.A64206@oolong.il.thewrittenword.com> Reply-To: gdb@sources.redhat.com References: <20021112172303.A63062@oolong.il.thewrittenword.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021112172303.A63062@oolong.il.thewrittenword.com>; from gdb@thewrittenword.com on Tue, Nov 12, 2002 at 05:23:03PM -0600 X-SW-Source: 2002-11/txt/msg00133.txt.bz2 On Tue, Nov 12, 2002 at 05:23:03PM -0600, Albert Chin wrote: > On Redhat Linux 7.1 with GDB 5.2.1: > $ mkdir /tmp/a /tmp/b > $ cd /tmp/a > $ ln -s ../b/sample.c link.c > $ ls -ld link.c > ... link.c -> ../b/sample.c > $ gcc -g link.c > $ gdb a.out > (gdb) list > (gdb) info source > Current source file is link.c > Compilation directory is /tmp/a/ > Located in /tmp/b/sample.c > Contains 6 lines. > Source language is c. > Compiled with stabs debugging format. > > Why isn't the source file '/tmp/a/link.c'? And: (gdb) set annotate 1 (gdb) info line ... Line ... and ends at ... /tmp/b/sample.c:... DDD is reading the output of 'info line' at annotation level 1 and using sample.c as the filename to set the breakpoint for. As 'link.c' is loaded instead, 'set breakpoint sample.c:[line #]' this fails. Oddly enough the HP wdb debugger doesn't read the link. -- albert chin (china@thewrittenword.com)