windbg

WinDbg常用命令系列---!handle

血红的双手。 提交于 2019-12-05 09:03:24
!handle 简介 !handle扩展显示有关目标系统中一个或所有进程拥有的一个或多个句柄的信息。 使用形式 用户模式 !handle [ Handle [ UMFlags [ TypeName ]]] !handle -? 内核模式 !handle [ Handle [ KMFlags [ Process [ TypeName ]]]] 参数 Handle 指定要显示的句柄的索引。如果Handle为-1或省略此参数,调试器将显示与当前进程关联的所有句柄的数据。如果句柄为0,调试器将显示所有句柄的数据。 UMFlags (仅限用户模式)指定显示内容。此参数可以是以下任何位值的总和。(默认值为0x1。)| 位 0 (0x1) 显示句柄类型信息。 位 1 (0x2) 显示基本句柄信息。 位 2 (0x4) 显示句柄名称信息。 位 3 (0x8) 显示特定于对象的句柄信息 (如果可用)。 KMFlags (仅限内核模式)指定显示内容。此参数可以是以下任何位值的总和。(默认值为0x3。) 位 0 (0x1) 显示基本句柄信息。 位 1 (0x2) 显示有关对象的信息。 位 2 (0x4) 显示可用的句柄项。 如果未设置此位并且省略了 句柄 或将其设置为零, 则显示的句柄列表不包含可用的句柄。 如果 handle 指定单个自由句柄, 则即使未设置此位, 也会显示该句柄。 位 4 (0x10

WinDbg常用命令系列---!dlls

微笑、不失礼 提交于 2019-12-05 09:01:29
!dlls 简介 !dlls扩展显示所有加载模块或指定线程或进程正在使用的所有模块的表条目。 使用形式 !dlls [Options][LoaderEntryAddress] !dlls -h 参数 Options 指定输出的级别。 此参数可以是下列值中的任意组合: -f 显示文件标头。 -s 显示部分标头。 -a 显示完成模块信息。 (此选项相当于-f-s。) -c **** ModuleAddress 显示包含的模块 ModuleAddress 。 -i 对显示的初始化顺序进行排序。 -l 对显示按加载顺序进行排序。 默认值为这种情况。 -m 对显示的内存顺序进行排序。 -v 显示版本信息。 此信息将由每个模块的资源部分。 -h 显示此扩展中的一些帮助文本调试器命令窗口。 LoaderEntryAddress 指定模块的加载程序条目的地址。 如果包括此参数时,调试器将显示仅此特定模块。 支持环境 Windows 2000 Kdextx86.dll Ntsdexts.dll Windows XP 及更高版本 Exts.dll 备注 模块列表包括每个模块的所有入口点。!dlls扩展仅在实时调试中工作(不在崩溃转储分析中)。在内核模式下,此扩展显示当前进程上下文的模块。你不能使用!dlls与系统进程或空闲进程一起。 来源: https://www.cnblogs.com/yilang

WinDbg常用命令系列---.load, .loadby (Load Extension DLL)

*爱你&永不变心* 提交于 2019-12-05 08:42:09
.load, .loadby (Load Extension DLL) 简介 .load和.loadby命令将新的扩展DLL加载到调试器中。 使用形式 .load DLLName ! DLLName .load .loadby DLLName ModuleName 参数 DLLName 指定要加载的调试器扩展DLL。如果使用.load命令,DLLName应包含完整路径。如果使用.loadby命令,DLLName应仅包含文件名。 ModuleName 指定与DLL name指定的扩展DLL位于同一目录中的模块的模块名。 支持环境 模式 用户模式下,内核模式 目标 实时、 崩溃转储 平台 全部 备注 使用.load命令时,必须指定完整路径。 使用.loadby命令时,不指定路径。相反,调试器会找到ModuleName参数指定的模块,确定该模块的路径,然后在调试器加载扩展DLL时使用该路径。如果调试器找不到模块或找不到扩展DLL,则会收到指定问题的错误消息。指定的模块和扩展DLL之间不必有任何关系。因此,使用.loadby命令只是避免键入长路径的一种方法。 在.load或.loadby命令完成后,您可以访问存储在加载的扩展名中的命令。 要加载扩展DLL,可以执行以下操作之一: 使用 .load 或 .loadby 命令。 通过发出完整执行扩展 ! DLLName .

WinDbg cannot find symbols for ntdll on MS symbol server

冷暖自知 提交于 2019-12-05 08:34:04
问题 I'm trying to debug executable notepad.exe (from Windows 10 distribution), and symbols ntdll.pdb from Microsoft symbols server are required, but debugger returns an error that they cannot find file specified: 0:000> .reload Reloading current modules ................................. SYMSRV: BYINDEX: 0x25 http://msdl.microsoft.com/download/symbols ntdll.pdb BC08E2B7EBB349A18DCE18BE9AA6660E1 SYMSRV: HTTPGET: /download/symbols/ntdll.pdb/BC08E2B7EBB349A18DCE18BE9AA6660E1/ntdll.pdb SYMSRV:

Determining the COM object blocking finalizer

 ̄綄美尐妖づ 提交于 2019-12-05 07:52:42
We have a .NET background processing application (console app) that executes some arbitrary workloads (basically internal users supply .NET DLLs implementing "Execute" interface). Background processing application then loads the dll via reflection and executes it. One of the supplied DLLs apparently has a COM object in it which is not properly disposed (likely). As the processing time is quite long, AND we have COM objects created on the main thread and not disposed properly, this causes a Finalizer Thread to be blocked, which subsequently causes the process to accumulate a significant amount

Determine line number of InnerException from minidump using WinDbg

こ雲淡風輕ζ 提交于 2019-12-05 07:18:04
I'm trying to track down a NullReferenceException from a dump. The NullReferenceException is not the crashing exception, rather the crashing exception is a TargetInvocationException with an InnerException which is the NullReferenceException. I'm using Windbg with SOS, I use the the command analyze -v and this gives me the call stack of the NullReferenceException: EXCEPTION_OBJECT: !pe f6cb150 Exception object: 000000000f6cb150 Exception type: System.NullReferenceException Message: Object reference not set to an instance of an object. InnerException: <none> StackTrace (generated): SP IP

What does WARNING: [something] overlaps [something] in Windows Debugger mean?

末鹿安然 提交于 2019-12-05 06:33:32
I am editing the Windows Research Kernel (WRK) for part of a uni project, and occasionally when I start up the virtual machine running my kernel, the Windows Debugger says things like: WARNING: rdpdr overlaps raspptp_baa74000 WARNING: ks overlaps rdpdr_baa26000 WARNING: ks overlaps raspptp_baa74000 WARNING: update_baa11000 overlaps ks_ba9fe000 WARNING: update_baa11000 overlaps rdpdr_baa26000 WARNING: tcpip overlaps tcpip_ba83e000 What does this actually mean? This usually happens when the kernel debugger misses events (such as shutdown or module unload). The warning means that the debugger

Is my heap fragmented

谁说胖子不能爱 提交于 2019-12-05 04:01:48
0:000> !dumpheap -stat total 1755874 objects Statistics: MT Count TotalSize Class Name 7b9b0c64 1 12 System.Windows.Forms.Layout.TableLayout+ColumnSpanComparer .... 7933303c 14006 4926456 System.Collections.Hashtable+bucket[] 65246e00 804 4982192 System.Data.RBTree`1+Node[[System.Int32, mscorlib]][] 054c55f0 44240 5662720 DevExpress.Utils.AppearanceObject 793040bc 98823 7613156 System.Object[] 793308ec 293700 55820016 System.String 002435f0 50315 138631888 Free Total 1755874 objects Fragmented blocks larger than 0.5 MB: Addr Size Followed by 15a195c8 0.8MB 15ae3950 System.Collections.ArrayList

How to know if a different exception is hidden behind a 80000003 breakpoint (WER dialog)

一世执手 提交于 2019-12-05 02:57:44
问题 My application, an executable, is crashing on a remote machine. I don't have access to that machine, so I requested a dump, generated through Task Manager. Using WinDbg, on executing the command !analyze -v , I can see the following text among many others EXCEPTION_RECORD: (.exr -1) ExceptionAddress: 0000000000000000 ExceptionCode: 80000003 (Break instruction exception) ExceptionFlags: 00000000 NumberParameters: 0 How can I know if it is responsible for the crash? If it is not, how do I

detecting deadlock in a hung C# application using windbg

别来无恙 提交于 2019-12-05 02:12:27
问题 My multithreaded app in C# 2.0 using threadpool hangs every few weeks or so in prod. I did a syncblk !syncblk Index SyncBlock MonitorHeld Recursion Owning Thread Info SyncBlock Owner 201 05b9493c 979 1 05bc1040 bcc 45 022f3490 System.Collections.ArrayList 2875 05b4c914 1 1 17b99e10 1af8 290 024862d8 MyProg.MyChildClass 3045 05b4dbec 1 1 17ca7e98 1990 664 02392120 MyProg.MyChildClass 3046 05b4dc1c 1 1 17ca8668 1038 666 02394b00 MyProg.MyChildClass 3194 05b4f80c 3 1 05b5b638 1594 31 02537b88