存档

帖子标记'SOS救援中心“

Silverlight的调试WinDbg和SOS

12月19日,2008 没有评论

简介

在以前的帖子Silverlight与Visual Studio调试中,我演示了Visual Studio是一个强大和最方便的的工具,调试托管应用程序。 但对于一些先进的调试方案,如内存泄漏,死锁,失控的进程/线程,内核调试,以及先进的远程/崩溃/ UI调试等WinDbg中,(或CDB,NTSD,KD)通常是首选,如果不是唯一的选择。

Windows调试工具

概述

WinDbg为Windows调试工具包的一部分:

image_thumb5

即使WinDbg是一个GUI程序,它主要是用来作为一个像(常与)KD,CDB和NTSD命令行调试器,并共享相同的调试引擎和命令。 这是超级强大的和可扩展性,特别适合司机和其他操作系统组件的系统/像低级别的调试。 它需要良好的硬件知识,操作系统和编译器得到最有效的工具集。 这是一个伟大的(或完美的,我应该说 :-) 本机调试,其广泛的和可扩展的命令和图形用户界面。 托管调试支持是通过SOS调试扩展,几乎没有本机调试好,但有巨大的价值,能够跨管理和本地的边界,并为Silverlight集成调试,这是我所知道的唯一工具可以加载SOS和集成调试。

命令

WinDbg中/ CDB / NTSD / KD已经很长一段时间,所以他们非常有据可查。 强烈建议您调试Windows工具阅读microsoft.comMSDN 在这里我只给出一个简要介绍它的命令,给你的感觉和快速参考。 所有的命令(通过运行时间帮助|?。帮助|帮助[<cmd>]作为下面讨论),所以概述通常足以让你开始。

WinDbg中有三个命令:

标准命令

主要是:

  • B *命令设置/清除/列表/启用/禁用断点上的地址或访问
  • D ·命令检查内存(堆栈/堆,本地/全局变量和参数),E ·命令修改内存,和S​​ *搜索记忆
  • K ·命令检查调用栈
  • P,T,G *命令执行控制

下面呢? 命令的输出是一个伟大的概述和使用WinDbg / CDB / NTSD / KD的人经常提到:

0:006>?

完整的调试器文档打开 debugger.chm

