RFA: #line directives in generated files to aid debugging
Ben Elliston
bje@au1.ibm.com
Thu Apr 20 03:51:00 GMT 2006
> The generator programs (e.g. build/genattrtab) output #line
> directives before code which has been copied from the machine
> description files, so the debugger will show you the correct
> file. But this then causes trouble when single stepping through code
> which wasn't included from the .md files.
Thanks for fixing this up; it is a right pain.
> The problem is that line numbers larger than 32767 are only
> supported with C99 or better, which we don't request from
> gcc. Because of -pedantic, GCC complains. Suggestions are welcome.
How often does it occur in practice? How about just skipping those
#line directives when the line number is too large? At least we could
get improved debugging in some, if not all, cases.
Ben
More information about the Gcc
mailing list