This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB (mis)behavior depends on DWARF DW_TAG_compile_unit data
- From: Daniel Jacobowitz <drow at false dot org>
- To: Maxim Grigoriev <maxim at tensilica dot com>
- Cc: gdb at sourceware dot org, Bob Wilson <bwilson at tensilica dot com>, Marc Gauthier <marc at tensilica dot com>
- Date: Mon, 12 Mar 2007 16:48:57 -0400
- Subject: Re: GDB (mis)behavior depends on DWARF DW_TAG_compile_unit data
- References: <45F5B929.3050406@hq.tensilica.com>
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