public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Andrey Turkin <andrey.turkin+gdbml@gmail.com>
To: gdb@sourceware.org
Subject: "previous frame inner to this frame" error when unwinding fibers
Date: Fri, 8 Dec 2023 20:50:19 +0300	[thread overview]
Message-ID: <CAA7-Zor4XNXq8c-BY0r89gMNrk4ys=-Ota2=-FKh-61pHQdeVw@mail.gmail.com> (raw)

Hi all,

I'm trying to write a custom unwinder in Python to unwind through
boost coroutine (so, follow coroutine stack with its caller's stack).
It generally works pretty well except for occasional errors about the
inner frame. Obviously, coroutine switches stack so comparing frame
pointers makes no sense; so, when caller stack happens to be allocated
above coroutine's, the bogus error occurs.
I can see in gdb sources that it knows about gcc's split-stacks and
apparently arch-specific frames, however I found no way for the
unwinder to do anything about it. Is there any way to fix this error
with the current gdb, or do I need to patch the sources?

Thanks,
  Andrey Turkin

             reply	other threads:[~2023-12-08 17:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 17:50 Andrey Turkin [this message]
2023-12-10 22:30 ` Tom Tromey
2023-12-11  7:44   ` Andrey Turkin
2023-12-11 17:46     ` Tom Tromey
2023-12-20 14:18       ` Andrey Turkin
2023-12-22  0:30         ` Tom Tromey
2023-12-22 19:19           ` Tom Tromey
2024-01-04 10:00             ` Andrey Turkin
2024-01-21 16:57               ` Tom Tromey

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='CAA7-Zor4XNXq8c-BY0r89gMNrk4ys=-Ota2=-FKh-61pHQdeVw@mail.gmail.com' \
    --to=andrey.turkin+gdbml@gmail.com \
    --cc=gdb@sourceware.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.
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).