B [C | D | E] [<bps>] -清除/禁用/启用断点(S)
BL -列出断点
广管局<access> <SIZE> <addr> -设置处理器断点
BP <ADDRESS> -设置软断点
D [类型] [<range>] -转储内存
DT [- N | Y] [MOD]] [- N | Y]领域]
[地址] [- l列出] [- A [] |彗星|我| Ø | ř [#] | V] -转储使用的类型信息
DV [<名称>] -转储本地变量
Ë [类型] <ADDRESS> [<values>] -进入内存值
摹[H | N] [= <ADDRESS> [<ADDRESS> ...]] -去
K <count> -堆栈跟踪
KP <count> -源参数的堆栈跟踪
LM [K |升| ü | V] -列表模块
号法律公告<expr> -列出最近的符号
P [= <addr>] [<VALUE>] -步过
Q -退出
ř [[<reg> [= <expr>]] -查看或设置寄存器
S [<opts>] <range> <values> -搜索记忆
SX [{E | D |我| N} [- C“CMD1”] [- C2“CMD2”] [- H] {异常|事件| *}] -事件过滤器
T [= <ADDRESS>] [<expr>] -跟踪到
ü [<range>] -装卸
版本-显示调试者和调试版本
X [<* |模块>!]<*|符号> -查看符号
<expr> -显示表达
<expr> -显示C + +表达式
<<文件名​​> -从命令文件输入

回车...

<expr>一元的老年退休金计划:+ -而不是由禾DWO qwo POI您好低
二进制老年退休金计划:+ - * / MOD(%)和(&)XOR(^)或(|)
比较:==(=)<> =
操作数:在当前基数公共符号,<reg>
<TYPE>:B(字节),W(字),D [S](双字[符号]),
(ASCII),C(DWORD和char),U(UNICODE),L(名单)
F(浮),D组(双),S | S(ASCII / Unicode字符串)
Q(四字)
<pattern>:[(NT | <dll-name>)!] <var-name>(<var-name>可以包括和*?)
<range>:<ADDRESS> <ADDRESS>
:<ADDRESS>大号<count>

用户模式的选择:
〜 -列表线程的状态
〜#S -设置默认线程
| -名单进程中的地位
|#S -默认设置过程

x86的选项:
DG <selector> -转储选择
<reg>:[E] AX,[E] BX,[E] CX,[E] DX,[E] SI,[E]二,[E] BP,[E] SP,[E] IP [ E] FL,
人啊,BL,BH,CL,CH,DL,DH,CS,DS,ES,FS,GS,SS
DR0,DR1,DR2,DR3,DR6,DR7
fpcw,fpsw,fptw,ST0 - ST7,MM0 - MM7
XMM0 - XMM7
<flag>:IOPL,DF,IF,TF,SF,ZF,AF,PF,CF
<addr>:#<16位保护模式[赛格:]地址,
&<V86-mode [seg:]address>

完整的调试器文档打开 debugger.chm

元命令

这些点开始,主要用于高级调试。 你应该知道的一些重要的命令:

  • 使用符号服务器。symfix。SYMPATH
  • 使用源服务器。srcfix。srcpath
  • 负载。loadby卸载。链。setdll调试扩展管理
  • 服务器,远程调试远程

这是非常值得您的时间得到熟悉的符号服务器,源服务器和远程调试:他们会让你的生活有更多更容易。 下面是帮助命令的输出。

0:006>帮助
命令:
放弃-放弃当前进程
。allow_exec_cmds [0 | 1] -控制执行命令
allow_image_mapping [0 | 1] -控制需求的图像文件映射
apply_dbp [<选项>] -添加当前数据断点状态到
寄存器上下文
ASM [<选项>] -设置拆卸选项
。ASM - [<选项>] -明确拆卸选项
重视<proc> -附加在下次执行<proc>
块{<命令>} -括号嵌套执行的命令集
bpsync [0 | 1] -多线程debuggees特殊的断点的行为
。突破-打破封闭循环
。breakin -打入第纳尔
缓存[<选项>] -虚拟内存高速缓存控制
呼叫<Fn>键(<arg1>,<arg2>,... ...) -运行在调试的功能
。赶上{<命令>} -捕捉命令失败
目前扩展。链-列表
或关闭。childdbg <0 | 1> -开启子进程调试
客户-列表目前活跃客户
。closehandle [<选项>] [<handle>] -关闭给定的句柄
继续-继续封闭循环
copysym [<选项>] <PATH> -复制当前的符号文件到一个目录
创建<command line> -创建一个新进程
。createdir [<选项>] [<PATH>] -控制进程创建选项
CXR <ADDRESS> -弃置在指定地址的上下文记录
在此之后的k *给CXR
。dbgdbg -一个调试器附加到当前的调试
debug_sw_wow [0 | 1] -允许与软件WOW的仿真进行交互
分离-分离从当前进程/转储
dml_file文件-输出从文件的DML内容
dml_flow <Start>(开始)<addr> -显示基本块码流
dml_start [<选项>] -通航调试器活动概述
直到<cond>是零。做{<命令>}(<cond>) -执行<commands>
司机-此命令删除-使用“LM”或重载- L)。
转储[<选项>] <文件名​​> -创建一个主机系统上的转储文件
。dvalloc [<选项>] <bytes> -在调试的VirtualAlloc内存
dvfree [<选项>] <offset> <bytes> - VirtualFree内存在调试
。回声“<String>的”| <字符串>] -回声字符串
。echotime -输出调试时间
echotimestamps [0 | 1] -切换事件的时间戳输出
转储当前异常的上下文记录。ecxr -
effmach [<machine>] -改变目前的机器类型
。其他{<命令>} - IF / THEN / ELSE条件执行
。ELSIF(<cond>){<命令>} [<else clauses>] - IF / THEN / ELSE条件
执行
enable_long_status [0 | 1] -转储LONG类型的默认基
enable_unicode [0 | 1] -转储USHORT数组/指针和Unicode字符串
endsrv <ID> -禁用引擎服务器
endpsrv -导致退出当前会话的远程服务器
枚举可用的标签数据。enumtag -
。event_code -显示缓存事件的说明
。事件日志-显示最近发生的事件日志
。事件-显示并选择可用的事件
eventstr -显示任何事件调试注册的字符串
exepath [<DIR> [;...]] -设置可执行文件的搜索路径
。exepath + [<DIR> [;...]] -追加可执行文件的搜索路径
expr的-控制表达式计算器
exptr <ADDRESS> -做EXR和CXR为EXCEPTION_POINTERS
转储异常记录在指定的地址。EXR <ADDRESS> -
extmatch [<opts>] <pattern> -显示所有匹配模式的扩展
extpath <opts> [<DIR> [;...]] -集扩展的搜索路径
。extpath + <opts> [<DIR> [;...]] -追加扩展搜索路径
F + -设置当前栈帧当前帧的呼叫者
F - -设置当前栈帧当前帧被叫
<ADDRESS> -设置上下文。纤维纤维在地址
重置背景下,如果没有指定的地址
fiximports <pattern> -尝试链接的图像的进口
转储为给定的代码地址的函数入口。fnent <ADDRESS> -
fnret <fnaddr> [<retval>] -显示格式的返回
(<init>; <cond>; <step>){<命令>} -执行<commands>
<step>直到<cond>是

。force_radix_output [0 | 1] -转储默认的基本整数类型
[<选项>]。force_system_init -力待系统初始化如果可能的话
-强行让。force_tb分支跟踪
。FOREACH [OPTS](<别名> {<tcmds>}){<ecmds>} -执行<ecmds>为
每个令牌
输出的<tcmds>
FPO <选项> -控制覆盖FPO信息
当地人。帧[<FRAME>] -当前栈帧
格式<expr> -显示多种格式的表达式的结果。
[<选项>]。帮助-显示帮助
holdmem <选项> [范围] -持有和比较内存中的数据
如果(<cond>){<命令>} [<else clauses>] - IF / THEN / ELSE条件
执行
。ignore_missing_pages [0 | 1] -控制内核总结转储失踪
页面错误信息
imgscan <选项> - PE映像的内存扫描
jdinfo <jdi_addr> - AeDebug信息解释
kframes <count> -设置默认的堆栈跟踪深度。
杀死-杀死当前进程
lastevent -显示最后发生的事件
离开-退出封闭赶上。
行-切换线符号加载
负载<name> -在此扩展DLL添加扩展链
loadby <name>的<mod> -在模块中添加扩展DLL
目录扩展链
[<locale>]。语言环境-设置当前语言环境
。日志文件-显示登录状态
logopen [文件] -打开新的日志文件
。logappend [文件] -追加到日志文件
关闭日志文件。logclose -
。netsyms [0 | 1] -允许/禁止净符号路径
netuse [<选项>] -管理网络连接
。noshell -禁用shell命令
。noversion -禁用扩展的版本检查
ofilter <pattern> -对给定的模式输出过滤器调试
ocommand <prefix> -治疗与给定的前缀作为一个命令的输出。
。opendump文件-打开一个转储文件
在电流输出掩码位。outmask <mask> -
。outmask <mask> -明确在电流输出掩码位
PCMD [<选项>] -控制每prompt命令
。弹出[<选项>] -弹出状态
prefer_dml [0 | 1] -控制DML模式的默认
printf的“<格式>”,<args…> -格式化输出
[<ADDRESS>]。过程-设置隐含的过程
重置默认情况下,如果没有指定的地址
。prompt_allow [<选项>] -控制哪些信息可以显示
在提示符
。推[<选项>] -推动国家
quit_lock [<选项>] -锁会议对意外退出
readmem <FILE> <range> -从文件中读取原始内存
record_branches [0 | 1] -控制处理器的分支记录
。重装[<image.ext> [= <ADDRESS>,<SIZE>] -重载符号
重启-请求一个会话重新启动
远程<pipename> -启动REMOTE.EXE服务器
安全[0 | 1] -禁止操作主机的危险
send_file <选项> -将文件发送到远程服务器
服务器<选项> -启动引擎服务器
服务器-列出活跃的远程访问服务器
setdll <name> -在调试器会首先搜索这个DLL扩展
壳牌<COMMAND>] -执行shell命令
show_read_failures [<opts>] -控制额外的读取失败输出
show_sym_failures [<opts>] -控制额外的符号故障输出
睡眠<milliseconds> -调试器指定的时间睡觉
允许访问的一台机器,有用
打破了上一个NTSD - D
srcfix [<path extra>] -修复源的搜索路径
srcfix + [<path extra>] -附加固定源的搜索路径
srcnoisy [0 | 1] -控制详细的源加载输出
srcpath [<DIR> [;...]] -设置源搜索路径
。srcpath + [<DIR> [;...]] -追加源搜索路径
step_filter [<opts>] [“<pattern>; <pattern> ...]"] -设置符号图案
跳过时加强
symfix [<localsym>] -修正符号搜索路径
。symfix + [<localsym>] -附加固定的符号搜索路径
symopt <flags> -设置符号选项
。symopt + <flags> -设置符号选项
。symopt <flags> -明确的符号选项
SYMPATH [<DIR> [;...]] -设置符号搜索路径
。SYMPATH + [<DIR> [;...]] -追加符号搜索路径
线程[<ADDRESS>] -套在地址的线程上下文
重置默认的背景下,如果没有指定的地址
时间-显示会议的时间信息
ttime -显示线程的时间信息
。TLIST -列出正在运行的进程
typeopt <flags> -设置/清除类型选项
卸载<名称> -删除扩展DLL扩展DLL列表
unloadall -删除所有扩展DLL的扩展DLL的列表
。唤醒-唤醒sleep'ing调试器。
虽然(<cond>){<命令>} -执行<commands> <cond>非零
writemem <FILE> <range> -到一个文件中写入原始内存

使用“。HH <COMMAND>”在调试器目录或打开debugger.chm得到
命令的详细文档

扩展命令

那些开始,通常为一个特定的区域,如SOS扩展托管调试命令。 帮助列表扩展的命令!exts.help一样,您可以使用!<ext>。 对于先进的系统调试,比如检测内存泄漏,死锁等,你必须非常熟悉这些扩展命令。

SOS救援中心

概述

SOS是为儿子罢工(不要问我为什么),托管调试的调试扩展的缩写。 我相信这是CLR调试的CLR团队发明的,所以它已经很长一段时间,并有良好的信息在网络上。 一些推荐读物:

每个CLR版本都有其自己的SOS救援中心(NET框架3.5仍然使用CLR 2.0和Silverlight有其自己的CLR)。

目录C:\ PROGRAM FILES \ WINDOWS \ clr10调试工具
2007年9月19日七时01分,948784 sos.dll
1文件(S)948784字节

C目录:\ PROGRAM FILES \微软Silverlight \ 2.0.31005.0
2008年10月5日2点16分,上午495424 sos.dll
1文件(S)495424字节

C目录:\ WINDOWS \ Microsoft.NET \框架\ V1.1.4322
2004年7月15日上午12:35 319488 SOS.dll
1文件(S),319,488字节

目录C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727
2008年7月27日上午10:03 392184 SOS.dll
1文件(S)392184字节


命令

SOS运行时的帮助是如此之大,你几乎不需要任何其他DOC比其他一些尝试和错误的和有些无奈 :-)

