Debugging with frame pointer optimization on
How does the debugger gets the stack information with FPO on? 开发者_如何学PythonI read somewhere that the .pdb files contain FPO information that debugger uses to get the stack info. So, what does the pdb file contain that help debugger to get the stack trace?
For example the debugger has hit a break point and it has ESP and pdb file. So, how does the debugger show me the call stack?
Stack info is stored in the .pdata section of the executable. see here: Prolog and Epilog and here: pdata section
So the debugger can lookup the location of the current code and determine the stack layout of the current function by looking up the unwind info in the .pdata section. Then it can determine the return address and repeat this process with the function returned to, and so on... creating a stack trace.
精彩评论