From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 61847@debbugs.gnu.org
Subject: bug#61847: debug-early-backtrace only works some of the time.
Date: Tue, 28 Feb 2023 19:52:33 +0000 [thread overview]
Message-ID: <Y/5bgUM6Mzv/GIWQ@ACM> (raw)
In-Reply-To: <jwvlekhk85l.fsf-monnier+emacs@gnu.org>
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).
next prev parent reply other threads:[~2023-02-28 19:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 17:11 bug#61847: debug-early-backtrace only works some of the time Alan Mackenzie
2023-02-27 19:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-28 9:12 ` Alan Mackenzie
2023-02-28 12:16 ` Eli Zaretskii
2023-02-28 13:16 ` Alan Mackenzie
2023-02-28 14:22 ` Eli Zaretskii
2023-02-28 14:45 ` Alan Mackenzie
2023-02-28 17:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-28 19:52 ` Alan Mackenzie [this message]
2023-02-28 19:58 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-01 12:16 ` Eli Zaretskii
2023-03-01 15:22 ` Alan Mackenzie
2023-03-01 16:01 ` Eli Zaretskii
2023-03-01 16:46 ` Alan Mackenzie
2023-03-01 17:04 ` Eli Zaretskii
2023-03-01 17:31 ` Alan Mackenzie
2023-03-01 18:22 ` Eli Zaretskii
2023-03-01 17:34 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-03 10:58 ` Alan Mackenzie
2023-03-01 13:32 ` Eli Zaretskii
2023-03-01 16:05 ` Alan Mackenzie
2023-03-01 16:53 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/5bgUM6Mzv/GIWQ@ACM \
--to=acm@muc.de \
--cc=61847@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.