[Debug].NET Debugging and C++ Debugging Resources

來源:互聯網
上載者:User

The following is a summary of tools and resources that you might be interested in after taking the .NET Debugging and/or C++ Debugging courses we offer at Sela.

[Shameless plug: If you haven’t taken these courses yet, I strongly suggest that you check them out. Between the two of them they have more than 20 hands-on debugging exercises which basically guarantee that you’re going to come out a WinDbg expert and be able to analyze dumps, solve problems in production, pinpoint memory leaks, and so on.]

First of all, the tools you are going to need. This is also a list of what I ask system administrators to install when giving these courses in a disconnected environment:

  • Windows XP SP2 or later + symbols
  • Visual Studio 2008 or Visual Studio 2010
  • Visual C++ 2010 Redistributable (x86) + symbols
  • .NET Framework 3.5 SP1 + symbols
  • .NET Framework 4.0 + symbols
  • Debugging Tools for Windows 32-bit
  • Windows Support Tools
  • Windows Resource Kit Tools
  • Sysinternals Suite
  • CLR Profiler 2.0
  • Application Compatibility Toolkit 5.6
  • Application Verifier 32-bit
  • .NET Reflector
  • SOSEX Debugging Extension

Now the resources you might find handy. I organized these by exercise, so that for each exercise there is at least one reference you might find useful:

  1. Setting up symbols
    1. Configuring symbols in a connected environment (KB)
    2. Obtaining Windows symbol packages
    3. How to verify symbols with symchk
  2. Diagnosing a managed exception
    1. Configuring automatic crash dumps
    2. Using !PrintException and !CLRStack
  3. Managed deadlock with Monitors
    1. Using !SyncBlk and SOSEX’s !dlk
    2. Analyzing Monitor-based deadlocks on 64-bit
    3. Another way to tell the sync object your thread waits for
  4. Managed memory leak with static event
    1. Diagnosing a memory leak using SOS’s !DumpHeap, CLR Profiler, and Hawkeye
    2. Inspecting a managed heap with !DumpHeap
    3. Diagnosing a memory leak caused by event handlers
  5. Managed memory leak with finalizer
    1. Unblock my finalizer
    2. Don’t blindly count on a finalizer
  6. File access problem with Process Monitor
    1. .NET file access in Process Monitor
    2. The case of the slow logons (Process Monitor)
  7. Application compatibility fix
    1. Creating a registry redirection (VirtualRegistry)
    2. Version lie shims
    3. Using the CorrectFilePaths shim
  8. Diagnosing assembly loading with Fusion Log Viewer
    1. Using fuslogvw to diagnose binding issues
    2. Assembly private bin path pitfall
  9. Finalization race condition
    1. Finalizer vs. application
  10. Reader-writer lock deadlock
    1. Implementing a RWL using a semaphore
  11. COM and STA memory leak
    1. Find the STA thread to which we’re switching from SendReceive2
    2. Find the STA thread to which we’re switching from GetToSTA
    3. Inspecting the OXIDEntry structure in GetToSTA
  12. Comparing out-of-memory exceptions
    1. Memory display tool for virtual memory and GC heap
  13. Unmanaged memory leak with UMDH
    1. How to use umdh to find memory leaks
    2. GetProcessHeap and _get_heap_handle
  14. Unmanaged deadlock with critical sections
    1. Exploring the internals of critical sections
    2. Using !cs vs. !locks (with case studies)
  15. Unmanaged heap corruption with Application Verifier
    1. Exploring heap-based buffer overflows
    2. Using pageheap.exe (KB)
  16. Unmanaged stack corruption
    1. Common stack analysis commands
  17. File leak with Process Monitor and handle tracing
    1. See handle open call stacks
    2. The oh.exe tool
  18. Invalid handle problems with handle tracing
    1. Use !htrace to detect an invalid handle reference and when it was closed
    2. Handle Application Verifier stops
  19. C++ runtime checks
    1. /RTC compiler switch
  20. Multi-object deadlock with WCT and local kernel debugging
    1. Vista Wait Chain Traversal
    2. WCT debugging extension (also on CodePlex)
  21. Diagnosing a C++ exception
    1. Decoding the parameters of a thrown C++ exception
    2. Exception-related commands

Finally, there’s my three year old list of debugging tools that could also be considered useful.

原文地址:http://blogs.microsoft.co.il/blogs/sasha/archive/2010/08/10/net-debugging-and-c-debugging-resources.aspx

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.