From: Eli Zaretskii <eliz@gnu.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: Need help with understanding truncated and corrupted backtraces
Date: Thu, 25 Mar 2021 12:04:29 +0200 [thread overview]
Message-ID: <831rc3k0r6.fsf@gnu.org> (raw)
In-Reply-To: <aa73e0c1-7bb2-a266-0ce5-d27ff5ff4d4b@polymtl.ca> (message from Simon Marchi on Wed, 24 Mar 2021 18:48:18 -0400)
> From: Simon Marchi <simon.marchi@polymtl.ca>
> Date: Wed, 24 Mar 2021 18:48:18 -0400
>
> First, you could try to enable "set debug frame 1" before backtracing,
> It will show information about each frame unwind, in between each frame.
> In particular, you should see the reason why unwinding the last shown
> frame didn't yield any more frame.
Thanks, I did that, but how do I tell what is the reason for not
showing more frames? This setting spews gobs of information, and I
don't know what should I look for.
> > Thread 1 hit Breakpoint 3, Fskip_chars_backward (
> > string=XIL(0x80000000068bc060), lim=XIL(0)) at syntax.c:1610
> > 1610 return skip_chars (0, string, lim, 1);
> > (gdb) bt
> > #0 Fskip_chars_backward (string=XIL(0x80000000068bc060), lim=XIL(0))
> > at syntax.c:1610
> > #1 0x09977f08 in ?? ()
> > #2 0x01260359 in Ffuncall (nargs=1, args=0x828880) at eval.c:3009
> > #3 0x099685bb in ?? ()
> > #4 0x00000000 in ?? ()
> >
>
> >From these backtraces, what I notice is that you have debug info for the
> code written in C, such as Ffuncall: we see the argument values.
Yes. Emacs is compiled with -gdwarf-4 (and if you are wondering about
those XIL(..) things, you will find a custom Python printer in
src/.gdbinit in the Emacs sources).
> But the code coming from the JIT (in eln files) doesn't appear to have
> debug info: we don't see any argument values. Perhaps that's expected
> for JIT code, I don't know.
Yes, currently the native-compiled code doesn't have any debug info.
I'm thinking of perhaps changing that.
> Once you know which unwinder is selected for each frame, you can try to
> find starting at which unwind things went wrong and focus on that one.
>
> And if this is indeed what is happening to you (the heuristic unwinder
> gets things wrong), I see two choices:
>
> - make the JIT producer generate DWARF info for the JIT-ed code, which
> will make GDB use the DWARF-based unwinder
> - improve the heuristic-based unwinder
Let me know if you'd like to see the info emitted by "debug frame 1".
prev parent reply other threads:[~2021-03-25 10:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 13:24 Eli Zaretskii
2021-03-24 20:05 ` Eli Zaretskii
2021-03-24 22:48 ` Simon Marchi
2021-03-25 3:47 ` Simon Marchi
2021-03-25 10:09 ` Eli Zaretskii
2021-03-25 14:19 ` Simon Marchi
2021-03-26 7:19 ` Eli Zaretskii
2021-03-29 8:03 ` Eli Zaretskii
2021-03-29 14:33 ` Simon Marchi
2021-03-29 14:57 ` Eli Zaretskii
2021-03-29 15:32 ` Simon Marchi
2021-03-29 15:37 ` Eli Zaretskii
2021-03-29 15:39 ` Simon Marchi
2021-03-29 16:55 ` Eli Zaretskii
2021-03-29 17:13 ` Simon Marchi
2021-04-06 15:18 ` Eli Zaretskii
2021-03-25 10:04 ` Eli Zaretskii [this message]
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=831rc3k0r6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.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.
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).