Windbg dot net_clr2

970 views
936 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
970
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Windbg dot net_clr2

  1. 1. Debugging DotNet app with Windbg + SOS Winson
  2. 2. Why? <ul><li>Crash dump analysis </li></ul><ul><li>CLR internal </li></ul><ul><ul><li>Pre-requirement: download & installing WinDbg from MSDN </li></ul></ul>
  3. 4. http://msdn.microsoft.com/en-us/magazine/cc163791.aspx
  4. 5. <ul><li>C:Program FilesDebugging Tools for Windows (x86) </li></ul><ul><li>C:WindowsMicrosoft.NETFrameworkv2.0.50727 </li></ul><ul><ul><li>mscordacwks.dll mscorwks.dll SOS.dll </li></ul></ul>
  5. 6. <ul><li>Sample app </li></ul>
  6. 7. srv*c:symbols*http://msdl.microsoft.com/download/symbols
  7. 8. Start running target app <ul><li>The code has console.readkey(), so could keep in memory </li></ul><ul><li>Using “start without debugging” </li></ul>
  8. 9. Using “Attach to running process” <ul><li>Don’t know why I can’t use “open executable…”. In my testing only “attach..” could load sos. </li></ul>
  9. 10. Using command “.load sos”
  10. 11. !sos.help !help funcname
  11. 12. !dumpheap
  12. 13. !dumpheap –type Program
  13. 14. !dumpobj 01359be0
  14. 15. Video <ul><li>http://channel9.msdn.com/blogs/egibson/msdn-simulcast-techniques-in-advanced-net-debugging-with-john-robbins-part-1-of-3 </li></ul>
  15. 16. Links <ul><li>http://blogs.msdn.com/b/tess/ </li></ul><ul><li>http://www.codeproject.com/KB/cs/net_type_internals.aspx </li></ul><ul><li>http://blogs.msdn.com/b/dougste/archive/2008/08/08/a-big-list-of-debugging-resources.aspx </li></ul><ul><li>http ://www.microsoft.com/download/en/details.aspx?id=21255 Psscor Managed-Code Debugging Extension for WinDbg </li></ul><ul><li>http ://blogs.msdn.com/b/tess/archive/2010/03/01/new-commands-in-sos-for-net-4-0-part-1.aspx </li></ul><ul><li>http://blogs.msdn.com/b/tom/ </li></ul>

×