"previous frame inner to this frame" error when unwinding fibers

Andrey Turkin andrey.turkin+gdbml@gmail.com
Fri Dec 8 17:50:19 GMT 2023


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


More information about the Gdb mailing list