From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6883 invoked by alias); 12 Mar 2007 21:06:37 -0000 Received: (qmail 6869 invoked by uid 22791); 12 Mar 2007 21:06:35 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Mar 2007 21:06:30 +0000 Received: from localhost ([127.0.0.1]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HQriu-00056C-Be; Mon, 12 Mar 2007 13:06:28 -0800 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18840-10; Mon, 12 Mar 2007 13:06:28 -0800 (PST) Received: from maxim_fc5.hq.tensilica.com ([192.168.11.68]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1HQrit-000566-Iq; Mon, 12 Mar 2007 13:06:27 -0800 Message-ID: <45F5C0D3.90002@hq.tensilica.com> Date: Mon, 12 Mar 2007 21:06:00 -0000 From: Maxim Grigoriev User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 To: Maxim Grigoriev , gdb@sourceware.org, Bob Wilson , Marc Gauthier Subject: Re: GDB (mis)behavior depends on DWARF DW_TAG_compile_unit data References: <45F5B929.3050406@hq.tensilica.com> <20070312204857.GA20515@caradoc.them.org> In-Reply-To: <20070312204857.GA20515@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00172.txt.bz2 The problem is consistent across both hosts I checked : Linux and Cygwin. The case I described is "--host=i686-pc-linux-gnu --target=xtensa-elf". There is only one place in the DWARD sections where "test.c" is mentioned. So there is no interference with any other file named "test.c". If you think it's a generic GDB problem I can fix it. I have to fix it anyway on Xtensa GDB. I don't see how it can be Xtensa-specific. Xtensa GCC compiler DWARF is consistent with native GCC 4.1.1 compiler on my Linux box. So if this is a compiler problem ( which I doubt ) it seems to be pretty generic. -- Maxim Daniel Jacobowitz wrote: > 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? > >