From 8f0bb7d2647c0f5d4da5ec1af3ca1936ca42f221 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 20 Jun 2019 23:31:16 +0200 Subject: [PATCH] rework debug dump --- src/comp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/comp.c b/src/comp.c index d08ec8c7c9c..201ffa65597 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1111,8 +1111,12 @@ init_comp (int opt_level) } if (COMP_DEBUG > 1) { + gcc_jit_context_set_bool_option (comp.ctxt, + GCC_JIT_BOOL_OPTION_DEBUGINFO, + 1); + 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); + } gcc_jit_context_set_int_option (comp.ctxt, @@ -1268,6 +1272,8 @@ init_comp (int opt_level) static void release_comp (void) { + if (COMP_DEBUG) + gcc_jit_context_dump_to_file (comp.ctxt, "gcc-ctxt-dump.c", 1); if (comp.ctxt) gcc_jit_context_release(comp.ctxt); -- 2.39.5