!clrstack -p not giving the values of the parameters for the methods in the call stack

▼魔方 西西 提交于 2019-12-12 08:28:00

问题


We are trying to analyze a w3wp memory dump using windbg and we found that w3wp process is crashing due to stack overflow. I loaded the psscor4.dll and got the call stack by issuing !clrstack. But I also want to know the paramaters being passed to the methods. If I issue "!clrstack -p" or "!clrstack -a", we are getting <no data> for all the Parameters and local variables. Any idea, why we are getting <no data> instead of actual values for the Parameters and local variables ?


回答1:


If you're running a release build you will usually not be able to track locals and parameters as they are optimized and store in registers. If you really need it, you can look at the JIT compiled code and locate the values in the registers but that may require a lot of book keeping.




回答2:


Such are the joys of debugging optimized code. If you use !sosex.mdv, you'll at least get the datatypes of your locals/args. Then you can run !sos.dso or !sosex.mdso to see the objects on the stack with their types. It's usually not terribly difficult to track down the arguments this way, though it does not always work.



来源:https://stackoverflow.com/questions/10518588/clrstack-p-not-giving-the-values-of-the-parameters-for-the-methods-in-the-call

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!