3 ms·
I thought we'd been using /Oy (Frame-Pointer Omission) for years on Windows and that there was a pdata section on x64 that was used for stack-walking however to
by shaggie76 3y ago
I thought we'd been using /Oy (Frame-Pointer Omission) for years on Windows and that there was a pdata section on x64 that was used for stack-walking however to my great surprise I just read on MSDN that "In x64 compilers, /Oy and /Oy- are not available."
Does this mean Microsoft decided they weren't going to support breaking profilers and debuggers OR is there some magic in the pdata section that makes it work even if you omit the frame-pointer?
- Iwan-Zotow 3y agoMS had unwinding support done right for a LONG time, 32 and 64, starting with structured C exceptions
- MarkSweep 3y agoSome Google found this: https://devblogs.microsoft.com/oldnewthing/20130906-00/?p=3303 https://devblogs.microsoft.com/oldnewthing/20130906-00/?p=33... “Recovering a broken stack on x64 machines on Windows is trickier because the x64 uses unwind codes for stack walking rather than a frame pointer chain.” More details are here: https://learn.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-170 https://learn.microsoft.com/en-us/cpp/build/exception-handli...
- quotemstr 3y agoMicrosoft has had excellent universal unwinding support for decades now. I'm disappointed to see someone as prominent as this article's author present as infeasible what Microsoft has had working for so long.
- Iwan-Zotow 3y agoexactly! starting with C structured exceptions
- musjleman 3y ago> In x64 compilers The default is omission. If you have a Windows machine, in all likelihood almost no 64 bit code running on it has frame pointers. > OR is there some magic in the pdata section that makes it work even if you omit the frame-pointer You haven't ever needed frame pointers to unwind using ... unwind information. The same thing exists for linux as `.eh_frame` section.