0:016>!帮助
---------------------------
SOS调试器扩展DLL,旨在帮助在调试管理
方案。 功能,然后大致按顺序列出按类别
的重要性。 常用功能的快捷方式名称列在括号中
键入“!”对这个函数的详细信息,帮助<functionname>。

对象检查检查代码和堆栈
---------- ----------
DumpObj(做)主题
DumpArray(DA)CLRStack
DumpStackObjects(DSO)IP2MD
dumpheap命令ü
DumpVC DumpStack
为gcroot EEStack
ObjSize GCInfo
FinalizeQueue EHInfo
PrintException(PE)COMState
TraverseHeap BPMD

CLR数据结构检查诊断实用程序
---------- ----------
DumpDomain VerifyHeap
EEHeap VerifyObj
Name2EE FindRoots
SyncBlk HeapStat
DumpMT GCWhere
DumpClass ListNearObj(LNO)
DumpMD GCHandles
Token2EE GCHandleLeaks
EEVersion FinalizeQueue(FQ)
DumpModule FindAppDomain
ThreadPool的SaveModule
DumpAssembly ProcInfo
DumpSigElem StopOnException(SOE)
DumpRuntimeTypes DumpLog
DumpSig VMMap
RCWCleanupList VMSTAT
DumpIL MinidumpMode
AnalyzeOOM(AO)

其他检查GC的历史
---------- ----------
HistInit常见问题
HistStats
HistRoot
HistObj
HistObjFind
HistClear

调试示范样本

我会用相同的简单的Silverlight应用程序在以前的帖子( Silverlight与Visual Studio调试 )展示的WinDbg调试与SOS:

image_thumb

这里是我的注释的调试日志(/ /开始):

/ /设置符号路径使用符号服务器
0:013>。SYMPATH
符号搜索路径是:<空>
0:013> symfix C:\用户\ ningz \数据\ \ TEMP \符号
0:013>。SYMPATH
符号搜索路径是:SRV * C:\用户\ ningz \数据\ \ TEMP \符号\ * \符号\符号

/ /添加正在调试的应用程序的PDB路径
0:013> SYMPATH +“C:\用户\ ningz \ \ Visual Studio 2008中\ \ SilverlightApplication1 \ SilverlightApplication1 \ BIN \ DEBUG”
符号搜索路径是:SRV * C:\用户\ ningz \应用程序数据\ \ TEMP \符号*
http://msdl.microsoft.com/download/symbols;
C:\用户\ ningz \文档\ Visual Studio 2008中\ \ SilverlightApplication1 \ SilverlightApplication1的\ Bin \调试

/ /重新加载所有的符号
0:013>。重装
重新载入当前模块

/ /设置源路径使用源服务器
0:013>。srcpath
源码搜索路径是:<空>
0:013>。srcfix
源码搜索路径是:SRV *
0:013> srcpath +“C:\用户\ ningz \ \ Visual Studio 2008中\项目\ SilverlightApplication1 \ SilverlightApplication1”
来源搜索路径是:SRV * C:\用户\ ningz \ \ Visual Studio 2008中\ \ SilverlightApplication1 \ SilverlightApplication1

/ /加载SOS救援中心。 请注意:
/ / 1。 似乎mscorwks是在Silverlight coreclr取代
/ / 2。 ,而不是loadby,你也可以使用负载的“C:\ PROGRAM FILES \微软Silverlight \ 2.0.31005.0 \ sos.dll”。
0:013>。loadby SOS coreclr
装载的C:\ PROGRAM FILES \微软Silverlight \ 2.0.31005.0 \ SOS扩展DLL

/ /设置按钮的Click事件处理程序中的断点
0:013>!BPMD SilverlightApplication1 SilverlightApplication1.Page.Button_Click
找到方法1 ... ...
的MethodDesc = 03983a30
添加待断点...
0:013> BL
0 E 0428215b 0001(0001)0 :****
0:013> G
ModLoad:70800000 7080c000彗星:Windowssystem32dwmapi.dll

/ /按一下按钮,打入windbg
断点0击中
***警告:无法验证SilverlightApplication1.dll校验
!SilverlightApplication1 Button_Click:
04850398 55 PUSH EBP
综合托管调试不支持枚举局部变量。
有关详细信息,请参阅http://dbg/managed.htm
托管帧处理失败,HRESULT,0X80004005

