GNU bug report logs -
#47067
28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Thu, 11 Mar 2021 11:28:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Pip Cet <pipcet <at> gmail.com>
>> Date: Sat, 13 Mar 2021 15:45:52 +0000
>> Cc: 47067 <at> debbugs.gnu.org, Andrea Corallo <akrl <at> sdf.org>
>>
>> > (defcustom comp-debug 0
>> > "Debug level for native compilation, a number between 0 and 3.
>> > This is intended for debugging the compiler itself.
>> > 0 no debugging output.
>> > This is the recommended value unless you are debugging the compiler itself.
>> > 1 emit debug symbols and dump pseudo C code.
>> > 2 dump gcc passes and libgccjit log file.
>> > 3 dump libgccjit reproducers."
>> >
>> > The first line is somewhat deceptive, as it doesn't say portions of
>> > the backtrace will be anonymous; the backtrace is useful even if not
>> > "debugging the compiler itself". And the description of level 1 says
>> > it will also "dump pseudo C code", which I don't think is needed for
>> > most of the debugging. Maybe we need an intermediate level that just
>> > leaves the symbols without dumping the pseudo code?
>>
>> I think that's an excellent idea.
>
> Andrea, is it possible to have debug level 1 produce only the debug
> info within the generated code, and leave the pseudo-code dump for
> higher levels? If you don't have time to implement this yourself, can
> you instruct me what changes need to be made? I'd like to try
> recompiling everything with debug level 1 and see if that helps with
> the backtraces.
Sure that's very easy (the attached should do the job), is this
something you'd like to have a local modification or a change in the
branch?
If the case is the second before I'd just like to understand why the
Windows toolchain needs debug symbols for function names and if this is
a bug or the expected behavior.
IME this was never the case on systems I've worked on and this is why I
though having debug symbols and dump pseudo C code together in the same
debug level made sense, essentially to allow stepping.
Thanks
Andrea
[no-cdump.patch (text/x-diff, inline)]
diff --git a/src/comp.c b/src/comp.c
index a79ee4ad87..f295106576 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4484,7 +4484,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
add_driver_options ();
- if (comp.debug)
+ if (comp.debug > 1)
gcc_jit_context_dump_to_file (comp.ctxt,
format_string ("%s.c", SSDATA (ebase_name)),
1);
This bug report was last modified 4 years and 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.