Retail code debugging

$vframe tells you the 'virtual frame pointer'. This is the memory address where you can find the stack frame. If the function has a true stack frame, memory will be layed out like the below table. $vframe is extremely helpful when retail debugging because it tells you where about on the stack to look for your local variables.

http://blogs.msdn.com/greggm/archive/2004/12/15/315673.aspx
 


The 32-bit x86 calling conventions

http://blogs.msdn.com/oldnewthing/archive/2004/01/08/48616.aspx


The following example shows the results of making a function call using various calling conventions. This example is based on the following function skeleton.

void MyFunc(char c, short s, int i, double f)
MyFunc ('x', 12, 8192, 2.7183);
http://msdn.microsoft.com/en-us/library/aa235596%28VS.60%29.aspx
 


Nice callstack frame.
http://blogs.msdn.com/oldnewthing/archive/2004/01/16/59415.aspx

0 komentarze:

Prześlij komentarz

 
Tomasz Kulig