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.devel Subject: Re: [PATCH]: Re: Early backtrace. Date: Fri, 04 Feb 2022 09:24:35 +0200 Message-ID: <83wnib2ix8.fsf@gnu.org> References: <8335l05or3.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16855"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 04 09:31:09 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nFtzo-0004BM-P2 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 09:31:08 +0100 Original-Received: from localhost ([::1]:57844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFtzm-0000oW-JA for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 03:31:06 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFsxT-0005AP-VD for emacs-devel@gnu.org; Fri, 04 Feb 2022 02:24:41 -0500 Original-Received: from [2001:470:142:3::e] (port=43742 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFsxK-0002i0-9b; Fri, 04 Feb 2022 02:24:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QvjRsNL2x2M/U5P5kATXtgol4UvBFl8Fdsb1LU8xixU=; b=Y1uHbQKJWZUm a0+BZDlrWAGk4Kj5cZUFZvPlf1J1lZMtGnTHJy7/JYKFz276fn9GCZ0ncz7j+jLmo7JDaqT5ZPI9E +b7JwrVCU73lwuCbui1Exi2a0r2pMA/xB2zWfsHUfSqpktsgQgczxZwv3QEZKL3enRjeKp7bN5sET qaSH7HpeKUAVEbxBUXGK9mlgsR5+DNcuFGi+sN6W5n5W8YvsC/wA1moZ8Q46bVRU382xu0eJLGOsc q1Rirp5xrkpE0vgWvgJD5JCjSNlQh+DOaOXZQAckaIK8x87tEYXggInVdIjVI9RBoTI7YNGQKlorI zI6TlTMVen0aE1kxs/57TA==; Original-Received: from [87.69.77.57] (port=2232 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFsxI-0006ak-8T; Fri, 04 Feb 2022 02:24:29 -0500 In-Reply-To: (message from Alan Mackenzie on Thu, 3 Feb 2022 21:35:26 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:285855 Archived-At: > Date: Thu, 3 Feb 2022 21:35:26 +0000 > Cc: Stefan Monnier , emacs-devel@gnu.org > From: Alan Mackenzie > > > How about adding to debug-early.el some minimal documentation, which > > would explain how to use this facility for debugging bootstrap > > problems and batch-mode problems in general? The doc strings you, > > Alan, provided don't describe the context and the intended use in any > > level of useful detail. > > I'm not sure entirely what's needed here, probably because I've been > working a lot at this level for quite a long time. It might be a misunderstanding on my part, caused by your particular choice of words: > (defalias 'debug-early > #'(lambda (&rest args) > - "Print a trace of Lisp function calls currently active. > + "Print an error message with a backtrace of active Lisp function calls. > The output stream used is the value of `standard-output'. > > -There should be two ARGS, the symbol `error' and a cons of > -the error symbol and its data. > +There should be two ARGS: the symbol `error' (which is ignored) > +and a cons of the error symbol and the error data. What do you mean by "should be" here? Is that something the user should arrange for, or does this already happen? If the latter, why "should"? > +This is a simplified version of `debug', intended to produce > +diagnostics to help in debugging the early parts of the build > +process. It is typically called by the Emacs core when an error > +is signaled. "Typically" means it is, or can be, also called in other cases? What are those? > -This is a simplified version of `debug', intended for use > -in debugging the early parts of the build process." > +`debug-early' is the default value of the symbol `debugger' > +before enough Lisp has been loaded to support `debug' itself, and > +in batch mode." When you say "intended for use" and "intended to produce", it sounds like users should do something to benefit from this "intended use". If, instead, you mean that this feature is activated automatically in some circumstances, then I suggest to reword this to describe the feature from that perspective: when it is activated and what it provides when activated. Bottom line, I still miss some higher-level overview of this feature, which should probably go into the Commentary section of the file. Thanks.