WinDbgとSOSでSilverlightのデバッグ
はじめに
以前の記事でVisual StudioでSilverlightのデバッグ 、私はVisual Studioは、強力なアプリケーションとマネージアプリケーションをデバッグするための最も便利なツールであることを実証した。 しかし、メモリリーク、デッドロック、プロセス/スレッド暴走、カーネルのデバッグ、および高度なリモート/クラッシュ/ UIデバッグ等(またはCDB、NTSD、KD)WinDbgのようないくつかの高度なデバッグシナリオは通常そうでない場合のみのオプションが好ましい。
Windows用デバッグツール
概要
WinDbgは、の一部であるWindowsのためのデバッグツールパッケージ:
WinDbgがGUIプログラムであっても、それは主に(そして、しばしば付)KD、CDBとNTSDのようなコマンドラインデバッガとして使用され、同じデバッグ·エンジンおよびコマンドを共有しています。 それは、強力で拡張可能なスーパーですが、特にドライバと他のオペレーティングシステムコンポーネントと同様にシステム/低レベルのデバッグに適しています。 それはツールセットを最大限に活用するためのハードウェアについての十分な知識、オペレーティングシステム、およびコンパイラを必要としません。 それは私が言うべき、偉大な(あるいは完璧だ
豊富で拡張可能なコマンドとグラフィック·ユーザー·インターフェースを持つ、ネイティブデバッグのために。 マネージデバッグのサポートはSOSデバッグ拡張機能経由で、ネイティブデバッグとほぼ同じ良いではありませんが、マネージコードとネイティブの境界を越えて統合されたデバッグを行うことができることに大きな価値がある、とSilverlightのために、それは私が知っている唯一のツールです。それがSOSをロードし、統合されたデバッグを行うことができます。
コマンド
WinDbgの/ CDB / NTSD / kdは長い時間使われてきたので、彼らは非常によく文書化されています。 それは非常には、上のWindows用デバッグツールについてお読みになることをお勧めしmicrosoft.comとMSDN 。 ここで私はあなたの感触とクイックリファレンスを与えるために、そのコマンドの簡単な概要を与える。 すべてのコマンドは、実行時のヘルプ(?|ヘルプ|!を経由して助ける[<cmd>]以下に記載)が付属していますので、概要は通常、始めるのに十分です。
WinDbgは、コマンドの3つのセットがあります。
標準コマンド
主に:
- B *コマンドは、セット/クリア/リスト/アドレスまたはアクセスにブレークポイントを有効/無効にする
- メモリ(スタック/ヒープ、グローバル変数およびパラメータ/ローカル)を調べるためにD *コマンド、E *コマンドは、メモリを変更し、メモリを検索するためのS *に
- Kは、*コマンドの呼び出しスタックを検査する
- 実行制御のP、T、G *コマンド
以下? コマンドの出力には、windbgの/ CDB / NTSD / KDを使用している人々のために偉大な概要と、頻繁に参照します。
0:006>?
完全なデバッガのマニュアルのためのオープンDebugger.chmは
B [C | D | E] [<bps>] -有効化/無効化/明確なブレークポイント(秒)
BL -リストブレークポイント
BA <access>に<size>の<addr> -セットプロセッサのブレークポイント
BP <address>は-設定ソフトブレークポイント
D [タイプ] [<RANGE>] -ダンプメモリ
DT [-N | Y] [[MOD]名!] [-N | Y]フィールド]
型情報を使用してダンプ- [-1 V | C | I | O | | R [#] []] [アドレス] [-lリスト]
DV [<name>は] -ローカル変数をダンプする
E [タイプ]で<address> [<values>] -メモリの値を入力します。
G [H | N] [= <address>の[<address>は...]] -行く
K <count>の-スタックトレース
KP <count>の-ソース引数を持つスタックトレース
LM [K | L | U | V] -リストモジュール
LNの<expr>は-リスト最寄りのシンボル
P [= <addr>] [<value>の] -ステップ·オーバー
Q -終了
R [<reg> [= <expr>は]]] -ビューまたはセットのレジスタ
検索メモリ- S [<opts>] <RANGE> <values>
SX [{E | D | I | N} [-c "をCMD1"] [-C2 "CMD2"] [-H] {例外|イベント| *}] -イベントのフィルタ
T [= <address>は] [<expr>は] -トレースに
U [<RANGE>] -アセンブル
バージョン-ショーdebuggeeとデバッガのバージョン
X [<* |モジュール>!] <* |シンボル> -ビューのシンボル
? <expr>は-表示式
? <expr>は-ディスプレイC + +の式
$ <<ファイル名> -コマンド·ファイルからの入力を取るEnterキーを押す...
<expr>は単項OPS:+ -しないことにより、WO DWO qwoポイハイ低い
バイナリOPS:+ - * / MOD(%)と(&)XOR(^)または(|)
比較:!==(=)<> =
オペランド:現在の基数、パブリックシンボルの数、<reg>
<type>は:B(バイト)、W(ワード)は、d [S]([シンボル]ダブル)
(アスキー)、C(DWORDと文字)、U(ユニコード)、L(リスト)
F(float型)、D(ダブル)、S | S(ASCII / Unicode文字列)
Q(クォドワード)
<PATTERN>:|(?<var-name>含めることができ、*)[!(NT <dll-name>)] <var-name>
<RANGE>:<address>に<address>に
:<address>はL <count>のユーザーモードのオプション:
〜 -一覧のスレッド状態
〜#S -セットのデフォルトのスレッド
| -リストのプロセスのステータス
|#S -セットのデフォルトのプロセスx86のオプション:
DG <selector> -ダンプセレクタ
<reg>:[E]斧[E] BX、[E] CX、[E] DX、[E] SI、[E] DI、[E] BP、[E] SP、[E]は、IP、[ E] FL、
AL、AH、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、の、TF、SF、ZF、AF、PF、CF、IF
<addr>:#<16ビットプロテクトモードの[セグメント:]アドレス>、
<V86-mode [seg:]address>&完全なデバッガのマニュアルのためのオープンDebugger.chmは
メタコマンド
主に高度なデバッグのためにドットを有するもの開始。 あなたが知っておくべきいくつかの重要なコマンド:
- シンボルサーバーを使用するため。symfixとで。sympath
- ソース·サーバーを使用するため。srcfixと。srcpath
- デバッグ拡張機能を管理するための、負荷、。loadby、アンロード、チェーン、。setdll
- リモートデバッグのために、サーバ、リモート
それも、シンボルサーバーは、ソース·サーバーおよびリモートデバッグに精通して得るためにあなたの時間の価値がある:彼らはあなたの人生はもっとたくさん容易になります。 下のhelpコマンドの出力は次のとおりです。
0:006>。ヘルプ
。 コマンド:
。放棄-現在のプロセスを放棄する
。allow_exec_cmds [0 | 1] -コントロールの実行コマンド
。allow_image_mapping [0 | 1] -コントロールのオンデマンドイメージファイルのマッピング
。apply_dbp [<options>の] -現在のデータブレークポイントの状態を追加
コンテキストを登録する
。ASM [<options>の] -分解のオプションを設定する
。ASM-[<options>は] -クリア分解オプション
。<proc>を添付する-次の実行時 に<proc>に添付
。ブロック{<commands>} -括弧ネストされた実行のための一連のコマンド
。bpsync [0 | 1] -マルチスレッドのdebuggeeのための特別なブレークポイントの動作
。ブレーク-外側のループから抜け出す
。ブレイク- KDに休憩
。キャッシュ[<options>の] -仮想メモリ·キャッシュ制御
。コール<FN>(<arg1>、<arg2>、...) -デバッグ中の関数を実行します。
。キャッチ{<commands>} -コマンドでキャッチ失敗
。チェーン-リスト現在の拡張
。childdbg <0 | 1> -ターン子プロセスのデバッグをオンまたはオフ
。クライアント-リストは、現在アクティブなクライアント
。CloseHandleを[<options>の] [:ハンドル] -指定されたハンドルを閉じます
。続ける-外側のループを継続する
。copysym [<options>の] <path>は-コピー現在のシンボルファイルのディレクトリに
。<command line>を作成する-新しいプロセスを作成する
。createdir [<options>の] [<path>は] -制御プロセスの作成 オプション
。CXRの<address>は-指定されたアドレスで、ダンプコンテキストレコード
この後、K *はCXR·スタックを提供します
。dbgdbg -現在のデバッガにデバッガをアタッチする
。debug_sw_wow [0 | 1] -可能にするソフトウェアWOWエミュレーションとの相互作用
。デタッチ-現在のプロセス/ダンプから切り離す
。<file>はdml_file -ファイルからの出力DMLコンテンツを
。dml_flow <start>はの<addr> -ショーの基本的なブロック·コードの流れ
。dml_start [<options>の] -デバッガの活動の航行の概要
。は{} <commands>行う(<cond>が) - <cond>ががゼロになるまで<commands>を実行します。
。ドライバ-このコマンドは、削除されました-使用'lmを'またはリロード-L)。
。ダンプ[<options>の] <filename>は-ホストシステム上のダンプファイルを作成する
。dvalloc [<options>の] <bytes> -デバッグでVirtualAllocのメモリ
。dvfree [<options>の] <OFFSET> <bytes> -デバッグのVirtualFreeメモリ
。エコー["<string>に" | <string>に] -エコー文字列
。echotime -出力デバッガ時間
。echotimestamps [0 | 1] -イベントのタイムスタンプトグル出力
。ecxr -現在の例外のダンプコンテキストレコード
。effmach [<machine>] -現在のマシンタイプが変更
。他{<commands>} - IF / THEN / ELSE条件付き実行
。ELSIF(<cond>が){<commands>} [<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>に- 。EXCEPTION_POINTERSために行うEXRとCXR。
指定したアドレスのダンプ例外レコード- EXR <address>の
。extmatch [<opts>] <PATTERN> -パターンにマッチするすべての拡張子を表示する
。extpath <opts> [<DIR> [; ...]] -セット拡張検索パス
。extpath + <opts> [<DIR> [; ...]] -追加の拡張子の検索パス
。F + -現在のフレームの呼び出し側に設定し、現在のスタックフレーム
F- -現在のフレームの呼び出し先に現在のスタックフレームを設定する
。繊維<address>は-アドレスでファイバのコンテキストを設定する
指定されていないアドレスであればリセットされたコンテキスト
。fiximports <PATTERN> -画像のインポートをリンクしようと
。fnent <address>は-与えられたコードのアドレスのダンプ関数のエントリ
。fnret <fnaddr> [<retval>] -表示フォーマットされた戻り値
(; <cond>が、<init>を<step>)の{<commands>} - <commands>を実行し、
<step> <cond>がされるまで
ゼロ
。force_radix_output [0 | 1] -デフォルトの基地内のダンプの整数型
。force_system_init [<options>の] -可能であれば力保留中のシステムを初期化する
。force_tb -強制的に分岐のトレースを許可する
。foreachの[OPTS](<alias>に{<tcmds>}){<ecmds>} -のために実行する<ecmds>
内の各トークン
<tcmds>の出力
。FPO <options>の-コントロールのオーバーライドFPO情報
。フレーム[<FRAME>] -地元の人々のために設定され、現在のスタックフレーム
。形式<expr>は-多くの形式で表示され、式の結果
。ヘルプ[オプション<options>] -このヘルプを表示する
。holdmem <options>の[範囲] -メモリ内のデータを保持し、比較する
しますif(<cond>が){<commands>} [<else clauses>] - IF / THEN / ELSE条件
実行
。ignore_missing_pages [0 | 1] -欠落した制御カーネルサマリダンプ
ページのエラーメッセージ
。imgscan <options>の- PEイメージのスキャンメモリ
。jdinfo <jdi_addr> -のAeDebug情報を解釈
。<count>のkframes -セットのデフォルトのスタックトレースの深さ
。殺す-現在のプロセスを殺す
。lastevent -最後に発生したイベントを表示
。残す-同封を終了してキャッチします。
。ライン-トグルラインシンボルロード
ロード·<name>は-拡張子チェーンに、この拡張DLLを追加する
。loadby <name>の<mod>の-モジュールの拡張DLLを追加する
延長チェーンへのディレクトリ
。ロケール[<locale>の] -現在のロケールを設定する
。ログ-表示ログのステータス
。logopen [<file>は] -開いている新しいログ·ファイル
。logappend [<file>は] -ログファイルに追加する
。logclose -ログファイルを閉じる
。netsyms [0 | 1] -許可/禁止の純シンボルパス
。netuse [<options>の] -ネット接続を管理する
。noshellインストーラが-シェルコマンドを無効にする
。noversion -拡張機能のバージョンチェックを無効にする
。ofilter <PATTERN> -指定されたパターンに対してフィルタデバッグ出力
。ocommand <prefix>は-コマンドとして与えられた接頭辞を使用して出力を扱う
。<file>はopendump -ダンプファイルを開く
。outmaskの<mask>は-電流出力マスクのセットビット
。outmask-<mask>は-電流出力マスク内のビットをクリア
。PCMD [<options>の] -コントロールごとに、コマンドプロンプト
。POP [<options>の] -ポップアップ状態
。prefer_dml [0 | 1] -コントロールDMLモードのデフォルト
。printfの"<format>は、"<args…> -書式付き出力
。プロセス[<address>に] -暗黙のプロセスを設定します。
デフォルト値にリセットしないアドレスが指定されていない場合
。prompt_allow [<options>の] -表示することができますどのような情報を制御
プロンプトで
。PUSH [<options>の] -プッシュ状態
。quit_lock [<options>の] -予期しないQUITに対するロックのセッション
。readmem <file>は<RANGE> -ファイルからの生のメモリを読み取る
。record_branches [0 | 1] -コントロールプロセッサ分岐の記録
。リロード[<image.ext> [= <address>は、<size>は]] -リロードシンボル
。再起動-セッションが再起動を要求
リモート<pipename> -スタートRemote.exeをサーバ
セキュアな[0 | 1] -ホストの禁止の操作に危険
。send_file <options>は-リモートサーバにファイルを送信する
。サーバ<options>を-開始エンジンサーバー
。サーバ-リスト、アクティブなリモート·サーバ
。setdll <name>は-デバッガは最初にこのDLLの拡張子を検索します
。シェル[<command>に] -シェルコマンドを実行します。
。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> -セット/クリアタイプのオプション
。<name>をアンロード-拡張DLLのリストから、この拡張DLLを削除
。unloadall -拡張DLLのリストからすべての拡張DLLを削除する
覚醒- sleep'ingデバッガウェイクアップ
。しばらく(<cond>が){<commands>} - <cond>が非ゼロである間<commands>を実行
。writemem <file>は<RANGE> -ファイルへの生のメモリを書き込む取得するためにデバッガのディレクトリに"。HHは<command>"またはオープンDebugger.chmはを使用して、
コマンドに関する詳細なマニュアルを参照してください。
拡張コマンド
それらは始まる!、通常、特定のエリアでは、マネージデバッグのためのSOSの拡張コマンドと同様に。 を使うことができます!<EXT>を!exts.helpのように、拡張子のコマンドの一覧を表示するのに役立ちます。 高度なシステムデバッグのために、メモリリーク、デッドロックなどを検出するように、あなたは、これらの拡張コマンドに精通しなければなりません。
SOS
概要
SOSは、ストライクの息子(理由は聞かないでください)、マネージデバッグ用のデバッグ拡張の頭字語である。 私はそれがCLRデバッグのためのCLRチームによって考案されたと信じているので、長い時間を回避されており、Web上で良い情報がたくさんあります。 いくつかの推奨される測定値:
- SOSデバッグ拡張 MSDNの
- ジェイソンザンダーのブログ記事: CLRのSOSデバッグ
CLRの各バージョンは独自のSOS(。NET Framework 3.5がまだCLR 2.0を使用し、シルバー独自のCLRを持っている)があります。
のWindows \ clr10ための\プログラムファイル\デバッグツール:Cのディレクトリ
2007年9月19日7時01 PM 948784 sos.dll
1ファイル(秒)948784バイト\ Program Files \ MicrosoftのSilverlightの\ 2.0.31005.0:Cのディレクトリ
2008年10月5日午前2時16分には、495424 sos.dll午前
1ファイル(秒)495424バイトCのディレクトリ:\ WINDOWS \ Microsoft.NET \ Frameworkの\ V1.1.4322
2004年7月15日0:35 319488 SOS.dll午前
1ファイル(秒)319488バイトCのディレクトリ:\ WINDOWS \ Microsoft.NET \ Frameworkの\ v2.0.50727の
2008年7月27日10:03 392184 SOS.dll午前
1ファイル(秒)392184バイト
コマンド
SOSの実行時のヘルプでは、ほとんど少数の試行錯誤といくつかのフラストレーション以外の他のドキュメントを必要としないように素晴らしいです。 ![]()
0:016>!ヘルプ
---------------------------
SOSは、管理のデバッグを支援するために設計されたデバッガ拡張DLLです。
プログラム。 関数は、その後おおよその順序で、カテゴリ別にリストされてい
重要性。 人気の高い機能のショートカット名は、括弧内に記載されています。
その機能の詳細な情報のタイプ"!ヘルプ<Functionname>の"。オブジェクトの検査の検査コードとスタック
--------------------
DumpObj(DO)のスレッド
DumpArray(DA)CLRStack
DumpStackObjects(DSO)IP2MD
DumpHeap U
DumpVC DumpStack
gcrootのはEEStack
ObjSizeではGCInfo
FinalizeQueue EHInfo
れるPrintException(PE)COMState
TraverseHeap BPMDCLRのデータ構造の診断ユーティリティを調べる
--------------------
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 FAQ
HistStats
HistRoot
HistObj
HistObjFind
HistClear
サンプル·デバッグ·デモンストレーション
私は以前の記事で同じ単純なSilverlightアプリケーション(使用されるVisual StudioでSilverlightのデバッグを SOSでデバッグをWinDbgを実証するために):
ここに私の注釈(/ /で始まる)とデバッグログは、次のとおりです。
/ /シンボルサーバーを使用するシンボルパスを設定する
0:013>で。sympath
シンボル検索パスは次のとおりです。<empty>
0:013> symfix C:\ Users \ユーザーningz \ appdataに\ローカル\ Tempに\記号
0:013>で。sympath
シンボル検索パスは次のとおりです。SRV * C:\ Users \ユーザーningz \ appdataに\ローカル\ Tempに\ SYMBOLS \ * \ SYMBOLS \記号/ /アプリケーションをデバッグしているのPDBのパスを追加
0:013> sympath + "C:\ Users \ユーザーningz \ドキュメント\ Visual Studio 2008を\プロジェクト\ SilverlightApplication1 \ SilverlightApplication1の\ Bin \ Debug"
シンボル検索パスは次のとおりです。SRV * C:\ Users \ユーザーningz \ appdataに\ローカル\ Tempに\記号*
http://msdl.microsoft.com/download/symbols;
C:\ Users \ユーザーningz \ドキュメント\ Visual Studio 2008を\プロジェクト\ SilverlightApplication1 \ SilverlightApplication1の\ Bin \ Debug/ /すべてのシンボルを再読み込み
0:013>。リロード
現在のモジュールをリロードする
/ /ソースサーバーを使用するようにソースパスを設定する
0:013>。srcpath
ソースの検索パスは次のとおりです。<empty>
0:013>。srcfix
ソースの検索パスは次のとおりです。SRV *
0:013> srcpath + "C:\ Users \ユーザーningz \ドキュメント\ Visual Studio 2008を\プロジェクト\ SilverlightApplication1 \ SilverlightApplication1"
ソースの検索パスは次のとおりです。SRV *; C:\ Users \ユーザーningz \ドキュメント\ Visual Studio 2008を\プロジェクト\ SilverlightApplication1 \ SilverlightApplication1/ / SOSをロードします。 ご注意:
/ / 1。 それはmscorwksは、Silverlightでcoreclrに置き換えられているようだ
/ / 2。 。代わりにloadbyは、使用することもできますロードします。 "C:\ Program Files \ MicrosoftのSilverlightの\ 2.0.31005.0 \ sos.dll"
0:013>。loadby SOS coreclr
ロードされたC:\ Program Files \ MicrosoftのSilverlightの\ 2.0.31005.0 \ SOS拡張DLL/ /ボタンクリックイベントハンドラのブレークポイントを設定する
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 C:Windowssystem32dwmapi.dll/ /ボタンをクリックして、windbgの侵入
ブレークポイント0ヒット
***警告:SilverlightApplication1.dllのチェックサムを確認することができません
!SilverlightApplication1 Button_Click:
04850398 55プッシュEBP
統合されたマネージデバッグは、ローカル変数の列挙をサポートしていません。
参照してくださいhttp://dbg/managed.htmの詳細については、。
管理フレームの処理は、HRESULT 0x80004005が失敗しました。/ /比較する!スレッドおよび〜*を出力
0:005>!のスレッド/ /リストのマネージスレッドのみ
スレッドカウント:3
UnstartedThread:0
BackgroundThread:3
PendingThread:0
DeadThread:0
ランタイムをホストする:はい
プリエンプティブなGCのAllocロック
ID OSID ThreadOBJ州立GCコンテキストのドメインは、APTの例外をカウント
04f9f214を無効5 1b08 043576e0 220: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凍結
スタート!MSVCRT _endthreadex 0 x6f(76162da8)
優先度:0優先度クラス:32アフィニティ:3
。 5 ID: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 ID: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イド: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イド:162c.1d18サスペンド:1 TEB:7ffdb000凍結
スタート!NTDLL RtlUserThreadStart(778c9a78)
優先度:0優先度クラス:32アフィニティ:3
管理フレームの処理は、HRESULT 0x80004005が失敗しました。
統合されたマネージデバッグは、ローカル変数の列挙をサポートしていません。
参照してくださいhttp://dbg/managed.htmの詳細については、。/ /比較する!clrstack&kの出力
0:005>!clrstack-P / /リストのみのスタックフレームを管理する
OSのスレッドID:0x1b08(5)
ESP EIP
0450f850 04800398 SilverlightApplication1.Page.Button_Click(System.Objectの、System.Windows.RoutedEventArgs)
パラメータ:
この(<CLR reg>)= 0x04f59c78
送信者(<CLR reg>)= 0x04f5b948
E(0x0450f854)= 0x04f9f1f00450f858 048cde0d System.Windows.Controls.Primitives.ButtonBase.OnClick()
パラメータ:
この(0x0450f864)= 0x04f5b9480450f870 048cdd10 System.Windows.Controls.Button.OnClick()
パラメータ:
この= <no DATA>0450f880 048cdc3d
パラメータ:
この(0x0450f884)= 0x04f5b948
E(0x0450f880)= 0x04f9f1880450f890 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)= 0x04f9f16c0450fa74 63ef17b0 [GCFrame:0450fa74]
[ContextTransitionFrame:0450fb30] 0450fb30 63ef17b0
0450fc28 63ef17b0 [UMThkCallFrame:0450fc28]
0:005> KP / /リストのすべてのスタックフレーム
ます。ChildEBP RetAddr
0450f868はSilverlightApplication1!Button_Click(<HRESULT 0x80004001>)を048cde0d
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
アドレスMTのサイズ
04f4f31c 046336b0 36
04f59c78 04633a6c 68
合計2つのオブジェクト
統計:
MTカウント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、文化=中立的なPublicKeyToken = nullを
フィールド:
MTフィールドのオフセットタイプVT Attrの値の名前
047d97a0 40000dc 4 ... al.NativeResource 0インスタンス04f5a5c0 m_nativePtr
04853ab8 40000df 8 ... System.Windows名前]] 0インスタンス0000万_valueTable
047d9874 40000e0 C ... reTypeEventHelper 0インスタンス04f5a600 _coreTypeEventHelper
04856388 40000e3 10 ... bject、mscorlibの]] 0インスタンス04f79a58 _treeChildren
047ae03c 40000e4 14 ... rnal.IManagedPeer 0インスタンス0000万_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 <<
047d0b90 40000f1 18 ... rs.AutomationPeer 0インスタンス0000万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 <<
00000000 4000108 1cは0インスタンス0000万のBindingValidationError
04856ae4 400010a 20 ... angedEventHandler0000万DPChanged 0インスタンス
048bc8a4 400010b 24 ... angedEventHandler 0インスタンス0000万DataContextChanged
03d50f28 400010c 2C可能System.Boolean 1つのインスタンス0 _isDataContextBound
0481f43c 400010d 28 ... angedEventHandler 0インスタンス0000万_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 shared static HeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1d0 <<
047d7404 40000f9 50 ...ependencyProperty 0 shared static MinWidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1e4 <<
047d7404 40000fa 54 ...ependencyProperty 0 shared static MaxWidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1f8 <<
047d7404 40000fb 58 ...ependencyProperty 0 shared static MinHeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a20c <<
047d7404 40000fc 5c ...ependencyProperty 0 shared static MaxHeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a220 <<
047d7404 40000fd 60 ...ependencyProperty 0 shared static HorizontalAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a234 <<
047d7404 40000fe 64 ...ependencyProperty 0 shared static VerticalAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a248 <<
047d7404 40000ff 68 ...ependencyProperty 0 shared static MarginProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a25c <<
047d7404 4000100 6c ...ependencyProperty 0 shared static StyleProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a284 <<
047d7404 4000101 70 ...ependencyProperty 0 shared static ParentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2ac <<
047d7404 4000102 74 ...ependencyProperty 0 shared static NameProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2c0 <<
047d7404 4000103 78 ...ependencyProperty 0 shared static TagProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2d4 <<
047d7404 4000104 7c ...ependencyProperty 0 shared static TagInternalProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2fc <<
04851464 4000105 80 ...ndows.RoutedEvent 0 shared static LoadedEvent
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a420 <<
047d7404 4000106 84 ...ependencyProperty 0 shared static CursorProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a440 <<
047d7404 4000107 88 ...ependencyProperty 0 shared static InstanceDelegateStoreProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a468 <<
047d7404 4000109 8c ...ependencyProperty 0 shared static DataContextProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a494 <<
047a1e2c 400010e 90 ...rence, mscorlib]] 0 shared static _staticDelegateList
>> Domain:Value 0433c738:NotInit 06f529d8:00000000 <<
00000000 4000264 30 ...angedEventHandler 0 instance 00000000 IsEnabledChanged
047d7404 4000252 430 ...ependencyProperty 0 shared static IsTabStopProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59ce4 <<
047d7404 4000253 434 ...ependencyProperty 0 shared static TabIndexProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59cf8 <<
047d7404 4000254 438 ...ependencyProperty 0 shared static TemplateProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d20 <<
047d7404 4000255 43c ...ependencyProperty 0 shared static TabNavigationProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d48 <<
047d7404 4000256 440 ...ependencyProperty 0 shared static PaddingProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d70 <<
047d7404 4000257 444 ...ependencyProperty 0 shared static HorizontalContentAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d98 <<
047d7404 4000258 448 ...ependencyProperty 0 shared static VerticalContentAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59dc0 <<
047d7404 4000259 44c ...ependencyProperty 0 shared static BackgroundProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59de8 <<
047d7404 400025a 450 ...ependencyProperty 0 shared static BorderBrushProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59dfc <<
047d7404 400025b 454 ...ependencyProperty 0 shared static BorderThicknessProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e10 <<
047d7404 400025c 458 ...ependencyProperty 0 shared static FontSizeProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e24 <<
047d7404 400025d 45c ...ependencyProperty 0 shared static FontFamilyProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e4c <<
047d7404 400025e 460 ...ependencyProperty 0 shared static ForegroundProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e60 <<
047d7404 400025f 464 ...ependencyProperty 0 shared static FontWeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e88 <<
047d7404 4000260 468 ...ependencyProperty 0 shared static FontStyleProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59eb0 <<
047d7404 4000261 46c ...ependencyProperty 0 shared static FontStretchProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59ed8 <<
047d7404 4000262 470 ...ependencyProperty 0 shared static DefaultStyleKeyProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59eec <<
047d7404 4000263 474 ...ependencyProperty 0 shared static IsEnabledProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59f00 <<
04857f14 4000265 478 ... System.Windows]] 0 shared static _resourceDictionaryCache
>> Domain:Value 0433c738:NotInit 06f529d8:04f5cae4 <<
03cf5668 4000266 47c System.Object[] 0 shared static _controlDelgates
>> Domain:Value 0433c738:NotInit 06f529d8:04f59f14 <<
047d7404 4000501 77c ...ependencyProperty 0 shared static ContentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59cd0 <<
04852580 4000002 34 ...ows.Controls.Grid 0 instance 04f79770 LayoutRoot
04852a10 4000003 38 ...s.Controls.Button 0 instance 04f5b948 button
03d50f28 4000004 3c System.Boolean 1 instance 1 _contentLoaded上記の/ / 2行は、ページオブジェクトのbuttonオブジェクトです。
私たちは後でそれを参照するので、/ /そのアドレス04f5b948を覚えている
/ /我々はdumpheapコマンドを介してボタンオブジェクトに同じアドレスを取得することができます。
0:005>!dumpheap-mtを04852a10
アドレスMTのサイズ
04f5b948 04852a10 92
合計1のオブジェクト
統計:
MTカウントTotalSizeクラス名
04852a10 1 92 System.Windows.Controls.Button
合計1のオブジェクト
ないGCはまだありませんので、0:005>!gcwhere 04f5b948 / /ボタンは、gen0で
アドレス世代のヒープセグメントが割り当てられたサイズを始める
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をスキャン
/ /ドメインを参照する
DOMAIN(06F529D8):HANDLE(固定):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の詳細については、。// examine the button object itself
0:005> !do 04f5b948
Name: System.Windows.Controls.Button
MethodTable: 04852a10
EEClass: 0482e5f0
Size: 92(0x5c) bytes
File: c:\Program Files\Microsoft Silverlight\2.0.31005.0\System.Windows.dll
Fields:
MT Field Offset Type VT Attr Value Name
047d97a0 40000dc 4 ...al.NativeResource 0 instance 04f5bd58 m_nativePtr
04853ab8 40000df 8 ... System.Windows]] 0 instance 04f5c0bc _valueTable
047d9874 40000e0 c ...reTypeEventHelper 0 instance 04f5bd88 _coreTypeEventHelper
04856388 40000e3 10 ...bject, mscorlib]] 0 instance 04f5bee8 _treeChildren
047ae03c 40000e4 14 ...rnal.IManagedPeer 0 instance 04f79770 _treeParent
03d50a90 40000dd 2b0 System.IntPtr 1 shared static StaticNativePointer
>> Domain:Value 0433c738:NotInit 06f529d8:00000000 <<
03d50f28 40000de 2b4 System.Boolean 1 shared static _isCoreCreate
>> Domain:Value 0433c738:NotInit 06f529d8:0 <<
047ae384 40000e1 8 ....DependencyObject 0 shared static PropertyReferencesHolder
>> Domain:Value 0433c738:NotInit 06f529d8:04f489b8 <<
04661618 40000e2 c ...flection.Assembly 0 shared static _executingAssembly
>> Domain:Value 0433c738:NotInit 06f529d8:00000000 <<
047d0b90 40000f1 18 ...rs.AutomationPeer 0 instance 00000000 m_pAP
047d7404 40000e8 10 ...ependencyProperty 0 shared static OpacityProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a4a8 <<
047d7404 40000e9 14 ...ependencyProperty 0 shared static ClipProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a4d0 <<
047d7404 40000ea 18 ...ependencyProperty 0 shared static RenderTransformProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a4f8 <<
047d7404 40000eb 1c ...ependencyProperty 0 shared static OpacityMaskProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a50c <<
047d7404 40000ec 20 ...ependencyProperty 0 shared static RenderTransformOriginProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a534 <<
047d7404 40000ed 24 ...ependencyProperty 0 shared static IsHitTestVisibleProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a548 <<
047d7404 40000ee 28 ...ependencyProperty 0 shared static VisibilityProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a570 <<
047d7404 40000ef 2c ...ependencyProperty 0 shared static RenderSizeProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a598 <<
047d7404 40000f0 30 ...ependencyProperty 0 shared static UseLayoutRoundingProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a5ac <<
00000000 4000108 1c 0 instance 00000000 BindingValidationError
04856ae4 400010a 20 ...angedEventHandler 0 instance 00000000 DPChanged
048bc8a4 400010b 24 ...angedEventHandler 0 instance 00000000 DataContextChanged
03d50f28 400010c 2c System.Boolean 1 instance 0 _isDataContextBound
0481f43c 400010d 28 ...angedEventHandler 0 instance 00000000 _sizeChanged
047d7404 40000f2 34 ...ependencyProperty 0 shared static TriggersProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a144 <<
047d7404 40000f3 38 ...ependencyProperty 0 shared static ResourcesProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a158 <<
047d7404 40000f4 3c ...ependencyProperty 0 shared static LanguageProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a180 <<
047d7404 40000f5 40 ...ependencyProperty 0 shared static ActualWidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a194 <<
047d7404 40000f6 44 ...ependencyProperty 0 shared static ActualHeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1a8 <<
047d7404 40000f7 48 ...ependencyProperty 0 shared static WidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1bc <<
047d7404 40000f8 4c ...ependencyProperty 0 shared static HeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1d0 <<
047d7404 40000f9 50 ...ependencyProperty 0 shared static MinWidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1e4 <<
047d7404 40000fa 54 ...ependencyProperty 0 shared static MaxWidthProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a1f8 <<
047d7404 40000fb 58 ...ependencyProperty 0 shared static MinHeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a20c <<
047d7404 40000fc 5c ...ependencyProperty 0 shared static MaxHeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a220 <<
047d7404 40000fd 60 ...ependencyProperty 0 shared static HorizontalAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a234 <<
047d7404 40000fe 64 ...ependencyProperty 0 shared static VerticalAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a248 <<
047d7404 40000ff 68 ...ependencyProperty 0 shared static MarginProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a25c <<
047d7404 4000100 6c ...ependencyProperty 0 shared static StyleProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a284 <<
047d7404 4000101 70 ...ependencyProperty 0 shared static ParentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2ac <<
047d7404 4000102 74 ...ependencyProperty 0 shared static NameProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2c0 <<
047d7404 4000103 78 ...ependencyProperty 0 shared static TagProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2d4 <<
047d7404 4000104 7c ...ependencyProperty 0 shared static TagInternalProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a2fc <<
04851464 4000105 80 ...ndows.RoutedEvent 0 shared static LoadedEvent
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a420 <<
047d7404 4000106 84 ...ependencyProperty 0 shared static CursorProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a440 <<
047d7404 4000107 88 ...ependencyProperty 0 shared static InstanceDelegateStoreProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a468 <<
047d7404 4000109 8c ...ependencyProperty 0 shared static DataContextProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5a494 <<
047a1e2c 400010e 90 ...rence, mscorlib]] 0 shared static _staticDelegateList
>> Domain:Value 0433c738:NotInit 06f529d8:00000000 <<
00000000 4000264 30 ...angedEventHandler 0 instance 00000000 IsEnabledChanged
047d7404 4000252 430 ...ependencyProperty 0 shared static IsTabStopProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59ce4 <<
047d7404 4000253 434 ...ependencyProperty 0 shared static TabIndexProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59cf8 <<
047d7404 4000254 438 ...ependencyProperty 0 shared static TemplateProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d20 <<
047d7404 4000255 43c ...ependencyProperty 0 shared static TabNavigationProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d48 <<
047d7404 4000256 440 ...ependencyProperty 0 shared static PaddingProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d70 <<
047d7404 4000257 444 ...ependencyProperty 0 shared static HorizontalContentAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59d98 <<
047d7404 4000258 448 ...ependencyProperty 0 shared static VerticalContentAlignmentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59dc0 <<
047d7404 4000259 44c ...ependencyProperty 0 shared static BackgroundProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59de8 <<
047d7404 400025a 450 ...ependencyProperty 0 shared static BorderBrushProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59dfc <<
047d7404 400025b 454 ...ependencyProperty 0 shared static BorderThicknessProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e10 <<
047d7404 400025c 458 ...ependencyProperty 0 shared static FontSizeProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e24 <<
047d7404 400025d 45c ...ependencyProperty 0 shared static FontFamilyProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e4c <<
047d7404 400025e 460 ...ependencyProperty 0 shared static ForegroundProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e60 <<
047d7404 400025f 464 ...ependencyProperty 0 shared static FontWeightProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59e88 <<
047d7404 4000260 468 ...ependencyProperty 0 shared static FontStyleProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59eb0 <<
047d7404 4000261 46c ...ependencyProperty 0 shared static FontStretchProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59ed8 <<
047d7404 4000262 470 ...ependencyProperty 0 shared static DefaultStyleKeyProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59eec <<
047d7404 4000263 474 ...ependencyProperty 0 shared static IsEnabledProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f59f00 <<
04857f14 4000265 478 ... System.Windows]] 0 shared static _resourceDictionaryCache
>> Domain:Value 0433c738:NotInit 06f529d8:04f5cae4 <<
03cf5668 4000266 47c System.Object[] 0 shared static _controlDelgates
>> Domain:Value 0433c738:NotInit 06f529d8:04f59f14 <<
03cf44e8 40002b4 34 System.Object 0 instance 00000000 _treeContent
047d7404 40002b3 530 ...ependencyProperty 0 shared static ContentTemplateProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5bd30 <<
047d7404 40002b5 534 ...ependencyProperty 0 shared static ContentProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5bd44 <<
03d50f28 40005aa 40 System.Boolean 1 instance 1 _isLoaded
03d50f28 40005ab 41 System.Boolean 1 instance 1 _isMouseCaptured
03d50f28 40005ac 42 System.Boolean 1 instance 0 _isSpaceKeyDown
03d50f28 40005ad 43 System.Boolean 1 instance 0 _isMouseLeftButtonDown
04852208 40005ae 48 System.Windows.Point 1 instance 04f5b990 _mousePosition
048b5f98 40005af 38 ...mation.Storyboard 0 instance 00000000 _currentState
03d50f28 40005b0 44 System.Boolean 1 instance 0 _suspendStateChanges
0481fae0 40005b1 3c ...outedEventHandler 0 instance 04f5ca18 Click
047d7404 40005a6 7e0 ...ependencyProperty 0 shared static ClickModeProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5ba7c <<
047d7404 40005a7 7e4 ...ependencyProperty 0 shared static IsFocusedProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5bb38 <<
047d7404 40005a8 7e8 ...ependencyProperty 0 shared static IsMouseOverProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5bbd8 <<
047d7404 40005a9 7ec ...ependencyProperty 0 shared static IsPressedProperty
>> Domain:Value 0433c738:NotInit 06f529d8:04f5bc40 <<// dump button.Click field (9 lines above)
0:005> !do 04f5ca18
Name: System.Windows.RoutedEventHandler
MethodTable: 0481fae0
EEClass: 0482c99c
Size: 32(0x20) bytes
File: c:\Program Files\Microsoft Silverlight\2.0.31005.0\System.Windows.dll
Fields:
MT Field Offset Type VT Attr Value Name
03cf44e8 40001e0 4 System.Object 0 instance 04f59c78 _target
04663c58 40001e1 8 ...ection.MethodBase 0 instance 00000000 _methodBase
03d50a90 40001e2 c System.IntPtr 1 instance 463c08c _methodPtr
03d50a90 40001e3 10 System.IntPtr 1 instance 0 _methodPtrAux
03cf44e8 40001e4 14 System.Object 0 instance 00000000 _invocationList
03d50a90 40001e5 18 System.IntPtr 1 instance 0 _invocationCount0:005> !do -nofields 04f59c78 // verify _target is page
Name: SilverlightApplication1.Page
MethodTable: 04633a6c
EEClass: 0463196c
Size: 68(0x44) bytes
File: SilverlightApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null// verify _methodPtr points to Button_Click
// see how they are all linked together
0:005> ln 463c08c
(0463c08c) SilverlightApplication1.Page.Button_Click(System.Object, System.Windows.RoutedEventArgs)
0:005> u 463c08c // jit-ed method stub
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 add byte ptr [eax],al
0463c09a 0000 add byte ptr [eax],al
0463c09c 0000 add byte ptr [eax],al
0463c09e 0000 add byte ptr [eax],al
0463c0a0 0000 add byte ptr [eax],al
0:005> u eip // jit-ed native code
SilverlightApplication1!Button_Click:
04800398 55 push ebp
04800399 8bec mov ebp,esp
0480039b 83ec08 sub 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+0x1a (048003b2)
048003ad e8862a895f call coreclr!JIT_DbgIsJustMyCode (64092e38)
0:005> !ip2md 04800398
MethodDesc: 04633a30
Method Name: SilverlightApplication1.Page.Button_Click(System.Object, System.Windows.RoutedEventArgs)
Class: 0463196c
MethodTable: 04633a6c
mdToken: 06000008
Module: 046333b4
IsJitted: yes
CodeAddr: 04800398
0:005> !dumpil 04633a30
ilAddr = 047e03fe
IL_0000: nop
IL_0001: ret
When I have time, I may write a blog post on CLR internals, to demonstrate how objects are laid out in memory, how method calls are dispatched etc.
結論
This is a long post, but still it barely constitute an overview of WinDbg and SOS. Good understanding of CLR is important for coding and debugging, WinDbg with SOS is the best tool to explore CLR and do advanced debugging. Hope this short yet long post will help you get started in exploring CLR and Silverlight. ありがとう!








最近のコメント