wolf2009 / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

StackwalkerX86 could recover more register values from Windows program strings #466

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
While debugging another issue, we found that binaries built with whole-program 
optimization (and possibly only with Visual C++ 2010) contain extra register 
recovery information in the program strings. These appear to be *caller*-save 
registers, which the linker is able to provide because of global knowledge of 
all callers of a function. For example, if function A calls function B, and 
pushes $eax and $edx on the stack as parameters, and A is the only caller of B, 
then the unwind info may provide rules to recover the values of $eax and $edx 
from the stack, despite them not being explicitly saved by B.

The registers aren't specified by their actual names, but by numeric values. I 
believe the numbering comes from this enumeration:
http://msdn.microsoft.com/en-us/library/a0fcdkb9%28v=vs.90%29.aspx

Original issue reported on code.google.com by ted.mielczarek on 14 Feb 2012 at 4:09