This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: macro debugging info: emit correct line number for #inclusions
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Mar 2002 21:42:13 +0000
- Subject: Re: macro debugging info: emit correct line number for #inclusions
- References: <20020319211556.A6CC95E9DE@zwingli.cygnus.com>
Hi Jim!
Thanks for this. I regard cb_file_change with extreme suspicion,
because I don't understand the constraints of the functions that it
calls. There may be others lurking there too!
Jim Blandy wrote:-
> GCC -gdwarf-2 -g3 currently emits macro info which claims that every
> #inclusion occurs on line 1 of the #including file:
> Here is a patch:
>
> 2002-03-19 Jim Blandy <jimb@redhat.com>
>
> * c-lex.c (cb_file_change): Pass the #inclusion's line number to
> the start_source_file debug hook, not the current line number.
>
That's great for 3.2. Is this a regression in any sense against 2.95 or
3.0? If so it can go in 3.1 too.
Neil.