[PATCH] Teach gdb how to unwind cygwin _sigbe frames

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Feb 24 03:50:00 GMT 2015

On Feb 23 18:15, Jon TURNEY wrote:
> I really wanted to do this by adding some DWARF CFI to the generated sigfe.s
> file, but there doesn't seem to currently be a way to correctly describe
> _sigbe's frame using that.

I was wondering about this already.  It seems weird if the CFI stuff
doesn't allow for a situation like that.

> So instead, write a custom unwinder for _sigbe frames, which gets the return
> address from the sigstack.
> Implemented for i386 and amd64.

Cool.  Really.  But, shouldn't that go to the gdb-patches mailing list?

> 4. This unfortunately ends up hardcoding into gdb the offset of sigstackptr in
> the cygwin TLS area from the top of stack, and so will break if that changes.
> Hopefully that doesn't happen to often.

It happens too often to be ignored.  Wouldn't it make sense to add
a cygwin_internal call to return tls offsets or addresses, the later
if the argument is a pointer to the stack or cygtls area?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150224/9b814d3d/attachment.sig>

More information about the Cygwin mailing list