[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,如需转载请自行联系原作者

相关文章
|
7月前
|
监控 应用服务中间件
idea debug模式启动Tomcat报错:Error running ‘tomcat8‘: java.net.SocketException “socket closed“
idea debug模式启动Tomcat报错:Error running ‘tomcat8‘: java.net.SocketException “socket closed“
234 0
|
C++
无法将“obj\Debug\net5.0\xxx.dll”复制到“bin\Debug\net5.0\xxx.dll”。超出了重试计数 10。失败。
无法将“obj\Debug\net5.0\xxx.dll”复制到“bin\Debug\net5.0\xxx.dll”。超出了重试计数 10。失败。
112 0
|
Rust 数据可视化 安全
【番外篇】Rust环境搭建+基础开发入门+Rust与.NET6、C++的基础运算性能比较
突然想打算把Rust作为将来自己主要的副编程语言。当然,主语言还是C#,毕竟.NET平台这么强大,写起来就是爽。缘起:之前打算一些新的产品或者新的要开发的东西,由于没有历史包袱,就想重新选型一下,在.NET平台(C#语言)、Golang、Rust里面进行选择一个。
304 0
【番外篇】Rust环境搭建+基础开发入门+Rust与.NET6、C++的基础运算性能比较
|
人工智能 Linux C++
Visual Studio 2022 正式版发布:升级为 64 位、支持 .NET 6 和 C++ 20
Visual Studio 2022 正式版发布:升级为 64 位、支持 .NET 6 和 C++ 20
486 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++动态链接库?非常简单!!!
|
移动开发 物联网 C++
【物联网智能网关-17】.NET Micro Framework之MDK C++二次开发
.NET Micro Framework虽然好学易用,但是在一些需要实时,需要高性能的应用领域,却有些勉为其难。
643 0
|
C# C++ 开发者
.NET Micro Framework动态调用C/C++底层代码(原理篇)
.NET Micro Framework和WinCE系统不同,从应用开发角度来说,仅支持C#开发(从V4.2版本开始,才支持VB.NET开发),而不像WinCE应用开发,既可以用C#/VB.Net,也可以用EVC等工具进行C/C++开发。
960 0
|
C++ 移动开发
【物联网智能网关-17】.NET Micro Framework之MDK C++二次开发
.NET Micro Framework虽然好学易用,但是在一些需要实时,需要高性能的应用领域,却有些勉为其难。毕竟.NET Micro Framework上层应用程序由底层CLR(TinyCLR)解释执行,执行效率被打个折扣是在所难免的。
769 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进行数据更新时,将发生如下异常信息,而且几乎必现。
1400 0

热门文章

最新文章