From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#61847: debug-early-backtrace only works some of the time. Date: Tue, 28 Feb 2023 19:52:33 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10863"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61847@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 28 20:53:15 2023 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 1pX62E-0002Xp-NW for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Feb 2023 20:53:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX625-0002MO-Lk; Tue, 28 Feb 2023 14:53:05 -0500 Original-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 1pX623-0002MB-AQ for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:53:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX623-0003rn-2d for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:53:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pX622-0002CA-JC for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 14:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2023 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61847 X-GNU-PR-Package: emacs Original-Received: via spool by 61847-submit@debbugs.gnu.org id=B61847.16776139648409 (code B ref 61847); Tue, 28 Feb 2023 19:53:02 +0000 Original-Received: (at 61847) by debbugs.gnu.org; 28 Feb 2023 19:52:44 +0000 Original-Received: from localhost ([127.0.0.1]:52044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX61j-0002BZ-M8 for submit@debbugs.gnu.org; Tue, 28 Feb 2023 14:52:43 -0500 Original-Received: from mx3.muc.de ([193.149.48.5]:31293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pX61h-0002BJ-Rg for 61847@debbugs.gnu.org; Tue, 28 Feb 2023 14:52:42 -0500 Original-Received: (qmail 11631 invoked by uid 3782); 28 Feb 2023 20:52:34 +0100 Original-Received: from acm.muc.de (pd953a9ed.dip0.t-ipconnect.de [217.83.169.237]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 28 Feb 2023 20:52:34 +0100 Original-Received: (qmail 22030 invoked by uid 1000); 28 Feb 2023 19:52:33 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257009 Archived-At: Hello, Stefan. On Tue, Feb 28, 2023 at 12:36:32 -0500, Stefan Monnier wrote: > >> To get more readable backtraces when used after bootstrapping (as well as > >> in the later phases of bootstrapping). > > More readable? Just how is a backtrace produced using cl-prin1 more > > readable than one using prin1? They both look pretty much the same. But > > cl-prin1 only outputs partial information for some things, such as > > compiled functions, so it is not a good choice. debug-early-backtrace > > should produce _complete_ backtraces. > The output for compiled functions is the main one which I think is more > readable (among those that occur often in backtraces), so let's just > agree to disagree on this one. No. The point is too important not to resolve. I think you're objectively wrong here. The purpose of a backtrace is not to enter a beauty contest. Rather it's to provide the programmer with as much information as reasonably possible to solve a bug. The lack of output for compiled functions with cl-prin1 condemns it. All that appears is "#f(compiled-function)" together with an empty pair of parentheses and a meaningless hex address. What use is any of that in debugging a batch mode bug? prin1 by contrast prints the actual contents of the function - its byte code string and its constant vector, among other things. It may not be as "readable", but it is infinitely more useful to the person trying to debug a bug. > > And how will the contition-case you suggest help? (require 'cl-print nil > > t) returns non-nil in the pertinent circumstances. > The `noerror` argument of `require` doesn't silence the errors that > happen while loading the file, instead it prevents signaling an error > when the file is not found. Whether that error is silenced or not is wholly unimportant. The only important thing here is to get a backtrace, and your patch will not help do that. Mine does help - I've tested it. > > Putting a condition-case around that isn't going to change this. > I'm hoping it will. How can it possibly help get that backtrace? > > Have you actually tried out your patch? > No. Please do so, and report. > Stefan -- Alan Mackenzie (Nuremberg, Germany).