From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31451 invoked by alias); 12 Mar 2007 20:49:11 -0000 Received: (qmail 31308 invoked by uid 22791); 12 Mar 2007 20:49:10 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 12 Mar 2007 20:49:01 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HQrRy-0001KL-CV; Mon, 12 Mar 2007 16:48:58 -0400 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HQrRx-0005Ps-Q8; Mon, 12 Mar 2007 16:48:57 -0400 Date: Mon, 12 Mar 2007 20:49:00 -0000 From: Daniel Jacobowitz To: Maxim Grigoriev Cc: gdb@sourceware.org, Bob Wilson , Marc Gauthier Subject: Re: GDB (mis)behavior depends on DWARF DW_TAG_compile_unit data Message-ID: <20070312204857.GA20515@caradoc.them.org> Mail-Followup-To: Maxim Grigoriev , gdb@sourceware.org, Bob Wilson , Marc Gauthier References: <45F5B929.3050406@hq.tensilica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45F5B929.3050406@hq.tensilica.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00170.txt.bz2 On Mon, Mar 12, 2007 at 01:33:45PM -0700, Maxim Grigoriev wrote: > Hello members, > > I would like to hear your opinion on whether what I see is a compiler > problem or a GDB misbehavior. > > GDB session goes wrong, if my test case is compiled using a base name as a > source file. Everything is fine, when an absolute path name is used > instead. I checked several compilers ( all GCCs ). They seem to be > consistent in generating DWARF DW_TAG_compile_unit information in this case. > > Anyway, even if GDB treats this situation as a bad DWARF data it doesn't > look decent to output misleading error messages, like 'No line 6 in file > "test.c".', when there actually is the line number 6, and the test case was > compiled with "-g". There must be more to the problem, since many people do this all the time without any trouble. GDB has support for both cases. What platform - is this Cygwin maybe? Is there any other test.c that GDB might be opening? -- Daniel Jacobowitz CodeSourcery