Patch for 96948

Martin Storsjö martin@martin.st
Tue Sep 8 15:34:00 GMT 2020


Hi,

On Tue, 8 Sep 2020, Kirill Müller wrote:

> Thanks for the heads up. The coincidence is funny -- a file 
> that hasn't been touched for years.

I think we both may originally be triggered from the same guy asking 
around in different places about implementations of _Unwind_Backtrace for 
windows, actually.

> I do believe that we need the logic around the `first` flag 
> for consistency with the other unwind-*.c implementations.

Yes, if you store ms_context.Rip/Rsp before the RtlVirtualUnwind step - 
but my patch stores them afterwards; after RtlVirtualUnwind, before 
calling the callback.

The result should be the same, except if using the first flag approach, I 
believe you're missing the last frame that is printed if using my patch.

// Martin


More information about the Gcc-patches mailing list