/ /比较线程和〜*输出
0:005>!线程/ /列表管理线程
ThreadCount:3
UnstartedThread:0
BackgroundThread:3
PendingThread:0
DeadThread:0
托管运行:是
先发制人的GC ALLOC锁
编号OSID ThreadOBJ国家GC上下文域计数亚太异常
5 1 1b08 043576e0 220残疾人04f9f214:04f9ffe8 06f529d8 0 STA
9月2 928 043689c8 B220启用00000000:00000000 0433c738 0 MTA(终结)
10 3 1e8c 06f509d0 1220启用00000000:00000000 0433c738 0 Ukn
0:005>〜* / /列表中的所有线程
0 ID:162c.1a28暂停:1 TEB:7ffde000未冻
开始:!IEXPLORE wWinMainCRTStartup(00a52d79)
优先级:0优先级:32亲和力:3
2 ID:162c.1020暂停:1 TEB:7ffdc000未冻
开始:OLE32 CRpcThreadCache::RpcWorkerThreadEntry(76dfe0cc)
优先级:0优先级:32亲和力:3
3 ID:162c.1e00暂停:1 TEB:7ffda000未冻
开始:!NTDLL TppWaiterpThread(778ab61b)
优先级:0优先级:32亲和力:3
4 ID:162c.1f00暂停:1 TEB:7ffd9000未冻
开始:0 x6f!MSVCRT _endthreadex(76162da8)
优先级:0优先级:32亲和力:3
5编号:162c.1b08暂停:1 TEB:7ffd8000未冻
开始:!IEFRAME CTabWindow:_TabWindowThreadProc(6c163fdb)
优先级:0优先级:32亲和力:3
7 ID:162c.170暂停:1 TEB:7ffd6000未冻
开始!npctrl CXcpDispatcher:DispatcherTimerCallback(6a6d16f4)
优先级:0优先级:32亲和力:3
8 ID:162c.1cd0暂停:1 TEB:7ffd5000未冻
开始:coreclr DebuggerRCThread:ThreadProcStatic(640eb5cd)
优先级:0优先级:32亲和力:3
9编号:162c.928暂停:1 TEB:7ffd4000未冻
开始:coreclr主题:intermediateThreadProc(63fb8e4f)
优先级:0优先级:32亲和力:3
10 ID:162c.1e8c暂停:1 TEB:7ffd3000未冻
开始:coreclr主题:intermediateThreadProc(63fb8e4f)
优先级:0优先级:32亲和力:3
11 ID:162c.1fac暂停:1 TEB:7ffaf000未冻
开始!agcore CMulticoreTaskScheduler:的WorkerThread(660547de)
优先级:0优先级:32亲和力:3
12 ID:162c.1b78暂停:1 TEB:7ffae000未冻
开始!agcore CMulticoreTaskScheduler:的WorkerThread(660547de)
优先级:0优先级:32亲和力:3
13 ID:162c.1d18暂停:1 TEB:7ffdb000未冻
开始:!NTDLL RtlUserThreadStart(778c9a78)
优先级:0优先级:32亲和力:3
托管帧处理失败,HRESULT,0X80004005
综合托管调试不支持枚举局部变量。
有关详细信息,请参阅http://dbg/managed.htm

/ /比较!clrstack&K输出
0:005>!clrstack - P / /列表管理堆栈帧的效率
操作系统线程ID:0x1b08(5)
ESP的电子信息产品
0450f850 04800398 SilverlightApplication1.Page.Button_Click(System.Object的,System.Windows.RoutedEventArgs)
参数:
今(<CLR reg>)= 0x04f59c78
发件人(<CLR reg>)= 0x04f5b948
E(0x0450f854)= 0x04f9f1f0

0450f858 048cde0d System.Windows.Controls.Primitives.ButtonBase.OnClick()
参数:
(0x0450f864)= 0x04f5b948

0450f870 048cdd10 System.Windows.Controls.Button.OnClick()
参数:
这= <no data>

0450f880 048cdc3d
参数:
(0x0450f884)= 0x04f5b948
E(0x0450f880)= 0x04f9f188

0450f890 048cdba1 System.Windows.Controls.Control.OnMouseLeftButtonUp(System.Windows.Controls.Control,System.EventArgs)
参数:
CTRL = <no data>
E = <no data>

0450f8a0 0483a0e7 MS.Internal.JoltHelper.FireEvent(IntPtr的,IntPtr的,Int32的,System.String)
参数:
unmanagedObj(0x0450f8f8)= 0x04355c48
unmanagedObjArgs(0x0450f8f4)= 0x0707be00
argsTypeIndex(0x0450f928)= 0x000000a9
eventName(0x0450f924)= 0x04f9f16c

0450fa74 63ef17b0 [GCFrame:0450fa74]
0450fb30 63ef17b0 [ContextTransitionFrame:0450fb30]
0450fc28 63ef17b0 [UMThkCallFrame:0450fc28]
0:005> KP / /列出所有的栈帧
ChildEBP RetAddr
0450f868 048cde0d SilverlightApplication1!Button_Click(<HRESULT 0x80004001>)
0450f868 048cdd10 System_Windows!System.Windows.Controls.Primitives.ButtonBase.OnClick(<HRESULT 0x80004001>)0 x5d
0450f878 048cdc3d System_Windows!System.Windows.Controls.Button.OnClick(<HRESULT 0x80004001>)0 X48
0450f888 048cdba1 System_Windows!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(<HRESULT 0x80004001>)+0 X85
0450f898 0483a0e7 System_Windows!System.Windows.Controls.Control.OnMouseLeftButtonUp(<HRESULT 0x80004001>)0 X41
0450f91c 63ef17b0 System_Windows!MS.Internal.JoltHelper.FireEvent(<HRESULT 0x80004001>)0 x1b7
0450f934 63ef5f98 coreclr!CallDescrWorker 0 X33
0450f9b0 63f032bc coreclr!CallDescrWorkerWithHandler 0 x8e
0450f9d0 63f0345c coreclr ForwardCallToManagedMethod 0 X55
0450faf4 63fc4abf coreclr DoUMThunkCallWorker 0 X199
0450fbe0 04c513d2 coreclr DoUMThunkCall 0 x1b4
警告:帧的IP没有任何已知的模块 以下帧可能是错误的的
0450fc10 6607e0db 0x4c513d2
0450fc70 6a6dc1fc agcore CCoreServices::CLR_FireEvent 0 x183
托管帧处理失败,HRESULT,0X80004005
0450fc84 6a6dc187 npctrl CommonBrowserHost::CLR_FireEvent 0 X2A
0450fcc8 6a6dc048 npctrl CControlBase::ScriptCallback 0 x366一样
0450fd08 6a6dc013 npctrl CXcpDispatcher::OnScriptCallback 0 xee
!0450fd14 6a6dbfef npctrl CXcpDispatcher:OnWindowMessage 0 X3A
0450fd2c 7731f8d2 npctrl CXcpDispatcher::WindowProc中+0 x7f
0450fd58 7731f794 USER32!InternalCallWinProc 0 X23
0450fdd0 77320008 USER32!UserCallWinProcCheckWow 0 x14b

