[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.

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


本文转自Justin博客园博客,原文链接:http://www.cnblogs.com/justinw/archive/2010/08/14/1799783.html,如需转载请自行联系原作者

相关文章
|
Rust 数据可视化 安全
【番外篇】Rust环境搭建+基础开发入门+Rust与.NET6、C++的基础运算性能比较
突然想打算把Rust作为将来自己主要的副编程语言。当然,主语言还是C#,毕竟.NET平台这么强大,写起来就是爽。缘起:之前打算一些新的产品或者新的要开发的东西,由于没有历史包袱,就想重新选型一下,在.NET平台(C#语言)、Golang、Rust里面进行选择一个。
241 0
【番外篇】Rust环境搭建+基础开发入门+Rust与.NET6、C++的基础运算性能比较
|
人工智能 Linux C++
Visual Studio 2022 正式版发布:升级为 64 位、支持 .NET 6 和 C++ 20
Visual Studio 2022 正式版发布:升级为 64 位、支持 .NET 6 和 C++ 20
356 0
Visual Studio 2022 正式版发布:升级为 64 位、支持 .NET 6 和 C++ 20
|
SQL 架构师 Java
C#&.net系列之——C#如何动态加载调用C++动态链接库?非常简单!!!
今天介绍动态调用的方法。很多时候,Dll库的目录可能是变化的,或是有些场景,需要根据具体的情况,来动态加载这些Dll库。这样使用静态调用的方式就很不方便,C#中我们经常通过配置动态的调用托管Dll,那么是不是也可以这样动态调用C++动态链接呢? 只要通过LoadLibrary, GetProcess, FreeLibrary这几个函数是可以动态调用动态链接的(它们包含在kernel32.dll中)。
C#&.net系列之——C#如何动态加载调用C++动态链接库?非常简单!!!
|
JavaScript NoSQL C++
一起谈.NET技术,VS2010 C++下编译调试MongoDB源码
  考虑到mongodb使用了boost库源码,参考mongodb官方文档后,下载编译boost版本是1.42(时间为2010-2-2)或更新版本:  boost版本1.42:  http://sourceforge.net/projects/boost/files/boost/1.42.0/boost_1_42_0.zip/download         下载boost源码之后,我把boost解压在D盘。
1118 0
|
人工智能 C# C++
2019年3月TIOBE编程语言排名: Python和Visual Basic .NET、c++引领增长
本月TIOBE指数几乎没有任何有趣的变化。我们不得不使用我们的放大镜来发现一些新闻,即Powershell进入了TIOBE索引前50名.Powershell脚本语言已经超过12年了,它已经进入前50名。
|
C# C++
.NET 调用c++库注意事项
原文:.NET 调用c++库注意事项 很久没有更新了,主要还是因为自己懒吧,希望从今天开始坚持至少一周写一篇文章。   调用函数库是正常的,调用完成后,在使用EF进行数据更新时,将发生如下异常信息,而且几乎必现。
1350 0