Re: "previous frame inner to this frame" error when unwinding fibers
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Andrey" == Andrey Turkin via Gdb <[email protected]> writes: Andrey> I'm trying to write a custom unwinder in Python to unwind through Andrey> boost coroutine (so, follow coroutine stack with its caller's stack). Andrey> It generally works pretty well except for occasional errors about the Andrey> inner frame. Obviously, coroutine switches stack so comparing frame Andrey> pointers makes no sense; so, when caller stack happens to be allocated Andrey> above coroutine's, the bogus error occurs. Andrey> I can see in gdb sources that it knows about gcc's split-stacks and Andrey> apparently arch-specific frames, however I found no way for the Andrey> unwinder to do anything about it. Is there any way to fix this error Andrey> with the current gdb, or do I need to patch the sources? You'll need to patch gdb. The current code for handling this sort of thing is totally ad hoc and can't be tweaked by the user or from Python. Letting Python unwinders affect this seems like a nice feature. Like maybe a method on gdb.UnwindInfo that sets a flag, then pipe this through to the check in get_prev_frame_always_1. Maybe some other way is better, I don't know. I'm definitely open to ideas and I think this is worth solving -- I feel it's been asked for before. Tom