This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [c/4053] Re: problems debugging gcc
Daniel Jacobowitz wrote:-
> Well, it isn't in the debug format code; the file information in the
> RTL is wrong. And there's nothing obviously incorrect about the code
> in cb_file_change...
>
> Aha, I think I see it. cb_file_change updates input_filename as it
> reads. Compile the testcase from the PR with a breakpoint on
> cb_file_change and a breakpoint on emit_line_note. If I had to guess,
> I'd say that the problem was input_filename describing the state of the
> lexer where it used to describe the state of the parser. In
> c_expand_body is the line:
> init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl));
>
> DECL_SOURCE_LINE is fine. input_filename isn't.
Cool! This looks like it. I'll take a closer look and post a patch
if it works.
Thanks a lot for the detective work!
Neil.