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

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:

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.


posted @ 2010-08-14 22:17  Justin  阅读(895)  评论(0编辑  收藏  举报