From unknown Tue Aug 12 07:34:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71292 <71292@debbugs.gnu.org> To: bug#71292 <71292@debbugs.gnu.org> Subject: Status: 30.0.50; macOS: .elns have no debug info Reply-To: bug#71292 <71292@debbugs.gnu.org> Date: Tue, 12 Aug 2025 14:34:20 +0000 retitle 71292 30.0.50; macOS: .elns have no debug info reassign 71292 emacs submitter 71292 Gerd M=C3=B6llmann severity 71292 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 09:56:05 2024 Received: (at submit) by debbugs.gnu.org; 31 May 2024 13:56:05 +0000 Received: from localhost ([127.0.0.1]:55103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD2jl-0008DZ-0L for submit@debbugs.gnu.org; Fri, 31 May 2024 09:56:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:57668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD2jg-0008DC-7l for submit@debbugs.gnu.org; Fri, 31 May 2024 09:56:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD2jU-0004RH-Op for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 09:55:48 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD2jT-0008St-3H for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 09:55:48 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5785199f7d1so1103884a12.2 for ; Fri, 31 May 2024 06:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717163745; x=1717768545; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=V8ce3Hqt+nAWMsw7+XChs9B5kUNyHpT4b0wSjsVRMnY=; b=RxnQZd7XghJfEWuRXRx0VGAChxLsF8aTVjf4EAupRoMB9F9SwOXqpyf2evIH1iW1ys i/i2hIV2jnL6Zg2sF9OYiGMHAg8RJPz3kST6NF1Z2pFvLKP95oIfQ/tHp7ujzA1jdxkd qtI3frn+sNirpDGv3/csQBDzNpGVPKIHBbVIy4Erp2tQ8bHamMvHKgdm4TuRa98MSBqP +HnDXSUZJ702J8SuxsfrmGs2Y5wdFxHIQV2vH2WQ+XT5+FuRQmsqv9VchuHEqCiSlyMq lpr7RDGUk6XWLtwNYqm7VJWAzBEU2SKH+vL779JI+frYlY9JK4JDiIJslMqaTbblsfIc H85w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717163745; x=1717768545; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=V8ce3Hqt+nAWMsw7+XChs9B5kUNyHpT4b0wSjsVRMnY=; b=jUjCnXSQ6DxUK6TENkOLsSviZau3bPzzX32ZD8qf+IOTpL4quBzAHerMepWJeHV3C7 S0Do2DrAOHi55BrIHP3iEpDgjCXpsSEdBQJrxUhVah0AFy3YkppfrZ9aXOoPZMYrrNlg 5nlsMmt5oYQAoqiTqhzyVuEK9LmYtBPS+jo5n5p6i2vriO5/fD1dLjWLXyQDzOCortMn 2vtH/9wY9OaKMsTFwVH74fxyF6rrr0FRQ8Kvcaqk7nLHrAq7FikPZvlpyv7w3/eHJuTq bmm/HSAxkepS4hs+51/Fi1WS6VMOHOpPoWey1BtXWH6fpwluqru3DoC48i7u4ovN32Ik 6aVQ== X-Gm-Message-State: AOJu0YxsNDfhjhgDMUxoemYEKhhnXsSmVL1JkQkdj/fPeQpZJecSMNgs q7Rw2tI+J/vfM9L1OYdqy4BTGhwW3femfIXVtg3Qyt2nuRg5Ctz9koKCog== X-Google-Smtp-Source: AGHT+IH4KGq5EsG5r1FPb7Z+Ad2sMcjkYqhjUMZBbsU55KEqyeTktOLoAPjIN8JTqPfB4DWy0gqFZQ== X-Received: by 2002:a50:f61c:0:b0:578:5f34:b08f with SMTP id 4fb4d7f45d1cf-57a363aabdfmr1820845a12.25.1717163744680; Fri, 31 May 2024 06:55:44 -0700 (PDT) Received: from pro2.fritz.box (p4fe3a1a3.dip0.t-ipconnect.de. [79.227.161.163]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31bb841fsm1054614a12.34.2024.05.31.06.55.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 06:55:44 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: bug-gnu-emacs@gnu.org Subject: 30.0.50; macOS: .elns have no debug info X-Debbugs-Cc: Date: Fri, 31 May 2024 15:55:43 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On macOS, executables (including .dylibs (=.eln)) never not contain debug info themselves. Debug info is instead contained in .o files, and executables reference the .o files used to build them in a debug map. This can be seen with, e.g. dsymutil --dump-debug-map This means no .o files, no debug info. libgccjit deletes the .o files if debug > 0, gcc-14 -g does not delete them, the .o files are kept in some temporary directory. I found that the following change makes libgccjit behave like gcc: modified lisp/emacs-lisp/comp.el @@ -99,7 +99,7 @@ native-comp-compiler-options :version "28.1") (defcustom native-comp-driver-options - (cond ((eq system-type 'darwin) '("-Wl,-w")) + (cond ((eq system-type 'darwin) '("-Wl,-w" "-save-temps=obj")) ((eq system-type 'cygwin) '("-Wl,-dynamicbase"))) "Options passed verbatim to the native compiler's back-end driver. This does not address the generation of .dSYM bundles. The .o files in the temp dirs will be deleted at some point by which the debug info of an executable is lost. This can be prevented by producing a .dSYM bundle for the executable with dsymutil and keeping the .dSYM around with the executable. .dSYM bundles can be loaded in LLDB with process symbols add . To produce .dSYMs for native lisp: #! /usr/bin/env zsh rm -rf native-lisp/**/*.dSYM for f in native-lisp/**/*.eln; do dsymutil $f done I've made jit@gcc.gnu.org aware of this. Maybe they will change something in the future. Example in LLDB with native-comp-debug == 2 frame #7: 0x000000010350db68 comp-7672a6ed-3a3b5dd7.eln`F636f6d702d2d6c696d706c6966792d626c6f636b_comp__limplify_block_0 + 1632 at comp-7672a6ed-3a3b5dd7.c:101440 and one can look at the C file. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 11:40:19 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 15:40:19 +0000 Received: from localhost ([127.0.0.1]:55188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD4Md-0002MV-68 for submit@debbugs.gnu.org; Fri, 31 May 2024 11:40:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD4MZ-0002MD-31 for 71292@debbugs.gnu.org; Fri, 31 May 2024 11:40:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD4MI-0001e2-0W; Fri, 31 May 2024 11:39:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=RXk1GBEYovPj6+HfCQE/SaRDmb5Db8Og7G7Laz3008w=; b=hlN3FRQxdcDpIh/rcPlZ 4BO6vzJoeYy6LyP4dcpt+ebdjL4l48qQACC5se/4DIP1D/Ole8ywaYjFkb3QSQxEpFila2FDJuIuX bus1xCi+reBmxYHPrN8gz23jVWQp4j46AGKObc3MicV0L2esLwcFZQ0Aak5dQjt1ig395QsIry+iI NhVEgtLgerBSURb7pcD5MolGiOR+8vzp2EXEaNRjfSolI/BMP76KAHu/mqEcPw33PGxxp8SHUcLyu qi/MqyzRSZeQXN0EBp90TBItN61cX28QM4Y7afqAyy8TTz+wg7ThjHoe++hzWZK1K2R0tY/e6TxWI rVSOBIBC1wr0PQ==; Date: Fri, 31 May 2024 18:39:54 +0300 Message-Id: <86le3qour9.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 31 May 2024 15:55:43 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Date: Fri, 31 May 2024 15:55:43 +0200 > > Example in LLDB with native-comp-debug == 2 > > frame #7: 0x000000010350db68 comp-7672a6ed-3a3b5dd7.eln`F636f6d702d2d6c696d706c6966792d626c6f636b_comp__limplify_block_0 + 1632 at comp-7672a6ed-3a3b5dd7.c:101440 > > and one can look at the C file. But the C file is also generally unavailable, and not only on macOS. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 12:33:00 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 16:33:00 +0000 Received: from localhost ([127.0.0.1]:55238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5Bc-0000uH-2Z for submit@debbugs.gnu.org; Fri, 31 May 2024 12:33:00 -0400 Received: from mail-ed1-f54.google.com ([209.85.208.54]:48586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5BW-0000ty-ES for 71292@debbugs.gnu.org; Fri, 31 May 2024 12:32:59 -0400 Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-57a1fe639a5so2189826a12.1 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 09:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717173097; x=1717777897; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Rq6Jd4ZccgIu79CRpMjPcBAt40UrGhAkyQoPyOAwCY=; b=dcDWOUqteVDYi1WhLxO4G/mKrWHhRgbW3+m8WkO1IXoFA2roNZ9ZIAAJfTZAcJvwKk L90EC7jEh1X4fwctn+wV0oLeOTj/JRw3kdfyYMCDGXrvV3AIXCtvgwrZSBGwkidUEAmw j0lvvg3vlKiNmcaCOY44oioEdMpq/NK/8dhZodrgjxRVYRO3SvR/DpgZphY0XHBgWgGR 7sf4gPxN2eKViKlbpEUzTwUxG7fUyB6BlyzW8EKdnuoOiyoUQstdDczLhgPNykX83p1M 7wx3kF5pLpYIMB5fKG1ZidrEivJJWZMJGGcY92aQ3+Rxs/+jotEODgxAgnV1vk+vJ5eb ugig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717173097; x=1717777897; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+Rq6Jd4ZccgIu79CRpMjPcBAt40UrGhAkyQoPyOAwCY=; b=CmjTdyim0x+OZGfQar2b7l2+wRCVVFCUU/vGePogfwJ2bHXGHvpyLw3mmfyU4oriFk 1RDn78DuH5gKcb6exLJqyQzJEPZp/MYj+5+xqXa2vD/7s0f2BEo2fcvgIzcy+8iN/thO wCFRQtRHon43eUa2Fiocg/4tO+Q+OaFGlOp9zpojLtOdCARQ5ldUty4MvjbQQyYYeocF pX+b2eCOurMaZtXJf9CPRJy5x1JTGQJLeR+ygOvmf7RBxdg9GUjuwrajgfzfWYHS7ad1 FY7tiHcWq3YnHmhRjDiBw2KvtRZmCo2ws8UbDLWhZVGA4YA3ZG8kbPw6mmZ7HZbDuZZx RjMg== X-Gm-Message-State: AOJu0YyGCFgfLukovInpkfjA9TNwKzFlVCatko7Sq7miW5BNTr/3VfT5 cTHa4lfKLu9uNqYip08MXPkA2xc8BVgI/4ADwaasvOr3+tdUsi+gDToqKg== X-Google-Smtp-Source: AGHT+IEL9nft/NbD3KXjEmML8hqHenqc354bheYob9dg+TlSfkUVqOJk5vfdZWSE8vtK5uHlV9l47w== X-Received: by 2002:a50:c048:0:b0:57a:2525:f1ee with SMTP id 4fb4d7f45d1cf-57a36358413mr1644706a12.4.1717173096807; Fri, 31 May 2024 09:31:36 -0700 (PDT) Received: from pro2.fritz.box (p4fe3a1a3.dip0.t-ipconnect.de. [79.227.161.163]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31b99375sm1163590a12.1.2024.05.31.09.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 09:31:36 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <86le3qour9.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 May 2024 18:39:54 +0300") References: <86le3qour9.fsf@gnu.org> Date: Fri, 31 May 2024 18:31:35 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Date: Fri, 31 May 2024 15:55:43 +0200 >>=20 >> Example in LLDB with native-comp-debug =3D=3D 2 >>=20 >> frame #7: 0x000000010350db68 comp-7672a6ed-3a3b5dd7.eln`F636f6d702d2d6= c696d706c6966792d626c6f636b_comp__limplify_block_0 + 1632 at comp-7672a6ed-= 3a3b5dd7.c:101440 >>=20 >> and one can look at the C file. > > But the C file is also generally unavailable, and not only on macOS. The C file is generated by libgccjit when setting native-comp-debug to 2. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 14:09:53 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 18:09:53 +0000 Received: from localhost ([127.0.0.1]:55319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD6hN-0003ef-8z for submit@debbugs.gnu.org; Fri, 31 May 2024 14:09:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD6hM-0003eP-2B for 71292@debbugs.gnu.org; Fri, 31 May 2024 14:09:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD6ez-0002nm-4S; Fri, 31 May 2024 14:07:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+NxrnwWkwn2cz/SSF12CbCZrTDeuNhFI4v/U7rOlAds=; b=Vy15Cj7FclxFzGl4c223 xaj7idqdUdvTWHdFGEYyJ8/JwRGPT5B6j6SwOkswRd0qXri4FlRi45OIb9+pq+RKsK04FXIR0E92M jjC/K9MLDvG1DyNAD9u8rrtXMr4E09/9AHvxjVNW6gAujux4QQhixQQiFeLDyLgO0PxNYNRLbPxaI yIZ+6Jt9x4QZ/5owxM2F8hJ9WuST5JRlHg7u4YW3uyhj6741qMmNWpCgPMOVkMpucWRh+7dtZOtFn Zd2DGnI8LDHqAiwUF/vodLY/8SwBmTukv4dRVSIoMF8SQR3UOHuX2QsNUOPQJWjziwsTwlgZNSlKz mYGzwqY1X+dzSw==; Date: Fri, 31 May 2024 21:07:02 +0300 Message-Id: <86frtxq2ih.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 31 May 2024 18:31:35 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: <86le3qour9.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: 71292@debbugs.gnu.org > Date: Fri, 31 May 2024 18:31:35 +0200 > > Eli Zaretskii writes: > > >> From: Gerd Möllmann > >> Date: Fri, 31 May 2024 15:55:43 +0200 > >> > >> Example in LLDB with native-comp-debug == 2 > >> > >> frame #7: 0x000000010350db68 comp-7672a6ed-3a3b5dd7.eln`F636f6d702d2d6c696d706c6966792d626c6f636b_comp__limplify_block_0 + 1632 at comp-7672a6ed-3a3b5dd7.c:101440 > >> > >> and one can look at the C file. > > > > But the C file is also generally unavailable, and not only on macOS. > > The C file is generated by libgccjit when setting native-comp-debug to 2. Then how about using -keep-temps as part of native-comp-debug = 3? From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 14:14:09 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 18:14:09 +0000 Received: from localhost ([127.0.0.1]:55324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD6lU-0003qi-Tf for submit@debbugs.gnu.org; Fri, 31 May 2024 14:14:09 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:55794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD6lQ-0003q2-JT for 71292@debbugs.gnu.org; Fri, 31 May 2024 14:14:07 -0400 Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52b89fcdcc7so1268172e87.3 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 11:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717179167; x=1717783967; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SePZ9JjD/XvB5zKor1O+Fg8aXD7K3X0Mom+DC+p4+PA=; b=GLw2gyhuQg4psGf6Sp7z5P+IAo/uyOpCJvXTwx2GJQSgsw/j0WxGZexPTSVD3/spvK V51y8n9OeKP6PA42NNvFx2MCFWxVleqqQ95Ls01jO01HCEFneV/sVh9N8kklXKyDo6Vi TmxR2sDOJjm4sM9ihm1Z+ZLdIG0ax+Pur096j3cGn4J5dWodBfqzdEOazdvpCbJrBFmJ L9GXDJDd4mixe1NbIw8iTnXiMoMy6bQOkvfPBFNQZ+7cjAjdLTkKCA99m7LBdmfxnbYw 21riT5qJvdkFEJcfstWaKnfNN8qzWOBeh+4UTHwNWrenmPI7Mb5og6OX8SxxxeEVHo41 hwlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717179167; x=1717783967; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=SePZ9JjD/XvB5zKor1O+Fg8aXD7K3X0Mom+DC+p4+PA=; b=tnfy/jjNsqUP8HT2CeJS09sJfrCZLY1GPXVNCGPld+kyXBTSc0dd2VDkDp0C0QwfaZ O7kluGzp5Ci9TldsOblPzfa5rVXuRd/qLpbOdlEC0iO6mqjZ1MpUnrGSkd/QI7iCjsoA thlaPjb+D/95El+f45YxKuIMpIT+oZsSG0kguTNlUWLxaH6Bun5Y5IrmQ1ubjZTj6xbM bQSuxRhG/KfUV7LMHrwa1wMs0vyEnJ1BMRf5RfL7ufH60AnJKT9IczoDIcmFmVNyK+p2 rVlYYv06dSlr7XR6Fzoel2+CD5VZVieIoTUkzvCcr6jq6fPIlEwYgvbmIVk2dDLyQ6fS F9VA== X-Gm-Message-State: AOJu0YwCdF2fkMqtzl4fY5EJvRbrPcUYAp4D48lpU//gIa6MQODFDsv8 A8jEFVxIXVYowdoaxkdDhScZLt8TXu46uAQJyD9E9rhoZZa/D4IXuOD+Xg== X-Google-Smtp-Source: AGHT+IEdodvhlWS0eWWosTFa7XDNKiW1B5zubM0OcBwbzloRKW24OkfyXdAc17ulthS7PVEYTER3SA== X-Received: by 2002:a19:4354:0:b0:524:34ad:ba7c with SMTP id 2adb3069b0e04-52b896daf02mr1552983e87.66.1717179166848; Fri, 31 May 2024 11:12:46 -0700 (PDT) Received: from pro2.fritz.box (p4fe3a1a3.dip0.t-ipconnect.de. [79.227.161.163]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e6f03b0dsm112284866b.15.2024.05.31.11.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 11:12:46 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <86frtxq2ih.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 May 2024 21:07:02 +0300") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> Date: Fri, 31 May 2024 20:12:45 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 71292@debbugs.gnu.org >> Date: Fri, 31 May 2024 18:31:35 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> >> From: Gerd M=C3=B6llmann >> >> Date: Fri, 31 May 2024 15:55:43 +0200 >> >>=20 >> >> Example in LLDB with native-comp-debug =3D=3D 2 >> >>=20 >> >> frame #7: 0x000000010350db68 comp-7672a6ed-3a3b5dd7.eln`F636f6d702d= 2d6c696d706c6966792d626c6f636b_comp__limplify_block_0 + 1632 at comp-7672a6= ed-3a3b5dd7.c:101440 >> >>=20 >> >> and one can look at the C file. >> > >> > But the C file is also generally unavailable, and not only on macOS. >>=20 >> The C file is generated by libgccjit when setting native-comp-debug to 2. > > Then how about using -keep-temps as part of native-comp-debug =3D 3? I think you mean debug >=3D 2? Anyway, debug info is also valuable when you don't have the C file, in the disassembly. That is for debug > 0. Otherwise you see only bare hex addresses and such. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 14:32:43 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 18:32:43 +0000 Received: from localhost ([127.0.0.1]:55353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD73T-0004dr-79 for submit@debbugs.gnu.org; Fri, 31 May 2024 14:32:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD73R-0004de-K4 for 71292@debbugs.gnu.org; Fri, 31 May 2024 14:32:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD73B-0006xw-43; Fri, 31 May 2024 14:32:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PIhVvZyMGnPMhPOcWMyfO9+GSSaEXJWF3nb6JN0gycM=; b=b8ZCa9Gs4xH52D0vEdoP Q9t5zC8Or/rg0qLn0jdHVTtKKc2W2/dZxHzrXsuafFxP4CcwMVkhILMDwFe/HQMgmxOA0GbYev1FX FhUF0vonQ4L2Q8ynIxyVvTi2IDa68LTZHFdj2Edso5lv/m7smW1N7nlUERH3dH1m5CNXtwEX02N2Z wIY/OwLGZL7c5jG8lpCBQ9P6btFvOQtEpdKLj4ufIAxF87zyWhB/g0+Dwxaw6SpalJmhyRV6UhHSc kY9Psb8y5kA8RCPcDEt3JOPSgqzOE2wgwg9mwvfPukLtyLIhHX9XktEE5XD3zjRVAdSLPMqhvX6xj VELfxZnuWyae5g==; Date: Fri, 31 May 2024 21:32:23 +0300 Message-Id: <86a5k5q1c8.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 31 May 2024 20:12:45 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: 71292@debbugs.gnu.org > Date: Fri, 31 May 2024 20:12:45 +0200 > > Eli Zaretskii writes: > > > Then how about using -keep-temps as part of native-comp-debug = 3? > > I think you mean debug >= 2? Mo, I meant > 2. > Anyway, debug info is also valuable when you don't have the C file, in > the disassembly. That is for debug > 0. Otherwise you see only bare hex > addresses and such. Debug info and keeping the *.o files is not the same. Keeping the *.o files is really gross, which is why I suggested debug > 2 (as it keeps other intermediate files). Doesn't macOS support separate debug info, which can be created with objcopy? If it does, you could copy the debug info from the *.o files, and then deleting them would not hamper debugging. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 14:53:39 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 18:53:39 +0000 Received: from localhost ([127.0.0.1]:55357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7Nj-0005QB-6c for submit@debbugs.gnu.org; Fri, 31 May 2024 14:53:39 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:50589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7Nf-0005Pk-02 for 71292@debbugs.gnu.org; Fri, 31 May 2024 14:53:38 -0400 Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-57a2406f951so2400213a12.1 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 11:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717181538; x=1717786338; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5vWuOyPo8kIEYMLvyGcAELa/mP2LMVhwbBOPqwfdYeo=; b=C0AaN9zUo9ZE/rTrVDepzCVNkfH7SheTVikCnOYDbzl0HJ6K8zldvygmGE1qIX7uu5 KEIcR7prKHEIJqdnuemxCiZztnltDrIYEiE39CQoXkrPZsMqtfagwJW8cgz2wnszLSmO DeC8eEH06c7SW8dslZIUGs4oMFwFWwufqV2crNelIIJL+Y26wiswiY27GndAbFGsaWKJ /V+8WcIR3Zs0vSGpy+wKbu8scAUebYPm6Udb9GmzJ1NGLJEQGXNNai2wjEEVdWNx9ypn p/Z48F+WYR1e6BkKJ/CM7reGeba25yP02uAM1RD6Scrofsv9cTqwUK7fdp2McKa8DwxI yE3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717181538; x=1717786338; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5vWuOyPo8kIEYMLvyGcAELa/mP2LMVhwbBOPqwfdYeo=; b=nstsqt3yFNdOVgT88oyzLSgwZHs/sv4KZ3Wz/eJOAhhhNL2/1YyMNq1S7KavI1bJnh U8iodpM36mA52Q4nOJ1ns5l5vIqNbJU0eHllQMxsDqST9LDiZScxP7IRa3AeaN5cH4LE 1dpkt4/RSmm6Vaxu8kdJN2VwOdcS+7FhumMwNKNyFRqDkyh9y83kbRANWzKT/QDuJ9If UCbLDytl318nMD6uBCUaTPHehi+2Mk9ViIzOJS4FgNLdv2JcEpxBw5Mk7qXdO9tmTXjb lZSvT7VFoG6Lx7GXj9yF0ouqmF5w/UCrIz5v0uqdATm/tsUi42eMfM64A5WS4XgS57qm c82g== X-Gm-Message-State: AOJu0Yy3w4l2hydqBzWb5RIB0Z1N/zCYDsiYIOXu/b9abb+QLw4RbWwX uQB1jTXvGe1puLPTZSHiFoi9zQNZ8hvLN4pwv9iEvgUNlnNINqSiCf18Pg== X-Google-Smtp-Source: AGHT+IG/JLlmbNqa9Lur/XKXI4ivQMUfIFtzdrghFqqfBo3jIrHcc4z9Lok1K/S4w0vpmf5XLGvCIQ== X-Received: by 2002:a50:9ece:0:b0:578:4ca5:a348 with SMTP id 4fb4d7f45d1cf-57a36447835mr1803635a12.27.1717181537541; Fri, 31 May 2024 11:52:17 -0700 (PDT) Received: from pro2.fritz.box (p4fe3a1a3.dip0.t-ipconnect.de. [79.227.161.163]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31be4055sm1279844a12.44.2024.05.31.11.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 11:52:17 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <86a5k5q1c8.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 May 2024 21:32:23 +0300") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> Date: Fri, 31 May 2024 20:52:16 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 71292@debbugs.gnu.org >> Date: Fri, 31 May 2024 20:12:45 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > Then how about using -keep-temps as part of native-comp-debug =3D 3? >>=20 >> I think you mean debug >=3D 2? > > Mo, I meant > 2. No .o files =3D no debug info on macOS. So you are proposing that one can get debug info on macOS only with debug =3D=3D 3, which produces a host of files that are not useful at all. That makes no sense to me. >> Anyway, debug info is also valuable when you don't have the C file, in >> the disassembly. That is for debug > 0. Otherwise you see only bare hex >> addresses and such. > > Debug info and keeping the *.o files is not the same. Keeping the *.o > files is really gross, which is why I suggested debug > 2 (as it keeps > other intermediate files). Keeping the .o files is normal on macOS. Gcc-14 -g does that, for example. Clang produces produce bundles directly, if one wants. GCC doesn't have an option for doing that. > Doesn't macOS support separate debug info, which can be created with > objcopy? If it does, you could copy the debug info from the *.o > files, and then deleting them would not hamper debugging. MacOS has .dSYM bundles, but how would you convince libgccjit/gcc to invoke dsymutil to produce them before it deletes the .o files? I don't see how that can be done. From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 15:06:17 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 19:06:17 +0000 Received: from localhost ([127.0.0.1]:55362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7Zw-0005vU-PT for submit@debbugs.gnu.org; Fri, 31 May 2024 15:06:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7Zr-0005v2-BQ for 71292@debbugs.gnu.org; Fri, 31 May 2024 15:06:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD7Za-0003t1-Ml; Fri, 31 May 2024 15:05:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ovHL6ypJdgf3zJufmc2v7TJBD+yjOSRGTJqkSWf2I8o=; b=Nw4OATINsBqjm0qGa+mD XYFYdgezk/VAKq9t3PHESSXvxHhHS2shlLMozdZdephfD7Up4RAB8J82UfPFgDS0bMGB+JSm79YPr h/QCsuqoj313aNvRk3QXqqZyZTifHVRFrU/a438h40he7rEFGY/LnQSDQBsCUb/F51pgFu++Xpawv 3drXDoxm972riDKX8jmgYjAYIUiWJYrcmHNY9Pfd+Z/YLIu1aBm0RYD8FUFfvmz6sY2MwJUazYeXe JXu/Qvbly5P8u0fQ6mXNJcK/uDAic9yfv3uD4TiA6RZ/kiUiMHjoM/UlW/1Iu+gbrw7jTYtyadss6 OfGFgNuTE4aT6w==; Date: Fri, 31 May 2024 22:05:25 +0300 Message-Id: <868qzppzt6.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 31 May 2024 20:52:16 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: 71292@debbugs.gnu.org > Date: Fri, 31 May 2024 20:52:16 +0200 > > > Doesn't macOS support separate debug info, which can be created with > > objcopy? If it does, you could copy the debug info from the *.o > > files, and then deleting them would not hamper debugging. > > MacOS has .dSYM bundles, but how would you convince libgccjit/gcc to > invoke dsymutil to produce them before it deletes the .o files? I don't > see how that can be done. So let me be sure I understand: there's no was on macOS to produce a shared library with debug info, except by keeping the *.o files around? IOW, when the linker produces a shared library, it doesn't copy the debug info from the *.o files to the shared library, not even given some optional command-line switch? From debbugs-submit-bounces@debbugs.gnu.org Fri May 31 15:23:46 2024 Received: (at 71292) by debbugs.gnu.org; 31 May 2024 19:23:46 +0000 Received: from localhost ([127.0.0.1]:55373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7qr-0006Yl-UG for submit@debbugs.gnu.org; Fri, 31 May 2024 15:23:46 -0400 Received: from mail-ej1-f51.google.com ([209.85.218.51]:61622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD7qm-0006YO-HX for 71292@debbugs.gnu.org; Fri, 31 May 2024 15:23:44 -0400 Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a6858bdc9ddso121614666b.2 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 12:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717183343; x=1717788143; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ni9g7Ue1h7yD5yFoM8fCo9Hw0a32y2fx2TMH0IajoKk=; b=X/nqZMf/sbrSZ/7pZijbrwLJfd2aX8NNU7US51Cm1lbDVUsEV7z3QiFCZIfbAX4GMl nVCUHtRQOiNhvXK30nlA/iwWBBES9lMAn84WbGrEdtevCg6ItHm+tOOQb2ZEzbAuhFL6 dxau21mSmN2KOX9kv9yc7UjhBlsWdurWwntzkQFkUZh6RD4ZehUxZ2WEv1MFBt6hhi4l LLuCNGizirxeDzcWMUtbcwgCSDqJZ6igL+RF9DK2Q7vZJbg8PY8j0YHGxlinW8DImJvu kwHTE34Earpg0vG2dHEa7H+noPNWScMtiB7cr6SFxv6p7odFkTqblv0bzUkWNhAvNG7D UEzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717183343; x=1717788143; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ni9g7Ue1h7yD5yFoM8fCo9Hw0a32y2fx2TMH0IajoKk=; b=Sd5fjHKbVwDbUyqtgYv+QD8c3gRfIQFSI7xfOJeDDlEFtr7SFkubA2v4fh4QHtKasN LSr/QuNzd6iiESslnd13BJTNOAxpAWgB1i+Dv3RSrInmNq+5OeTT3yLUtB+zU/RGyEOP fhneSjSbntzLBaLP1rgrv3gvALC8442j5+FZetCwHuYAu5O5WhQU+YaoyImqarE958BQ OEIR1pKtXV2G/mahbX5KksjIN5RYlZeONCVcb6c69ZWOqZ+g2AGylIL5sD2lLyymsrZT rFTr1an85DVEsSOuvEWsLniWvLz1S2T90/CGyRBcg5a4FW7fVC3Apco6boOYOzgn95ZJ IGAQ== X-Gm-Message-State: AOJu0YwHDzQdW0z3TJXWDuGQ+O+DiurK0mIxH7xKIDWNzhTpjdzoAQs/ SPAQcovfQLi+xup1nb25rAliZumO95Kw+P4KYP0vjgco37R7lazZNPMgTQ== X-Google-Smtp-Source: AGHT+IEGRIwWoF4eoCvb6JQl+jP2+XKqih24mWezWA6+Ub7cexpEb9/YGrIw3rIePs0UcR7+4fI2eA== X-Received: by 2002:a17:906:158c:b0:a66:c400:ff22 with SMTP id a640c23a62f3a-a681f87e614mr193369466b.5.1717183343044; Fri, 31 May 2024 12:22:23 -0700 (PDT) Received: from pro2.fritz.box (p4fe3a1a3.dip0.t-ipconnect.de. [79.227.161.163]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67ea58695dsm115356966b.127.2024.05.31.12.22.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 12:22:22 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <868qzppzt6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 May 2024 22:05:25 +0300") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> Date: Fri, 31 May 2024 21:22:21 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 71292@debbugs.gnu.org >> Date: Fri, 31 May 2024 20:52:16 +0200 >>=20 >> > Doesn't macOS support separate debug info, which can be created with >> > objcopy? If it does, you could copy the debug info from the *.o >> > files, and then deleting them would not hamper debugging. >>=20 >> MacOS has .dSYM bundles, but how would you convince libgccjit/gcc to >> invoke dsymutil to produce them before it deletes the .o files? I don't >> see how that can be done. > > So let me be sure I understand: there's no was on macOS to produce a > shared library with debug info, except by keeping the *.o files > around? IOW, when the linker produces a shared library, it doesn't > copy the debug info from the *.o files to the shared library, not even > given some optional command-line switch? That's correct. An executables on macOS cannot contain debug info as part of its own file. It contains only a "debug map" referencing the .o files from which it was built, and these contain the debug info. Alternatively, if the .o files are not present, or have changed, tools like debuggers can use .dSYM bundles which are produced by dsymutil from the .o files in an executable's debug map when it was built. It's acting like a sort of debug info linker in that case. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 02:17:04 2024 Received: (at 71292) by debbugs.gnu.org; 1 Jun 2024 06:17:04 +0000 Received: from localhost ([127.0.0.1]:55679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDI36-0000eq-Cu for submit@debbugs.gnu.org; Sat, 01 Jun 2024 02:17:04 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:42488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDI30-0000eF-GJ for 71292@debbugs.gnu.org; Sat, 01 Jun 2024 02:17:02 -0400 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a59a352bbd9so443199166b.1 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 23:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717222541; x=1717827341; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wZUKbcZdk6TE2/9dQ98Bx8OWNepVVlU9sOTI/Pw3xyo=; b=blkjPh1SHLzmkERBdFsCR5tbncGimEx0b5b/OVGCO/mykroZT8Usfe9t3s+Tl4wa6a Oa31fJ8JAs/7TvWYWgOk2+DCO2kVZikkU+hOzTvdOZ6Ve/3VOAPucPHBhA6BfHnwihW4 NhR5tc5Bkh5KUA+o3HrTXWfZX5R/4OitLYYN65UfhFRPqk5L1t8BzkWQitF8w4+S3pBv kdZKxdK9GL7ZF5yidharVMXNNYKqs1dOxpBkWeKkf6nlZAbcy9pBeu+bRANkvB2yKBw3 8WDtFliCA4/Sel/FmMpDB1a80QRmgAoZRh8uFkz4PMRFI3GXWan96Oxy9+VmyySmL1SC zA5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717222541; x=1717827341; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wZUKbcZdk6TE2/9dQ98Bx8OWNepVVlU9sOTI/Pw3xyo=; b=ROr7Xf+GS05YWnTUr+LrjawKqP+D1k8akOV5Uile1AbfNds03oeAHMIuktoh5/maMK tzw8Nc895AU+mcu2J7q8cAC5bMqUknioMju9RGTjgKd9Ecmoze7j/Cwen9Rok2Dy0fS3 2489jENcIwoMk+KxYmNZyNjqN8ikweuhwj/8SIFpyNuL01cAmhrIQmQTxJ4TXaKHvafq FzyL3n+Pwrhop0ZuDw+JiysXhnkb7B8L0gIeMMczc2S24Xv5ArS9dmIq6JpoJMBvUd86 KAYQovehQDsPi9W+hT2f8/8PuhPEEeviuJKd1LRb116WCl2FfIwyljpsnfMV5zvxl5bO +UcA== X-Gm-Message-State: AOJu0YzL0cw1qn6UMd81UMUvbd7G2+aoSXd/3EjCcIF0b0Cfv9FSIX4J LlEqyo8mQ07Ex8yf8OCWW/D+bzRpPISajsayAPkUHydZycI3Fp27srUp2w== X-Google-Smtp-Source: AGHT+IF3JmAP5YbMm5nNwTiiKdadxdKyndx4rgYZ+p988vyw54ceQjulmHm2Tg+L7AbohjKC8uCe6w== X-Received: by 2002:a17:906:fc1a:b0:a68:b159:11ee with SMTP id a640c23a62f3a-a68b1591740mr56758066b.12.1717222540800; Fri, 31 May 2024 23:15:40 -0700 (PDT) Received: from pro2.fritz.box (pd9e36cc8.dip0.t-ipconnect.de. [217.227.108.200]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e78dbb4csm163993366b.96.2024.05.31.23.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 23:15:40 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Fri, 31 May 2024 21:22:21 +0200") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> Date: Sat, 01 Jun 2024 08:15:39 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > Eli Zaretskii writes: > >>> From: Gerd M=C3=B6llmann >>> Cc: 71292@debbugs.gnu.org >>> Date: Fri, 31 May 2024 20:52:16 +0200 >>>=20 >>> > Doesn't macOS support separate debug info, which can be created with >>> > objcopy? If it does, you could copy the debug info from the *.o >>> > files, and then deleting them would not hamper debugging. >>>=20 >>> MacOS has .dSYM bundles, but how would you convince libgccjit/gcc to >>> invoke dsymutil to produce them before it deletes the .o files? I don't >>> see how that can be done. >> >> So let me be sure I understand: there's no was on macOS to produce a >> shared library with debug info, except by keeping the *.o files >> around? IOW, when the linker produces a shared library, it doesn't >> copy the debug info from the *.o files to the shared library, not even >> given some optional command-line switch? > > That's correct. > > An executables on macOS cannot contain debug info as part of its own > file. It contains only a "debug map" referencing the .o files from which > it was built, and these contain the debug info. > > Alternatively, if the .o files are not present, or have changed, tools > like debuggers can use .dSYM bundles which are produced by dsymutil from > the .o files in an executable's debug map when it was built. It's acting > like a sort of debug info linker in that case. Just to mention it... When debugging a native-compiled function (speed =3D 1) an macOS/arm64, I find that the debug info that libgccjit 14.1 generates is apparently incorrect. For example, I see car_safe being called with some argument, but when I look in the caller in the generated C file and print what it purportedly passes as an argumebnt, it's something completely different. That is of course pretty useless. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 02:26:03 2024 Received: (at 71292) by debbugs.gnu.org; 1 Jun 2024 06:26:03 +0000 Received: from localhost ([127.0.0.1]:55683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDIBn-0000rq-HI for submit@debbugs.gnu.org; Sat, 01 Jun 2024 02:26:03 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:48377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDIBk-0000rK-Ei for 71292@debbugs.gnu.org; Sat, 01 Jun 2024 02:26:02 -0400 Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52b8e0e98adso1150397e87.0 for <71292@debbugs.gnu.org>; Fri, 31 May 2024 23:25:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717223083; x=1717827883; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/pLhJoxSQ/FHuWkws3FgZ9UOem+XYykToIWkYQV5QkU=; b=btBC7OyXwVSH7Aa3AltJ6m4ApLRyLKh21z3kMlTJSo9MYRlMVLU8sl+07ccdgzRtHu YMF8PPQzgLgi+6HcCb/T7UTMEqUOzbLQMXzITWXx0g8dDNgqS1kqVqv3XQvct7e2QBy3 igxxTqweQ94wxGYWfRjIRU60yp4VrTsYlbcJprlqc0Bxxbuu5mTq8T7KllKZIT4mLIJx O/3NVl2Ifs/SdMLky4mau5V2NBp2d3Gym7FB3krvPSayewfG0+Cfoyi6iYntV20+jfhS 60Cb97xZ7sHPGIpPJUy8StQvLFXpj3IZAIwIM+c83F8N9WH8QLzmpG4p8/uBssHcU0je MHcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717223083; x=1717827883; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/pLhJoxSQ/FHuWkws3FgZ9UOem+XYykToIWkYQV5QkU=; b=G9cfZsDThVrR20H+QyYegrKXt5WYKA9CutHFLsQjeSgrUVZwCtGhPZbwBJgk5vMTzB 4kF13sRA+1cWmoDw1yYjOGLD81HN5Sdu7NPLkX632bD9U7GFR/vrGzn3yva6QIvdHKSf jCpli2CEOVRUFRDU43mjPgaj78f1DOSRvvHh9bJMXQYarApEmVqMEwS1WjexIgyW8tSQ OXoW0bZtgsQqcWsBY3cWLFco/gc1kEOHeiOg2vrq9/2YvOtAXvAL9y3B6xFaLoTAqs+G 9aLEAfLnVVttku2n/683AYXK0l4Eh9n8T403vmIeu7Y9OlZL4PNX81koQS6FmKDO/4uV ppiA== X-Gm-Message-State: AOJu0YzCCMM3V5Btsk+Tv3Ck551Bjv6+92jH+KfcA+PBXvRi0alAe+ru D7v7l3fii1gWw45wO4K27RklAx2GZ1Y2OGzTHvLIbnPLOqmkh6U+B92ffw== X-Google-Smtp-Source: AGHT+IFkx3UfPHmn0I3iBY4rtG0vaJYrWNReHGHgD9Zq9S630jwFHPUErNf+IsJNZQAAmxWGeAIwBQ== X-Received: by 2002:a19:5e1d:0:b0:52b:8d83:b864 with SMTP id 2adb3069b0e04-52b8d83b980mr1405566e87.30.1717223082414; Fri, 31 May 2024 23:24:42 -0700 (PDT) Received: from pro2.fritz.box (pd9e36cc8.dip0.t-ipconnect.de. [217.227.108.200]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a31b9943asm1846529a12.14.2024.05.31.23.24.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 23:24:42 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Sat, 01 Jun 2024 08:15:39 +0200") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> Date: Sat, 01 Jun 2024 08:24:41 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gerd M=C3=B6llmann writes: > When debugging a native-compiled function (speed =3D 1) an macOS/arm64, I > find that the debug info that libgccjit 14.1 generates is apparently > incorrect. Or let me rather say that debug info and code generated don't agree. It could of course also be a code generation problem. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 02:36:51 2024 Received: (at 71292) by debbugs.gnu.org; 1 Jun 2024 06:36:51 +0000 Received: from localhost ([127.0.0.1]:55689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDIME-00017m-Ml for submit@debbugs.gnu.org; Sat, 01 Jun 2024 02:36:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDIM9-00017X-2V for 71292@debbugs.gnu.org; Sat, 01 Jun 2024 02:36:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDILs-0003mH-3J; Sat, 01 Jun 2024 02:36:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=8O5RKQITXKvnRMsJ0PkEr2lBlw8hanMGj1RY9N9NlQQ=; b=p4366/r18taRACBTxvcM dzFA/LG/3tU5+aseBm357r81z4fkVC+fNo0YeY1wbFeVYhtwEs7MYHIvTVQhU9PioDhOhUKV36ltM Z+nhjUOsqKuMbxfFzcv3k+2GOC5Xzbsd12r6kIxRTZyAiY1VePUXhUXQ4qJqCT2Pdwe84wd4HqB9s JF0vaHnIVAJdgGul9TEe0X38BwzgyUzDCYv2xkOX0+X3EOO4U4K3n7C/pSUJQQNecke73F+pEvyBd Mi9Bcggbpu4z+AY31bAGcatCaYaj2bQx49cElnQSUdRQs6ops9VA7p6jM+4Tq2APTPCN+tGP2zFdA CWxU8iXCpuV74w==; Date: Sat, 01 Jun 2024 09:36:25 +0300 Message-Id: <861q5hp3ti.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sat, 01 Jun 2024 08:15:39 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: 71292@debbugs.gnu.org > Date: Sat, 01 Jun 2024 08:15:39 +0200 > > When debugging a native-compiled function (speed = 1) an macOS/arm64, I > find that the debug info that libgccjit 14.1 generates is apparently > incorrect. > > For example, I see car_safe being called with some argument, but when I > look in the caller in the generated C file and print what it purportedly > passes as an argumebnt, it's something completely different. This should be reported to the GCC and libgccjit folks. The most probable cause is incorrect DWARF debug info emitted by the compiler. Alternatively, it could be that LLDB interprets the debug info incorrectly. I sometimes see similar problems when debugging Emacs, especially in optimized versions: arguments in function calls are shown in reverse order, which of course is bogus, since the code works as expected. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 01:42:41 2024 Received: (at 71292) by debbugs.gnu.org; 2 Jun 2024 05:42:41 +0000 Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdzM-0005D3-2b for submit@debbugs.gnu.org; Sun, 02 Jun 2024 01:42:40 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:50571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdzF-0005Cm-VR for 71292@debbugs.gnu.org; Sun, 02 Jun 2024 01:42:35 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4212e899814so17427945e9.1 for <71292@debbugs.gnu.org>; Sat, 01 Jun 2024 22:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717306876; x=1717911676; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=brfXp6FJx3+gfKzsoFWRKVE5DkSyZIsfrug4IF31mvU=; b=BlKU4hcfanm3Jf2PbiYp0r3S9/8lLPsYCUKYoV+2lK0T89AQGbM2/AS7E+YjLqvREE JpeedrsHX0Cb5k3EQ7sz1ILZmswxy++C/V+d6FyU9QkDfNyZ9cNiKIsQSuabbChEYznI P9CgJDV6qIsto2au8ra/R9NQpPHGMLy3AmVl9Lnz4DEjxuieZ7t05BAw7f1gHsU+p/9o QFoB4diIbFeY1bq/mBSNAGZ0Pzbv8qj1x0qtuq9qrwD7Oe6GzotX1FPveb3ICUYS6N/V 35m6edeSk/ybEfLRUlgtaK8KZdxwk3OZl3YXR1jrh3ONOLFJzVg1iREk6s1gMjAIWT5l QQ+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717306876; x=1717911676; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=brfXp6FJx3+gfKzsoFWRKVE5DkSyZIsfrug4IF31mvU=; b=i17kfjBHts2RRePma7bK6t89jIBfDr9KhUDJIU3MXnmRpe50gM7XxIaYHVrFBdD2T+ VLoPjxCXiPdGaBtcnL+hEvijfS8oXO3zyPWNDK9hP/0Iu8Y0qp8f352ZEPDPTa9fTsCJ Sy8UbBdfDo03+5XX58G0uoba/QZ9PpYqdXfr3ro8wmabhKLNycKltsYXmzg41ouDnUvV AAvh4YlbRRXrj5CLUehm/X9Kn2s1E7mBKRPG7Jh0B7mnWD0/W7WUqJ2OvVwYWTIXTI5I +68U052uZ88Yq2TuB6yRY+ArDTyS95c+ymOiUt+tQLNzdDND5ulHtoamI+c9LQUKY35G Co8w== X-Gm-Message-State: AOJu0YwFwIwj3MqiRd8aWnyiyDakmaE1frbHIZj9IlFdm8fAKc2hfmf4 A6f7PptNjFo45Ad52nYAauc9mUiUOPZl8bATIAtfOFAiBZPINSn1 X-Google-Smtp-Source: AGHT+IEoZRZpHbXnJWxyvZ7tMnWjBYWO4cOLGeUYMRFIv0b0D4JRLSf7l3dIfz6Cci3mf9pTvBAcbQ== X-Received: by 2002:a05:600c:4a17:b0:421:2a55:d1fe with SMTP id 5b1f17b1804b1-4212e09d8c3mr45934725e9.30.1717306875526; Sat, 01 Jun 2024 22:41:15 -0700 (PDT) Received: from pro2.fritz.box (p4fe3ad9f.dip0.t-ipconnect.de. [79.227.173.159]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42135c9dc18sm35410545e9.1.2024.06.01.22.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 22:41:14 -0700 (PDT) From: =?utf-8?Q?Gerd_M=C3=B6llmann?= To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <861q5hp3ti.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 01 Jun 2024 09:36:25 +0300") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> <861q5hp3ti.fsf@gnu.org> Date: Sun, 02 Jun 2024 07:41:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71292 Cc: Andrea Corallo , 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 71292@debbugs.gnu.org >> Date: Sat, 01 Jun 2024 08:15:39 +0200 >>=20 >> When debugging a native-compiled function (speed =3D 1) an macOS/arm64, I >> find that the debug info that libgccjit 14.1 generates is apparently >> incorrect. >>=20 >> For example, I see car_safe being called with some argument, but when I >> look in the caller in the generated C file and print what it purportedly >> passes as an argumebnt, it's something completely different. > > This should be reported to the GCC and libgccjit folks. The most > probable cause is incorrect DWARF debug info emitted by the compiler. > Alternatively, it could be that LLDB interprets the debug info > incorrectly. I sometimes see similar problems when debugging Emacs, > especially in optimized versions: arguments in function calls are > shown in reverse order, which of course is bogus, since the code > works as expected. After reading the GCC "how to report a bug" advice, I don't think I can produce something useful for them in any reasonable time frame. The jit people will also not be of great help I'm afraid. There seems to be no one in the know using macOS :-). But there have been some arm64 related commits in GCC during the last weeks, so there's hope. BTW, I'm now using the attached change in my Emacs, which allows me to set native-comp-debug, -speed, and -driver-options via environment variables. Maybe that's something for Andrea (CC'd). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Allow-overriding-comp-settings-for-speed-debug-drive.patch Content-Description: comp settings >From ec514e5e81034f5524bba552c56f7f8caa9fff71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Sun, 2 Jun 2024 07:25:19 +0200 Subject: [PATCH] Allow overriding comp settings for speed, debug, driver --- lisp/emacs-lisp/comp.el | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 4c76f95a0e9..2cf9b43dddb 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3585,17 +3585,7 @@ native-compile return the compiled function." (comp--native-compile function-or-file nil output)) -;;;###autoload -(defun batch-native-compile (&optional for-tarball) - "Perform batch native compilation of remaining command-line arguments. - -Native compilation equivalent of `batch-byte-compile'. -Use this from the command line, with `-batch'; it won't work -in an interactive Emacs session. -Optional argument FOR-TARBALL non-nil means the file being compiled -as part of building the source tarball, in which case the .eln file -will be placed under the native-lisp/ directory (actually, in the -last directory in `native-comp-eln-load-path')." +(defun batch-native-compile-1 (&optional for-tarball) (comp-ensure-native-compiler) (let ((comp-running-batch-compilation t) (native-compile-target-directory @@ -3610,6 +3600,35 @@ batch-native-compile else collect (byte-compile-file file)))) +;;;###autoload +(cl-defun batch-native-compile (&optional for-tarball) + "Perform batch native compilation of remaining command-line arguments. + +Native compilation equivalent of `batch-byte-compile'. +Use this from the command line, with `-batch'; it won't work +in an interactive Emacs session. +Optional argument FOR-TARBALL non-nil means the file being compiled +as part of building the source tarball, in which case the .eln file +will be placed under the native-lisp/ directory (actually, in the +last directory in `native-comp-eln-load-path')." + (cl-macrolet + ((with-env ((&rest vars) &body body) + (let (clauses) + (cl-with-gensyms (val) + (dolist (var vars) + (let ((env (string-replace + "-" "_" + (upcase (symbol-name var))))) + (push `(,var (let ((,val (getenv ,env))) + (if ,val + (car (read-from-string ,val)) + ,var))) + clauses)))) + `(let (,@(nreverse clauses)) ,@body)))) + (with-env (native-comp-speed native-comp-debug + native-comp-driver-options) + (batch-native-compile-1 for-tarball)))) + ;; In use by elisp-mode.el (defun comp--write-bytecode-file (eln-file) "After native compilation write the bytecode file for ELN-FILE. -- 2.45.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 02:41:16 2024 Received: (at 71292) by debbugs.gnu.org; 2 Jun 2024 06:41:16 +0000 Received: from localhost ([127.0.0.1]:57707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDeu4-0007du-9I for submit@debbugs.gnu.org; Sun, 02 Jun 2024 02:41:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDeu2-0007db-Am for 71292@debbugs.gnu.org; Sun, 02 Jun 2024 02:41:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDetk-0003C5-Tg; Sun, 02 Jun 2024 02:40:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3rCqIifCwVxXdI0XFQcwTYybRIBmVrK7gDgOqdEVM2U=; b=YoJHaC5Ecc/D3Q9yiTGn HSNEunk7RHfm57mHL3UItAmKWbHymFBWPsUej52jMc53geqEq2Tbyobpmhy5bCxYLm77JE2cui8QX n0xQJq716mE1+ni9F+qiiNZutFRRFBMIs2ynEUFOYCIGCNiZt+gsYe4AzRkwXt5PxCXFrBZqbUnik KzAiIyVsc1M7KuZLL6mUwDA8PCU/xFiORsj2x+/J2zs0Hw17fc9s7SHOCirupo4hrtgXL2J1Y5ViZ rybb+7Ba/IhsJpuFnb6uZJPFjUrlceEDTucZeDxEJiE7U/gr/mF89RMyJAWo4yxBbC8tc4rvJSzib pyZUIS86wudQvQ==; Date: Sun, 02 Jun 2024 09:40:52 +0300 Message-Id: <86y17nn8y3.fsf@gnu.org> From: Eli Zaretskii To: Gerd =?utf-8?Q?M=C3=B6llmann?= In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Sun, 02 Jun 2024 07:41:13 +0200) Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> <861q5hp3ti.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: acorallo@gnu.org, 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gerd Möllmann > Cc: 71292@debbugs.gnu.org, Andrea Corallo > Date: Sun, 02 Jun 2024 07:41:13 +0200 > > > This should be reported to the GCC and libgccjit folks. The most > > probable cause is incorrect DWARF debug info emitted by the compiler. > > Alternatively, it could be that LLDB interprets the debug info > > incorrectly. I sometimes see similar problems when debugging Emacs, > > especially in optimized versions: arguments in function calls are > > shown in reverse order, which of course is bogus, since the code > > works as expected. > > After reading the GCC "how to report a bug" advice, I don't think I can > produce something useful for them in any reasonable time frame. > > The jit people will also not be of great help I'm afraid. There seems to > be no one in the know using macOS :-). I think you should still report that, as best as you can and could afford to. It is way better than keeping the information here or to yourself. Maybe someone will pick up the gauntlet. Or not. > BTW, I'm now using the attached change in my Emacs, which allows me to > set native-comp-debug, -speed, and -driver-options via environment > variables. Maybe that's something for Andrea (CC'd). In general, I don't like using environment variables for this, because they are passed to sub-processes as well, something you don't necessarily want. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 03 11:31:03 2024 Received: (at 71292) by debbugs.gnu.org; 3 Jun 2024 15:31:03 +0000 Received: from localhost ([127.0.0.1]:43563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sE9eI-0007vu-E2 for submit@debbugs.gnu.org; Mon, 03 Jun 2024 11:31:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sE9eG-0007vP-Ga for 71292@debbugs.gnu.org; Mon, 03 Jun 2024 11:31:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sE9dy-00006J-9d; Mon, 03 Jun 2024 11:30:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=uIw7FqWGKjQCkqGoeI5Dw+tZEO65w1aHH7DXS9Pu+n8=; b=QqNw+lXGc19GfVnL/pJ1 Ih+dGxWj/8zI96eZzIxg0F9CNGXWQ6V9VlYJL8LcaY1UJZEc3eybUclR0SOTrqpeUYk1yqKL7QkXB rMFQFxmt05izQ0GUMJnbUffjm7V8J4/3Kq/f2Z9rv+qreVOgZNXgs6LNg7S3b4oxbMWFIZe8uf5Ix aHWbxptsg0wkgHHDZPIyUt55TAaev7xwe3/A67J5OLeTS4fcfBdPiS7gjXREQly/V9kidnY52YKHa Y3j8ogcH2mp71Vx4G3MuJA3RTP5Igyx04CJXqA3xaSpFq9D/cIirsR3iDcg4ju3IbTBlGm9yrR0d6 H6F6cQL99/s+Hg==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1sE9dw-0007e1-2d; Mon, 03 Jun 2024 11:30:42 -0400 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#71292: 30.0.50; macOS: .elns have no debug info In-Reply-To: <86y17nn8y3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 09:40:52 +0300") References: <86le3qour9.fsf@gnu.org> <86frtxq2ih.fsf@gnu.org> <86a5k5q1c8.fsf@gnu.org> <868qzppzt6.fsf@gnu.org> <861q5hp3ti.fsf@gnu.org> <86y17nn8y3.fsf@gnu.org> Date: Mon, 03 Jun 2024 11:30:39 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71292 Cc: Gerd =?utf-8?Q?M=C3=B6llmann?= , 71292@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 71292@debbugs.gnu.org, Andrea Corallo >> Date: Sun, 02 Jun 2024 07:41:13 +0200 >>=20 >> > This should be reported to the GCC and libgccjit folks. The most >> > probable cause is incorrect DWARF debug info emitted by the compiler. >> > Alternatively, it could be that LLDB interprets the debug info >> > incorrectly. I sometimes see similar problems when debugging Emacs, >> > especially in optimized versions: arguments in function calls are >> > shown in reverse order, which of course is bogus, since the code >> > works as expected. >>=20 >> After reading the GCC "how to report a bug" advice, I don't think I can >> produce something useful for them in any reasonable time frame. >>=20 >> The jit people will also not be of great help I'm afraid. There seems to >> be no one in the know using macOS :-). > > I think you should still report that, as best as you can and could > afford to. It is way better than keeping the information here or to > yourself. Maybe someone will pick up the gauntlet. Or not. +1 >> BTW, I'm now using the attached change in my Emacs, which allows me to >> set native-comp-debug, -speed, and -driver-options via environment >> variables. Maybe that's something for Andrea (CC'd). > > In general, I don't like using environment variables for this, because > they are passed to sub-processes as well, something you don't > necessarily want. +1 as well Andrea