title: Any way to force local variables to the stack in 64bit VC application
body: <p>When a 64 bit VC 2005 application is compiled with optimization turned on, it is not possible to see all local variables in a crash dump file. In many cases, the local variables or parameters are stored in registers instead of on the stack. Subsequent calls to other functions, such as error handling functions, will sometimes overwrite those values. This makes it difficult to trace the cause of the problem. Is there a way to force local variables and/or parameters to the stack at run time? </p>
  
  <p>Turning off the optimization is one way but that makes application slow, and it is generally not a good idea for the release build. I am hoping that there is a run time call that will dump all local variables and/or registry somewhere. If there is such function, we can then call the function before calling the error logging function and will hopefully be able to see more local variable on the stack.</p>
  
  <p>--
  Alex</p>