GCC modified for the FreeChainXenon project
![]() This patch introduces the internal option -fm2-debug-trace= which can be given a comma separated list of filter terms. Currently it allows: all,line,token,quad. The patch allows users to trace the progress of cc1gm2 so that source which causes an ICE can be reduced. Once PR113836 is complete it is expected that the trace information will be written to file. gcc/m2/ChangeLog: PR modula2/114565 * gm2-compiler/M2GenGCC.mod (CodeStatement): Test GetDebugTraceQuad before calling DisplayQuad. * gm2-compiler/M2LexBuf.mod (NumberIO): Import CardToStr. (GetToken): Test GetDebugTraceToken before writing the token number or token line. * gm2-compiler/M2Options.def (SetDebugTraceQuad): Rename to (SetM2DebugTraceFilter): ...this. (SetDebugTraceAPI): Remove. (GetDebugTraceQuad): New procedure function. (GetDebugTraceTree): Ditto. (GetDebugTraceToken): Ditto. (GetDebugTraceLine): Ditto. (GetDebugFunctionLineNumbers): Ditto. * gm2-compiler/M2Options.mod (DebugFunctionLineNumbers): New boolean variable. (DebugTraceQuad): Ditto. (DebugTraceTree): Ditto. (DebugTraceLine): Ditto. (DebugTraceToken): Ditto. (errors1): New procedure. (SetDebugTraceQuad): Remove. (SetM2DebugTraceFilter): New procedure implemented. (SetM2DebugTrace): Ditto. (GetDebugTraceQuad): Ditto. (GetDebugTraceToken ): Ditto. (GetDebugTraceLine): Ditto. (SetDebugTraceLine): Remove. * gm2-compiler/M2Quads.mod (GenQuadOTrash): Test GetDebugTraceQuad and call DisplayQuad. (GenQuadOTypetok): Ditto. * gm2-compiler/SymbolTable.mod: Replace DebugFunctionLineNumbers with GetDebugFunctionLineNumbers. * gm2-gcc/init.cc (_M2_M2LangDump_init): Add prototype. (init_PerCompilationInit): Add call. * gm2-gcc/m2misc.cc (m2misc_cerror): New function. (m2misc_error): Ditto. * gm2-gcc/m2misc.def (error): New procedure. (cerror): Ditto. * gm2-gcc/m2misc.h (m2misc_cerror): New prototype. (m2misc_error): Ditto. * gm2-gcc/m2options.h (M2Options_SetDebugTraceQuad): New prototype. (M2Options_SetDebugTraceAPI): Remove. (M2Options_GetDebugTraceToken): New prototype. (M2Options_GetDebugTraceLine): Ditto. (M2Options_SetDebugFunctionLineNumbers): Ditto. (M2Options_GetDebugFunctionLineNumbers): Ditto. (M2Options_SetM2DebugTraceFilter): Ditto. * gm2-lang.cc (gm2_langhook_init_options): Remove OPT_fdebug_trace_quad case. Remove OPT_fdebug_trace_api case. Add OPT_fm2_debug_trace_ case. * lang.opt (fm2-debug-trace): New option. (fdebug-trace-api): Remove. (fdebug-trace-quad): Remove. * m2.flex (m2flex_M2Error): Check s for NULL. (skipnewline): New function. (consumeLine): Call traceline. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com> |
||
---|---|---|
.github | ||
c++tools | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcody | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgm2 | ||
libgo | ||
libgomp | ||
libgrust | ||
libiberty | ||
libitm | ||
libobjc | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
SECURITY.txt | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.