/ /检查堆,注意强类型对象堆的便利
/ /而不是在本机堆的非类型化的字节
0:005>!dumpheap命令型SilverlightApplication1
地址吨尺寸
04f4f31c 046336b0 36
04f59c78 04633a6c 68
共2个对象
统计:
吨数TotalSize类名
046336b0 1 36 SilverlightApplication1.App
04633a6c 1 68 SilverlightApplication1.Page
共有2个对象
0:005>!做04f59c78
产品名称: SilverlightApplication1.Page
MethodTable:04633a6c
EEClass:0463196c
尺寸:68(0x44)字节
文件:SilverlightApplication1,版本= 1.0.0.0,文化=中性公钥=空
领域:
吨场偏移类型VT attr的值名称
047d97a0 40000dc 4 ... al.NativeResource 0实例04f5a5c0 m_nativePtr
04853ab8 40000df 8 ... System.Windows]] 0实例00000000 _valueTable
047d9874 40000e0 C ... reTypeEventHelper 0实例04f5a600 _coreTypeEventHelper
04856388 40000e3 10 ... bject,mscorlib程序] 0实例04f79a58 _treeChildren
047ae03c 40000e4 14 ... rnal.IManagedPeer 0实例00000000 _treeParent
03d50a90 40000dd 2B0 System.IntPtr 1共享静态StaticNativePointer
>>域:值0433c738:NotInit 06f529d8:00000000 <<
03d50f28 40000de 2B4 System.Boolean 1个共用的静态_isCoreCreate
>>域:值0433c738:NotInit 06f529d8:0 <<
047ae384 40000e1 8 .... DependencyObject的0共享静态PropertyReferencesHolder
>>域:值0433c738:NotInit 06f529d8:04f489b8 <<
04661618 40000e2 C ... flection.Assembly 0共享静态_executingAssembly
>>域:值0433c738:NotInit 06f529d8:00000000 <<
18 047d0b90 40000f1 ... rs.AutomationPeer 0实例00000000 m_pAP
047d7404 40000e8 10 ... ependencyProperty 0共享静态OpacityProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4a8 <<
047d7404 40000e9 14 ... ependencyProperty 0共享静态ClipProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4d0 <<
047d7404 40000ea 18 ... ependencyProperty 0共享静态RenderTransformProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4f8 <<
047d7404 40000eb 1C ... ependencyProperty 0共享静态OpacityMaskProperty
>>域:值0433c738:NotInit 06f529d8:04f5a50c <<
047d7404 40000ec 20 ... ependencyProperty 0共享静态RenderTransformOriginProperty
>>域:值0433c738:NotInit 06f529d8:04f5a534 <<
047d7404 40000ed 24 ... ependencyProperty 0共享静态IsHitTestVisibleProperty
>>域:值0433c738:NotInit 06f529d8:04f5a548 <<
047d7404 40000ee 28 ... ependencyProperty 0共享静态VisibilityProperty
>>域:值0433c738:NotInit 06f529d8:04f5a570 <<
047d7404 40000ef 2C ... ependencyProperty 0共享静态RenderSizeProperty
>>域:值0433c738:NotInit 06f529d8:04f5a598 <<
047d7404 40000f0 30 ... ependencyProperty 0共享静态UseLayoutRoundingProperty
>>域:值0433c738:NotInit 06f529d8:04f5a5ac <<
1C 0 00000000 4000108 00000000实例BindingValidationError
04856ae4 400010a 20 ... 0 angedEventHandler实例00000000 DPChanged
048bc8a4 400010b 24 ... 0 angedEventHandler实例00000000 DataContextChanged
03d50f28 400010c 2C System.Boolean 1实例0 _isDataContextBound
0481f43c 400010d 28 ... 0 angedEventHandler实例00000000 _sizeChanged
047d7404 40000f2 34 ... ependencyProperty 0共享静态TriggersProperty
>>域:值0433c738:NotInit 06f529d8:04f5a144 <<
047d7404 40000f3 38 ... ependencyProperty 0共享静态ResourcesProperty
>>域:值0433c738:NotInit 06f529d8:04f5a158 <<
047d7404 40000f4 3C ... ependencyProperty 0共享静态LanguageProperty
>>域:值0433c738:NotInit 06f529d8:04f5a180 <<
047d7404 40000f5 40 ... ependencyProperty 0共享静态ActualWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a194 <<
047d7404 40000f6 44 ... ependencyProperty 0共享静态ActualHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1a8 <<
047d7404 40000f7 48 ... ependencyProperty 0共享静态WidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1bc <<
047d7404 40000f8 4C ... ependencyProperty 0共享静态HeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1d0 <<
047d7404 40000f9 50 ... ependencyProperty 0共享静态MinWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1e4 <<
047d7404 40000fa 54 ... ependencyProperty 0共享静态MaxWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1f8 <<
047d7404 40000fb 58 ... ependencyProperty 0共享静态MinHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a20c <<
047d7404 40000fc 5C ... ependencyProperty 0共享静态MaxHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a220 <<
047d7404 40000fd 60 ... ependencyProperty 0共享静态HorizontalAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a234 <<
047d7404 40000fe 64 ... ependencyProperty 0共享静态VerticalAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a248 <<
047d7404 40000ff 68 ... ependencyProperty 0共享静态MarginProperty
>>域:值0433c738:NotInit 06f529d8:04f5a25c <<
047d7404 4000100 6C ... ependencyProperty 0共享静态StyleProperty
>>域:值0433c738:NotInit 06f529d8:04f5a284 <<
047d7404 4000101 70 ... ependencyProperty 0共享静态ParentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2ac <<
047d7404 4000102 74 ... ependencyProperty 0共享静态NameProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2c0 <<
047d7404 4000103 78 ... ependencyProperty 0共享静态TagProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2d4 <<
047d7404 4000104 7C ... ependencyProperty 0共享的静态TagInternalProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2fc <<
04851464 4000105 80 ... ndows.RoutedEvent 0共享静态LoadedEvent
>>域:值0433c738:NotInit 06f529d8:04f5a420 <<
047d7404 4000106 84 ... ependencyProperty 0共享静态CursorProperty
>>域:值0433c738:NotInit 06f529d8:04f5a440 <<
047d7404 4000107 88 ... ependencyProperty 0共享静态InstanceDelegateStoreProperty
>>域:值0433c738:NotInit 06f529d8:04f5a468 <<
047d7404 4000109 8C ... ependencyProperty 0共享静态DataContextProperty
>>域:值0433c738:NotInit 06f529d8:04f5a494 <<
047a1e2c 400010e 90 ... rence,mscorlib程序] 0共享静态_staticDelegateList
>>域:值0433c738:NotInit 06f529d8:00000000 <<
00000000 4000264 30 ... angedEventHandler 0实例00000000 IsEnabledChanged
047d7404 4000252 430 ... ependencyProperty 0共享静态IsTabStopProperty
>>域:值0433c738:NotInit 06f529d8:04f59ce4 <<
047d7404 4000253 434 ... ependencyProperty 0共享静态TabIndexProperty
>>域:值0433c738:NotInit 06f529d8:04f59cf8 <<
047d7404 4000254 438 ... ependencyProperty 0共享静态TemplateProperty
>>域:值0433c738:NotInit 06f529d8:04f59d20 <<
047d7404 4000255 43C ... ependencyProperty 0共享静态TabNavigationProperty
>>域:值0433c738:NotInit 06f529d8:04f59d48 <<
047d7404 4000256 440 ... ependencyProperty 0共享静态PaddingProperty
>>域:值0433c738:NotInit 06f529d8:04f59d70 <<
047d7404 4000257 444 ... ependencyProperty 0共享静态HorizontalContentAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f59d98 <<
047d7404 4000258 448 ... ependencyProperty 0共享静态VerticalContentAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f59dc0 <<
047d7404 4000259 44C ... ependencyProperty 0共享静态BackgroundProperty
>>域:值0433c738:NotInit 06f529d8:04f59de8 <<
047d7404 400025a 450 ... ependencyProperty 0共享静态BorderBrushProperty
>>域:值0433c738:NotInit 06f529d8:04f59dfc <<
047d7404 400025b 454 ... ependencyProperty 0共享静态BorderThicknessProperty
>>域:值0433c738:NotInit 06f529d8:04f59e10 <<
047d7404 400025c 458 ... ependencyProperty 0共享静态FontSizeProperty
>>域:值0433c738:NotInit 06f529d8:04f59e24 <<
047d7404 400025d 45C ... ependencyProperty 0共享静态FontFamilyProperty
>>域:值0433c738:NotInit 06f529d8:04f59e4c <<
047d7404 400025e 460 ... ependencyProperty 0共享静态ForegroundProperty
>>域:值0433c738:NotInit 06f529d8:04f59e60 <<
047d7404 400025f 464 ... ependencyProperty 0共享静态FontWeightProperty
>>域:值0433c738:NotInit 06f529d8:04f59e88 <<
047d7404 4000260 468 ... ependencyProperty 0共享静态FontStyleProperty
>>域:值0433c738:NotInit 06f529d8:04f59eb0 <<
047d7404 4000261 46C ... ependencyProperty 0共享静态FontStretchProperty
>>域:值0433c738:NotInit 06f529d8:04f59ed8 <<
047d7404 4000262 470 ... ependencyProperty 0共享静态DefaultStyleKeyProperty
>>域:值0433c738:NotInit 06f529d8:04f59eec <<
047d7404 4000263 474 ... ependencyProperty 0共享静态IsEnabledProperty
>>域:值0433c738:NotInit 06f529d8:04f59f00 <<
04857f14 4000265 478 ... System.Windows]] 0共享的静态_resourceDictionaryCache
>>域:值0433c738:NotInit 06f529d8:04f5cae4 <<
03cf5668 4000266 47C的System.Object [] 0共享静态_controlDelgates
>>域:值0433c738:NotInit 06f529d8:04f59f14 <<
047d7404 4000501 77C ... ependencyProperty 0共享静态ContentProperty
>>域:值0433c738:NotInit 06f529d8:04f59cd0 <<
04852580 4000002 34 ... 0 ows.Controls.Grid实例LayoutRoot的04f79770
04852a10 4000003 38 ... s.Controls.Button 0实例04f5b948按钮
03d50f28 4000004 3C System.Boolean 1实例1 _contentLoaded

