Debugging .net using SOS

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:34:19

问题


I have created a dump using clrdump. When I go to view it using sos, I load up sos and then run !dso, but the error I get is:

PDB symbol for mscorwks.dll not loaded

However, in the module window it says that the symbol is loaded. I have obtained the up to date symbols from the MS store?

Anybody any ideas?

Thanks,

Darren.


回答1:


You don't really need symbols for mscorwks.dll for !dso to work correctly, but here's some advice on how to get the symbols.

First thing you need to do is to verify that you did set the symbol path? You can view the current setting for the symbol path using the .sympath command. You can either download all the symbols and point the symbol path to the location on the disc, or just use the online symbol server. In either case the symbol path must point to the correct location.

You can use the .symfix command to point to Microsoft's public symbol server, which is probably the easiest way to get symbols (provided you have online access).

Use the lm command to see modules and their symbols. If it says pdb symbols next to a module everything is okay. Keep in mind that WinDbg will only load symbols as needed, so for a lot of modules you will probably see deferred. You can force loading symbols for all modules using the .reload /f command.

To troubleshoot loading of symbols use the !sym noisy command. It will tell you where the debugger is trying to locate the PDB files.




回答2:


!sym noisy    
.symfix
.reload -f


来源:https://stackoverflow.com/questions/4244670/debugging-net-using-sos

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