From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47067: 28.0.50; [feature/native-comp] Crash while scrolling through dispnew.c Date: Sun, 14 Mar 2021 19:00:26 +0000 Message-ID: References: <83sg52lykn.fsf@gnu.org> <83mtv8lrmf.fsf@gnu.org> <83czw4lelg.fsf@gnu.org> <83mtv8jgn2.fsf@gnu.org> <834khfjv7q.fsf@gnu.org> <83tupfia1m.fsf@gnu.org> <83mtv7hy5c.fsf@gnu.org> <831rcigc94.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35553"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Pip Cet , 47067@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 14 20:01:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lLVzK-0009A1-GX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Mar 2021 20:01:18 +0100 Original-Received: from localhost ([::1]:60864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLVzJ-0007Gi-GQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Mar 2021 15:01:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLVz4-0007FW-68 for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 15:01:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLVz3-0001yp-UX for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 15:01:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLVz3-0007MG-Sd for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2021 15:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Mar 2021 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47067 X-GNU-PR-Package: emacs Original-Received: via spool by 47067-submit@debbugs.gnu.org id=B47067.161574843028238 (code B ref 47067); Sun, 14 Mar 2021 19:01:01 +0000 Original-Received: (at 47067) by debbugs.gnu.org; 14 Mar 2021 19:00:30 +0000 Original-Received: from localhost ([127.0.0.1]:34214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLVyY-0007LO-DF for submit@debbugs.gnu.org; Sun, 14 Mar 2021 15:00:30 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:57580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLVyW-0007LF-BF for 47067@debbugs.gnu.org; Sun, 14 Mar 2021 15:00:28 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 12EJ0Q3Q003930 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sun, 14 Mar 2021 19:00:27 GMT In-Reply-To: <831rcigc94.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Mar 2021 14:17:59 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202383 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Pip Cet >> Date: Sat, 13 Mar 2021 15:45:52 +0000 >> Cc: 47067@debbugs.gnu.org, Andrea Corallo >> >> > (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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=no-cdump.patch 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); --=-=-=--