/ /以上两行是按钮对象的页面对象
/ /记住它的地址 04f5b948,因为我们将稍后引用
/ /我们可以通过dumpheap命令按钮对象相同的地址:
0:005>!dumpheap命令- MT 04852a10
地址吨尺寸
04f5b948 04852a10 92
共1对象
统计:
吨数TotalSize类名
04852a10 1 92 System.Windows.Controls.Button
共1对象
0:005>!gcwhere 04f5b948 / /按钮gen0,因为还没有GC
地址根堆段开始分配的大小
04f5b948 0 0 04f40000 04f41000 04f9fff4 0x5c(92)
0:005>!为gcroot 04f5b948 / /看看谁的控股按钮对象
注:栈上发现的根可能是误报 运行“!帮助为gcroot”
更多的信息。
/ /注册表引用
ECX:根:04f59c78(SilverlightApplication1.Page) - >
04f5b948(System.Windows.Controls.Button) - >
EDX:根:04f5b948(System.Windows.Controls.Button) - >
/ /堆栈引用
扫描线程5 OSTHread 1b08
ESP:450f860:根:04f5ca18(System.Windows.RoutedEventHandler) - >
04f59c78(SilverlightApplication1.Page) - >
04f5b948(System.Windows.Controls.Button) - >
ESP:450f864:根:04f5b948(System.Windows.Controls.Button) - >
ESP:450f874:根:04f5b948(System.Windows.Controls.Button) - >
ESP:450f884:根:04f5b948(System.Windows.Controls.Button) - >
ESP:450f894:根:04f5b948(System.Windows.Controls.Button) - >
ESP:450f8d4:根:04f5b948(System.Windows.Controls.Button) - >
ESP:450f8e4:根:04f5b948(System.Windows.Controls.Button) - >
扫描线程9 OSTHread 928
扫描线程10 OSTHread 1e8c
/ /域引用
域(06F529D8):手柄(固定):46412f8:根:05f44260(System.Object的[])->
04f45234(System.Collections.Generic.List`1 [System.Object的,MSCORLIB ]])->
04f59980(System.Object的[])->
04f59c78(SilverlightApplication1.Page) - >
04f5b948(System.Windows.Controls.Button) - >
托管帧处理失败,HRESULT,0X80004005
综合托管调试不支持枚举局部变量。
有关详细信息,请参阅http://dbg/managed.htm

/ /检查按钮对象本身
0:005>!做04f5b948
产品名称: System.Windows.Controls.Button
MethodTable:04852a10
EEClass:0482e5f0
尺寸:92(0x5c)字节
文件:C:\ PROGRAM FILES \微软Silverlight \ 2.0.31005.0 \ System.Windows.dll
领域:
吨场偏移类型VT attr的值名称
4 047d97a0 40000dc ... al.NativeResource 0实例04f5bd58 m_nativePtr
04853ab8 40000df 8 ... System.Windows] 0实例04f5c0bc _valueTable
047d9874 40000e0 C ... reTypeEventHelper 0实例04f5bd88 _coreTypeEventHelper
04856388 40000e3 10 ... bject,mscorlib程序] 0实例04f5bee8 _treeChildren
047ae03c 40000e4 14 ... 0 rnal.IManagedPeer实例04f79770 _treeParent
03d50a90 40000dd 2B0 System.IntPtr 1共享静态StaticNativePointer
>>域:值0433c738:NotInit 06f529d8:00000000 <<
03d50f28 40000de 2B4 System.Boolean 1个共用的静态_isCoreCreate
>>域:值0433c738:NotInit 06f529d8:0 <<
047ae384 40000e1 8 .... DependencyObject的0共享静态PropertyReferencesHolder
>>域:值0433c738:NotInit 06f529d8:04f489b8 <<
04661618 40000e2 C ... flection.Assembly 0共享静态_executingAssembly
>>域:值0433c738:NotInit 06f529d8:00000000 <<
18 047d0b90 40000f1 ... rs.AutomationPeer 0实例00000000 m_pAP
047d7404 40000e8 10 ... ependencyProperty 0共享静态OpacityProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4a8 <<
047d7404 40000e9 14 ... ependencyProperty 0共享静态ClipProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4d0 <<
047d7404 40000ea 18 ... ependencyProperty 0共享静态RenderTransformProperty
>>域:值0433c738:NotInit 06f529d8:04f5a4f8 <<
047d7404 40000eb 1C ... ependencyProperty 0共享静态OpacityMaskProperty
>>域:值0433c738:NotInit 06f529d8:04f5a50c <<
047d7404 40000ec 20 ... ependencyProperty 0共享静态RenderTransformOriginProperty
>>域:值0433c738:NotInit 06f529d8:04f5a534 <<
047d7404 40000ed 24 ... ependencyProperty 0共享静态IsHitTestVisibleProperty
>>域:值0433c738:NotInit 06f529d8:04f5a548 <<
047d7404 40000ee 28 ... ependencyProperty 0共享静态VisibilityProperty
>>域:值0433c738:NotInit 06f529d8:04f5a570 <<
047d7404 40000ef 2C ... ependencyProperty 0共享静态RenderSizeProperty
>>域:值0433c738:NotInit 06f529d8:04f5a598 <<
047d7404 40000f0 30 ... ependencyProperty 0共享静态UseLayoutRoundingProperty
>>域:值0433c738:NotInit 06f529d8:04f5a5ac <<
1C 0 00000000 4000108 00000000实例BindingValidationError
04856ae4 400010a 20 ... 0 angedEventHandler实例00000000 DPChanged
048bc8a4 400010b 24 ... 0 angedEventHandler实例00000000 DataContextChanged
03d50f28 400010c 2C System.Boolean 1实例0 _isDataContextBound
0481f43c 400010d 28 ... 0 angedEventHandler实例00000000 _sizeChanged
047d7404 40000f2 34 ... ependencyProperty 0共享静态TriggersProperty
>>域:值0433c738:NotInit 06f529d8:04f5a144 <<
047d7404 40000f3 38 ... ependencyProperty 0共享静态ResourcesProperty
>>域:值0433c738:NotInit 06f529d8:04f5a158 <<
047d7404 40000f4 3C ... ependencyProperty 0共享静态LanguageProperty
>>域:值0433c738:NotInit 06f529d8:04f5a180 <<
047d7404 40000f5 40 ... ependencyProperty 0共享静态ActualWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a194 <<
047d7404 40000f6 44 ... ependencyProperty 0共享静态ActualHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1a8 <<
047d7404 40000f7 48 ... ependencyProperty 0共享静态WidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1bc <<
047d7404 40000f8 4C ... ependencyProperty 0共享静态HeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1d0 <<
047d7404 40000f9 50 ... ependencyProperty 0共享静态MinWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1e4 <<
047d7404 40000fa 54 ... ependencyProperty 0共享静态MaxWidthProperty
>>域:值0433c738:NotInit 06f529d8:04f5a1f8 <<
047d7404 40000fb 58 ... ependencyProperty 0共享静态MinHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a20c <<
047d7404 40000fc 5C ... ependencyProperty 0共享静态MaxHeightProperty
>>域:值0433c738:NotInit 06f529d8:04f5a220 <<
047d7404 40000fd 60 ... ependencyProperty 0共享静态HorizontalAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a234 <<
047d7404 40000fe 64 ... ependencyProperty 0共享静态VerticalAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a248 <<
047d7404 40000ff 68 ... ependencyProperty 0共享静态MarginProperty
>>域:值0433c738:NotInit 06f529d8:04f5a25c <<
047d7404 4000100 6C ... ependencyProperty 0共享静态StyleProperty
>>域:值0433c738:NotInit 06f529d8:04f5a284 <<
047d7404 4000101 70 ... ependencyProperty 0共享静态ParentProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2ac <<
047d7404 4000102 74 ... ependencyProperty 0共享静态NameProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2c0 <<
047d7404 4000103 78 ... ependencyProperty 0共享静态TagProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2d4 <<
047d7404 4000104 7C ... ependencyProperty 0共享的静态TagInternalProperty
>>域:值0433c738:NotInit 06f529d8:04f5a2fc <<
04851464 4000105 80 ... ndows.RoutedEvent 0共享静态LoadedEvent
>>域:值0433c738:NotInit 06f529d8:04f5a420 <<
047d7404 4000106 84 ... ependencyProperty 0共享静态CursorProperty
>>域:值0433c738:NotInit 06f529d8:04f5a440 <<
047d7404 4000107 88 ... ependencyProperty 0共享静态InstanceDelegateStoreProperty
>>域:值0433c738:NotInit 06f529d8:04f5a468 <<
047d7404 4000109 8C ... ependencyProperty 0共享静态DataContextProperty
>>域:值0433c738:NotInit 06f529d8:04f5a494 <<
047a1e2c 400010e 90 ... rence,mscorlib程序] 0共享静态_staticDelegateList
>>域:值0433c738:NotInit 06f529d8:00000000 <<
00000000 4000264 30 ... angedEventHandler 0实例00000000 IsEnabledChanged
047d7404 4000252 430 ... ependencyProperty 0共享静态IsTabStopProperty
>>域:值0433c738:NotInit 06f529d8:04f59ce4 <<
047d7404 4000253 434 ... ependencyProperty 0共享静态TabIndexProperty
>>域:值0433c738:NotInit 06f529d8:04f59cf8 <<
047d7404 4000254 438 ... ependencyProperty 0共享静态TemplateProperty
>>域:值0433c738:NotInit 06f529d8:04f59d20 <<
047d7404 4000255 43C ... ependencyProperty 0共享静态TabNavigationProperty
>>域:值0433c738:NotInit 06f529d8:04f59d48 <<
047d7404 4000256 440 ... ependencyProperty 0共享静态PaddingProperty
>>域:值0433c738:NotInit 06f529d8:04f59d70 <<
047d7404 4000257 444 ... ependencyProperty 0共享静态HorizontalContentAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f59d98 <<
047d7404 4000258 448 ... ependencyProperty 0共享静态VerticalContentAlignmentProperty
>>域:值0433c738:NotInit 06f529d8:04f59dc0 <<
047d7404 4000259 44C ... ependencyProperty 0共享静态BackgroundProperty
>>域:值0433c738:NotInit 06f529d8:04f59de8 <<
047d7404 400025a 450 ... ependencyProperty 0共享静态BorderBrushProperty
>>域:值0433c738:NotInit 06f529d8:04f59dfc <<
047d7404 400025b 454 ... ependencyProperty 0共享静态BorderThicknessProperty
>>域:值0433c738:NotInit 06f529d8:04f59e10 <<
047d7404 400025c 458 ... ependencyProperty 0共享静态FontSizeProperty
>>域:值0433c738:NotInit 06f529d8:04f59e24 <<
047d7404 400025d 45C ... ependencyProperty 0共享静态FontFamilyProperty
>>域:值0433c738:NotInit 06f529d8:04f59e4c <<
047d7404 400025e 460 ... ependencyProperty 0共享静态ForegroundProperty
>>域:值0433c738:NotInit 06f529d8:04f59e60 <<
047d7404 400025f 464 ... ependencyProperty 0共享静态FontWeightProperty
>>域:值0433c738:NotInit 06f529d8:04f59e88 <<
047d7404 4000260 468 ... ependencyProperty 0共享静态FontStyleProperty
>>域:值0433c738:NotInit 06f529d8:04f59eb0 <<
047d7404 4000261 46C ... ependencyProperty 0共享静态FontStretchProperty
>>域:值0433c738:NotInit 06f529d8:04f59ed8 <<
047d7404 4000262 470 ... ependencyProperty 0共享静态DefaultStyleKeyProperty
>>域:值0433c738:NotInit 06f529d8:04f59eec <<
047d7404 4000263 474 ... ependencyProperty 0共享静态IsEnabledProperty
>>域:值0433c738:NotInit 06f529d8:04f59f00 <<
04857f14 4000265 478 ... System.Windows]] 0共享的静态_resourceDictionaryCache
>>域:值0433c738:NotInit 06f529d8:04f5cae4 <<
03cf5668 4000266 47C的System.Object [] 0共享静态_controlDelgates
>>域:值0433c738:NotInit 06f529d8:04f59f14 <<
03cf44e8 40002b4 34 System.Object的实例00000000 _treeContent
047d7404 40002b3 530 ... ependencyProperty 0共享静态ContentTemplateProperty
>>域:值0433c738:NotInit 06f529d8:04f5bd30 <<
047d7404 40002b5 534 ... ependencyProperty 0共享静态ContentProperty
>>域:值0433c738:NotInit 06f529d8:04f5bd44 <<
03d50f28 40005aa 40 System.Boolean 1实例1 _isLoaded
03d50f28 40005ab 41 System.Boolean 1实例1 _isMouseCaptured
03d50f28 40005ac 42 System.Boolean 1实例0 _isSpaceKeyDown
03d50f28 40005ad 43 System.Boolean 1实例0 _isMouseLeftButtonDown
04852208 40005ae 48 System.Windows.Point 1实例04f5b990 _mousePosition
048b5f98 40005af 38 ... 0 mation.Storyboard实例00000000 _currentState
03d50f28 40005b0 44 System.Boolean 1实例0 _suspendStateChanges
0481fae0 40005b1 3C ... outedEventHandler 0实例04f5ca18点击
047d7404 40005a6 7E0 ... ependencyProperty 0共享静态ClickModeProperty
>>域:值0433c738:NotInit 06f529d8:04f5ba7c <<
047d7404 40005a7 7e4 ... ependencyProperty 0共享静态IsFocusedProperty
>>域:值0433c738:NotInit 06f529d8:04f5bb38 <<
047d7404 40005a8 7E8组件... ependencyProperty 0共享静态IsMouseOverProperty
>>域:值0433c738:NotInit 06f529d8:04f5bbd8 <<
047d7404 40005a9 7ec ... ependencyProperty 0共享静态IsPressedProperty
>>域:值0433c738:NotInit 06f529d8:04f5bc40 <<

/ /转储通过点击字段(9线以上)
0:005>!做04f5ca18
产品名称: System.Windows.RoutedEventHandler
MethodTable:0481fae0
EEClass:0482c99c
尺寸:32(0x20)的字节
文件:C:\ PROGRAM FILES \微软Silverlight \ 2.0.31005.0 \ System.Windows.dll
领域:
吨场偏移类型VT attr的值名称
03cf44e8 40001e0 4 System.Object的实例04f59c78的_target
04663c58 40001e1 8 ... ection.MethodBase 0实例00000000 _methodBase
03d50a90 40001e2彗星System.IntPtr 1实例463c08c _methodPtr
03d50a90 40001e3 10 System.IntPtr 1实例0 _methodPtrAux
03cf44e8 40001e4 14 System.Object的实例00000000 _invocationList
03d50a90 40001e5 18 System.IntPtr 1实例0 _invocationCount

0:005>!做nofields 04f59c78 / /验证的_target页
产品名称: SilverlightApplication1.Page
MethodTable:04633a6c
EEClass:0463196c
尺寸:68(0x44)字节
文件:SilverlightApplication1,版本= 1.0.0.0,文化=中性公钥=空

/ /验证_methodPtr点,Button_Click
/ /看看他们都是如何联系在一起
0:005> LN 463c08c
(0463c08c)SilverlightApplication1.Page.Button_Click(继承System.Windows.RoutedEventArgs)
0:005> U 463c08c / / JIT - ED方法存根
SilverlightApplication1.Page.Button_Click(System.Object的,System.Windows.RoutedEventArgs):
0463c08c b8303a6304 MOV EAX,4633A30h
0463c091 89ed MOV EBP,EBP
0463c093 e900431c00 JMP SilverlightApplication1!Button_Click(04800398)
0463c098 0000添加BYTE PTR [EAX],AL
0463c09a 0000添加BYTE PTR [EAX],AL
0463c09c 0000添加BYTE PTR [EAX],AL
0463c09e 0000添加BYTE PTR [EAX],AL
0463c0a0 0000添加BYTE PTR [EAX],AL
0:005> U EIP / / JIT - ED本地代码
!SilverlightApplication1 Button_Click:
04800398 55 PUSH EBP
MOV EBP,ESP 04800399 8bec
0480039b 83ec08分ESP,8
0480039e 894dfc MOV DWORD PTR [EBP - 4],ECX
048003a1 8955f8 MOV DWORD PTR [EBP - 8],EDX
048003a4 833d7435630400 CMP DWORD PTR DS:[4633574h],0
048003ab 7405 JE SilverlightApplication1!Button_Click 0 X1A(048003b2)
048003ad e8862a895f调用coreclr JIT_DbgIsJustMyCode(64092e38)
0:005>!ip2md 04800398
MethodDesc:04633a30
方法名称:SilverlightApplication1.Page.Button_Click(继承System.Windows.RoutedEventArgs)
类别:0463196c
MethodTable:04633a6c
mdToken:06000008
模块:046333b4
IsJitted:是
CodeAddr:04800398
0:005>!dumpil 04633a30
ilAddr = 047e03fe
IL_0000:NOP
IL_0001:RET

当我有时间,我可能会写一篇博客文章在CLR内部,以证明在内存中对象是如何布局,如何调度方法调用等

结论

这是一个很长的职位,但仍勉强构成概述WinDbg和SOS。 CLR很好地理解是非常重要的编码和调试,与SOS的WinDbg探索CLR,做先进的调试是最好的工具。 希望这个简短而长期的职位将帮助您开始探索CLR和Silverlight。 谢谢!

标签:
Tags: , , , 分类: 调试Silverlight中 的标签 Silverlight SOS