#line directives in generated C files

Pip Cet pipcet@gmail.com
Fri Sep 4 12:20:26 GMT 2020


On Thu, Sep 3, 2020 at 8:19 PM Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Thu, 27 Aug 2020, Pip Cet via Gcc wrote:
> > I may be missing an obvious workaround, but it seems we currently emit
> > a #line directive when including lines from machine description files
> > in C files, but never emit a second directive when switching back to
> > the generated C file. This makes stepping through the backend in gdb
>
> Thanks for taking on this!

Thanks for the encouragement!

> IMHO stepping into the .md really isn't helpful.  Even a pattern
> name in a comment in the generated code would be better.

I think it is helpful, FWIW, to be able to set a breakpoint on an md
condition or in the preparation code (in conjunction with setting
CXXFLAGS to "-O0 -g3" or similar), but since that's not a "normal"
compilation it'd be acceptable to specify an extra switch for this
feature. That would mean my genline.c program wouldn't have to run
except in those constellations...


More information about the Gcc mailing list