From: Andrea Corallo Date: Wed, 12 Jun 2019 22:36:01 +0000 (+0200) Subject: make some order into debug facilities X-Git-Tag: emacs-28.0.90~2727^2~1486 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3fd0293d9112e5e1ad9ad3bfb1e982dcb0d032b;p=emacs.git make some order into debug facilities --- diff --git a/src/comp.c b/src/comp.c index 3c837555d74..79aa0bdc031 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1812,8 +1812,24 @@ init_comp (void) { comp.ctxt = gcc_jit_context_acquire(); + if (COMP_DEBUG) + { + logfile = fopen ("libgccjit.log", "w"); + gcc_jit_context_set_logfile (comp.ctxt, + logfile, + 0, 0); + gcc_jit_context_set_bool_option (comp.ctxt, + GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING, + 1); + gcc_jit_context_set_bool_option (comp.ctxt, + GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES, + 1); + } if (COMP_DEBUG > 1) - gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c"); + { + gcc_jit_context_dump_reproducer_to_file (comp.ctxt, "comp_reproducer.c"); + gcc_jit_context_dump_to_file (comp.ctxt, "emacs-gcc-code.c", 0); + } comp.void_type = gcc_jit_context_get_type (comp.ctxt, GCC_JIT_TYPE_VOID); comp.void_ptr_type = @@ -1931,20 +1947,6 @@ init_comp (void) NULL); comp.func_hash = CALLN (Fmake_hash_table, QCtest, Qequal, QCweakness, Qt); - - if (COMP_DEBUG) { - logfile = fopen ("libgccjit.log", "w"); - gcc_jit_context_set_logfile (comp.ctxt, - logfile, - 0, 0); - gcc_jit_context_set_bool_option (comp.ctxt, - GCC_JIT_BOOL_OPTION_DUMP_EVERYTHING, - 1); - } - - gcc_jit_context_set_bool_option (comp.ctxt, - GCC_JIT_BOOL_OPTION_KEEP_INTERMEDIATES, - 1); } void