From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46495: 28.0.50; [native-comp] Build fails for 32bit --with-wide-int Date: Tue, 30 Mar 2021 12:06:38 +0300 Message-ID: <834kgtko2p.fsf@gnu.org> References: <86y2fq93zj.fsf@gmail.com> <83lfbqbq3g.fsf@gnu.org> <868s7pwvq8.fsf@gmail.com> <28FB9567-61E6-4083-8711-6CF6C8A493F4@gnu.org> <86o8gjheaw.fsf@gmail.com> <865z2p0zrq.fsf@gmail.com> <86pn0w59nj.fsf@gmail.com> <83y2eap33a.fsf@gnu.org> <83lfa6kl8s.fsf@gnu.org> <83h7ktlwuy.fsf@gnu.org> <65e12b1d547420e10a19cdad6a33198926abb527.camel@redhat.com> <837dlpkrma.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akrl@sdf.org, andrewjmoreton@gmail.com, 46495@debbugs.gnu.org To: dmalcolm@redhat.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 30 11:07:22 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 1lRALJ-0006Jf-3o for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Mar 2021 11:07:21 +0200 Original-Received: from localhost ([::1]:60054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRALH-0000L5-OP for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Mar 2021 05:07:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRAL1-0000Kf-Uu for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 05:07:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRAL0-0004Yj-NF for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 05:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lRAL0-0005Iq-HJ for bug-gnu-emacs@gnu.org; Tue, 30 Mar 2021 05:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Mar 2021 09:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46495 X-GNU-PR-Package: emacs Original-Received: via spool by 46495-submit@debbugs.gnu.org id=B46495.161709519920353 (code B ref 46495); Tue, 30 Mar 2021 09:07:02 +0000 Original-Received: (at 46495) by debbugs.gnu.org; 30 Mar 2021 09:06:39 +0000 Original-Received: from localhost ([127.0.0.1]:50393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRAKd-0005ID-9J for submit@debbugs.gnu.org; Tue, 30 Mar 2021 05:06:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRAKZ-0005Hw-4J for 46495@debbugs.gnu.org; Tue, 30 Mar 2021 05:06:37 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33892) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRAKT-0004HW-9G; Tue, 30 Mar 2021 05:06:29 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4948 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lRAKS-0003UU-AE; Tue, 30 Mar 2021 05:06:28 -0400 In-Reply-To: <837dlpkrma.fsf@gnu.org> (message from Eli Zaretskii on Tue, 30 Mar 2021 10:50:05 +0300) 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:203286 Archived-At: > Date: Tue, 30 Mar 2021 10:50:05 +0300 > From: Eli Zaretskii > Cc: andrewjmoreton@gmail.com, dmalcolm@redhat.com, 46495@debbugs.gnu.org > > Here's what I did: > > . compiled the example with -gdwarf-4 -g3 > . started GDB and ran the program until it calls the 'greet' > function > . used "si" and "ni" commands to step into 'greet' and through the > functions it calls I have now compiled a slightly modified version of the hello world example, after adding this to the source: gcc_jit_context_set_bool_option ( ctxt, GCC_JIT_BOOL_OPTION_DEBUGINFO, 1); The results under debugger are slightly better, for example, the arguments to JIT functions are shown: (gdb) bt #0 0x6ac81280 in greet (name=0x406088 "world") from C:\DOCUME~1\Zaretzky\LOCALS~1\Temp\libgccjit-0z6iua\fake.so However, the "??" thingies and the incomplete backtraces are still present, here are two examples: #0 0x77c418ab in printf () from C:\WINDOWS\system32\msvcrt.dll #1 0x00000001 in ?? () #2 0x77c5fca0 in msvcrt!_iob () from C:\WINDOWS\system32\msvcrt.dll #3 0x77c5fca0 in msvcrt!_iob () from C:\WINDOWS\system32\msvcrt.dll #4 0x6ac83044 in ?? () from C:\DOCUME~1\Zaretzky\LOCALS~1\Temp\libgccjit-0z6iua\fake.so #5 0x6ac81299 in greet (name=0x406088 "world") from C:\DOCUME~1\Zaretzky\LOCALS~1\Temp\libgccjit-0z6iua\fake.so #6 0x004016f5 in main (argc=1, argv=0x3e2978) at tut01d-hello-world.c:121 #0 0x77c41883 in printf () from C:\WINDOWS\system32\msvcrt.dll #1 0x00000001 in ?? () #2 0x77c5fca0 in msvcrt!_iob () from C:\WINDOWS\system32\msvcrt.dll #3 0x00000000 in ?? () This is quite disappointing. It probably means that debugging Emacs with natively-compiled Lisp will be much harder on MS-Windows, if you happen to be in a situation (whose causes are still unclear to me, probably some minor variations of the prologue code?) with these incomplete backtraces. I also have 3 followup questions: 1) When GCC_JIT_BOOL_OPTION_DEBUGINFO is used, what kind of debug info is generated by libgccjit? is it DWARF2 or stabs or something else? Using "objdump -W", it looks like DWARF2, but if so, why isn't GDB able to produce a decent backtrace? 2) If the debug info created under GCC_JIT_BOOL_OPTION_DEBUGINFO is not DWARF2, is it possible to use gcc_jit_context_add_command_line_option to request "-gdwarf-4" or similar, like we do with the command-line GCC, so that the debug info for the JIT code is more detailed and accurate? 3) I see in my temporary directory subdirectories, created when I run the example program, with files fake.s and fake.so. Are they supposed to be left there, or are they supposed to be deleted when the program exits? Thanks.