From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: gdb doesn't print Lisp backtrace in some circumstances.
Date: Fri, 12 Apr 2024 11:29:29 +0000 [thread overview]
Message-ID: <ZhkbGdebUY4DOQzA@ACM> (raw)
In-Reply-To: <86pluusunr.fsf@gnu.org>
Hello, Eli.
On Fri, Apr 12, 2024 at 14:11:04 +0300, Eli Zaretskii wrote:
> > Date: Fri, 12 Apr 2024 10:31:53 +0000
> > From: Alan Mackenzie <acm@muc.de>
> > Yesterday I got a core dump from a segmentation fault in Emacs (my
> > development version, not master). I loaded this into gdb inside Emacs
> > to have a look at it.
> > The backtrace command output the C data as it should, but on coming to
> > the Lisp backtrace gave an error message about there needing to be a
> > process running to "do this". (I don't have the exact message any
> > more.) It would seem these fancy Lisp facilities only work when the
> > process that produced them is still running.
> Yes, because they call functions inside Emacs to format Lisp objects.
> > All the information required to produce this Lisp backtrace is present
> > in the core dump. Would it be possible, perhaps, to modify our .gdbinit
> > to use the running Emacs to process the core dump, or something like
> > that?
> I don't think so, no.
That's what I feared.
> But you can reproduce the Lisp backtrace manually (albeit tediously,
> by going over all the calls to Ffuncall, eval_sub and suchlikes, and
> displaying their arg[0]. If it's a symbol, typing xsymbol should show
> you the Lisp function being called. If it is not a symbol, you could
> use xcar/xcdr etc., but that is much more tedious, and I usually give
> up on those frames in the stack.
I spent a large part of yesterday on this dump. It ends up with a call
(apply apply ...) which goes into an infinite recursion with the number
of arguments increasing by 1 at each stage. I've found the point in the
backtrace where the recursion starts, but it's tedious indeed getting
information out of it. I think I'll have to, though, since I can't see
any other way of debugging this at the moment.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2024-04-12 11:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 10:31 gdb doesn't print Lisp backtrace in some circumstances Alan Mackenzie
2024-04-12 11:11 ` Eli Zaretskii
2024-04-12 11:29 ` Alan Mackenzie [this message]
2024-04-12 12:03 ` Eli Zaretskii
2024-04-12 13:18 ` Alan Mackenzie
2024-04-12 13:24 ` Eli Zaretskii
2024-04-13 10:07 ` Alan Mackenzie
2024-04-12 14:48 ` Gerd Möllmann
2024-04-12 14:56 ` Gerd Möllmann
2024-04-12 15:08 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZhkbGdebUY4DOQzA@ACM \
--to=acm@muc.de \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).