Startseite > Debug , Silverlight > Silverlight-Debugging mit WinDbg und SOS

Silverlight-Debugging mit WinDbg und SOS

Einführung

In früheren Post Silverlight Debuggen mit Visual Studio habe ich gezeigt, dass Visual Studio ein leistungsfähiges und die bequemste Tool zum Debuggen von verwalteten Anwendungen ist. Aber für einige erweiterte Debugging-Szenarien, wie Speicherlecks, Deadlock, außer Kontrolle geratener Prozess / Thread, Kernel-Debugging und erweiterte Remote / crash / UI-Debugging etc, WinDbg (oder cdb, Ntsd, kd) wird in der Regel bevorzugt, wenn nicht die einzige Option.

Debugging Tools für Windows

Überblick

WinDbg ist Teil der Debugging Tools für Windows -Paket:

image_thumb5

Auch wenn WinDbg ist ein GUI-Programm, wird es meist als Kommandozeilen-Debugger wie (und oft mit) kd, CDB und Ntsd verwendet, und teilen die gleiche Debug Engine und Befehle. Es ist super leistungsstarke und erweiterbare, besonders gut für System-/ Low-Level-Debugging wie Treibern und anderen Komponenten des Betriebssystems geeignet. Es erfordert gute Kenntnisse der Hardware, Betriebssystem und Compiler an, die die meisten aus dem Toolset erhalten. Es ist eine große (oder perfekt ist, sollte ich sagen, :-) für natives Debugging, mit seinem umfangreichen und erweiterbaren Befehle und grafische Benutzeroberfläche. Managed Debugging-Support ist über SOS-Debug-Erweiterung, ist nicht annähernd so gut wie native Debugging, aber es gibt einen enormen Wert in der Lage, integrierte Debugging über verwaltete und systemeigene Grenze zu tun, und für Silverlight, ist es das einzige Werkzeug, ich bin mir bewusst, das kann nicht geladen werden SOS und integrierte Debugging.

Befehle

WinDbg / cdb / Ntsd / kd gibt es schon eine lange Zeit gewesen, so dass sie sehr gut dokumentiert. Es wird dringend empfohlen, dass Sie über Debugging Tools für Windows lesen Sie weiter microsoft.com und MSDN . Hier habe ich nur einen kurzen Überblick über seine Befehle, um Ihnen ein Gefühl und schnellen Nachschlagen. Alle Befehle mit Laufzeit Hilfe zu kommen (via |?. Hilfe |! Help [<cmd>] wie unten beschrieben), so dass ein Überblick ist in der Regel genug, um Ihre gestartet zu bekommen.

WinDbg hat drei Gruppen von Befehlen:

Standard Commands

Vor allem:

  • B *-Befehle zu setzen / löschen / Liste / Aktivieren / Deaktivieren von Haltepunkten auf Adresse oder den Zugang
  • D *-Kommandos in den Speicher (Stack / Heap, lokal / global Variablen und Parameter) zu untersuchen, E * Befehl zu modifizieren Speicher und S *, um Speicher zu suchen
  • K * Befehle zur Aufrufliste untersuchen
  • P, T, G *-Befehle zur Ablaufsteuerung

unten? Befehlsausgabe ist eine große Übersicht und häufige Hinweis für Leute mit WinDbg / cdb / Ntsd / KD:

0:006>?

Offene Debugger.chm für eine vollständige Dokumentation Debugger

B [C | D | E] [<bps>] - klar / deaktivieren / aktivieren Haltepunkt (e)
BL - Liste Haltepunkte
BA <access> <Größe> <addr> - Set Breakpoint-Prozessor
BP <Adresse> - gesetzt weichen Haltepunkt
D [Typ] [<range>] - Dump-Speicher
DT [-n | y] [[MOD] Name!] [[-N | y] Felder]
[Adresse] [-l-Liste] [-a [] | c | i | o | r [#] | v] - Dump mit Typinformationen
DV [<name>] - dump lokalen Variablen
E [Typ] <Adresse> [<values>] - geben Sie Speicher-Werte
G [H | N] [= <address> [<Adresse> ...]] - Suche
K <count> - Stacktrace
KP <count> - Stacktrace mit Quelle Argumente
LM [k | l | u | v] - Liste Module
LN <expr> - Liste nächste Symbole
P [= <addr>] [<Wert>] - Schritt über
Q - quit
R [[<reg> [= <expr>]]] - Blick oder einen Satz Register
S [<opts>] <range> <values> - Suche Speicher
SX [{e | d | i | n} [-c "CMD1"] [-C2 "CMD2"] [-h] {Exception | Ereignis | *}] - Event-Filter
T [= <address>] [<expr>] - Spur in
U [<range>] - unassemble
Version - Show Debuggee und Debugger-Version
X [<* | Modul>!] <* | Symbol> - Blick Symbole
? <expr> - Display Ausdruck
?? <expr> - Anzeige C + +-Ausdruck
$ << Filename> - nehmen Sie eine Eingabe von einem Befehl Datei

Drücken Sie Enter ...

<expr> unäre ops: + - nicht von WO dwo qwo poi hallo niedrig
Binär-ops: + - * / mod (%) und (&) XOR (^) oder (|)
Vergleiche: == (=) <> =
Operanden: Zahl in der aktuellen radix, öffentliches Symbol, <reg>
<type>: B (Byte), W (Wort), d [s] (Doppelwort [mit Symbolen]),
a (ASCII), C (DWORD und Char), u (Unicode), L (Liste)
f (float), D (doppelt), s | S (ASCII / Unicode-String)
q (Quadword)
<pattern>: [! (nt | <dll-name>)] <var-name> (? <var-name> können sein, *)
<range>: <Adresse> <Adresse>
: L <Adresse> <count>

User-Mode-Optionen aus:
~ - Liste Fäden Status
~ # S - Satz Standard-Thread
| - Liste Prozesse Status
| # S - Standard-Set-Prozess

x86-Optionen:
DG <selector> - dump-Selektor
<reg>: [e] ax, [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, der, df, wenn, TF, SF, ZF, AF, PF, CF
<addr>: # <16-Bit-Schutz-Modus [seg:] Adresse>,
& <V86-mode [seg:]address>

Offene Debugger.chm für eine vollständige Dokumentation Debugger

Meta-Befehle

Diejenigen, fangen mit einem Punkt, meist für anspruchsvolle Fehlerbehebung. Einige wichtige Befehle, die Sie kennen sollten:

  • . Und symfix. SYMPATH für den Einsatz von Server-Symbol
  • . Und srcfix. Srcpath für die Verwendung von Quellserver
  • . Last. Loadby,. Entladen,. Kette. Setdll für die Verwaltung von Debug-Erweiterungen
  • . Server. Fernbedienung für Remote-Debugging

Es lohnt sich Ihre Zeit, um sich mit Symbol-Server, Quell-und Remote-Debugging: sie wird Ihr Leben viel mehr einfacher. unten ist der Ausgang des help Befehl ausführen.:

0:006>. Hilfe
. Befehle ein:
. Verlassen - verlassen den aktuellen Prozess
. Allow_exec_cmds [0 | 1] - Kontrolle Ausführungsbefehle
. Allow_image_mapping [0 | 1] - Kontrolle On-Demand-Image-Datei-Mapping
. Apply_dbp [<Optionen>] - fügen die aktuellen Daten Haltepunkt Staates auf
registrieren Kontext
. Asm [<Optionen>] - gesetzt Demontage Optionen
. Asm-[<Optionen>] - klare Demontage Optionen
. Legen <proc> - legen, um bei der nächsten Ausführung <proc>
. Block {<commands>} - Klammern eine Reihe von Befehlen für verschachtelte Ausführung
. Bpsync [0 | 1] - spezielle Haltepunkt für Multithread-Verhalten debuggees
. Pause - Ausbruch aus dem umgebenden Schleife
. Breakin - Pause in KD
. Cache [<Optionen>] - virtuellen Speicher-Cache-Steuerung
. Anruf <Fn> (<arg1>, <arg2>, ...) - führen Sie eine Funktion in der Debuggee
. Catch {} <commands> - fangen Ausfälle in Befehle
. Kette - Liste aktuelle Erweiterungen
. Childdbg <0 | 1> - wiederum Kindprozess Debugging ein-oder ausschalten
. Kunden - Liste aktuell aktiven Kunden
. CloseHandle [<Optionen>] [<handle>] - schließen Sie die gegebenen Griff
. Weiter - Fortsetzung der umgebenden Schleife
. Copysym [<Optionen>] <Pfad> - Kopie aktuelle Symbol Dateien in ein Verzeichnis
. Erstellen <command line> - erstellen Sie einen neuen Prozess
. Createdir [<Optionen>] [<Pfad>] - Steuerungsprozess Schöpfung Optionen
. Cxr <Adresse> - dump Kontext Rekord an der angegebenen Adresse
k * danach gibt cxr Stapel
. Dbgdbg - einen Debugger auf die aktuelle Debugger
. Debug_sw_wow [0 | 1] - ermöglichen die Interaktion mit Software-Emulation WOW
. Lösen - lösen sich von den aktuellen Prozess / dump
. Dml_file <file> - Ausgang DML Inhalt aus der Datei
. Dml_flow <start> <addr> - Show Basisblock code flow
. Dml_start [<Optionen>] - schiffbar Überblick über Debugger-Aktivitäten
. Do {} <commands> (<cond>) - ausführen <commands> bis <cond> ist Null
. Treiber - Dieser Befehl wurde entfernt -. Use 'lm' oder reload-l)
. Dump [<Optionen>] <Dateiname> - schaffen eine Dump-Datei auf dem Host-System
. Dvalloc [<Optionen>] <bytes> - VirtualAlloc Speicher im Debuggee
. Dvfree [<Optionen>] <offset> <bytes> - VirtualFree Speicher im Debuggee
. Echo ["<string>" | <string>] - string
. Echolaufzeit - Ausgang Debugger Zeit
. Echotimestamps [0 | 1] - Toggle-Timestamp-Ausgang auf Ereignisse
. Ecxr - dump Kontext Rekord für aktuelle Ausnahme
. Effmach [<machine>] - ändern aktuellen Maschinentyp
.} Else {<commands> - if / then / else bedingte Ausführung
. Elsif (<cond>) {<commands>} [<else clauses>] - if / then / else bedingte
Ausführung
. Enable_long_status [0 | 1] - Dump-LONG-Typen in Standard-Basis
. Enable_unicode [0 | 1] - Dump USHORT Array / Pointer und Unicode-Strings
. Endsrv <id> - Deaktivieren Sie die gegebenen Motor-Server
. Endpsrv - verursachen der aktuellen Sitzung Remote-Server zu beenden
. Enumtag - enumerate markierten Daten verfügbar
. Event_code - Anzeige zwischengespeichert Veranstaltung Anweisungen
. Eventlog - Anzeige Protokoll der letzten Ereignisse
. Veranstaltungen - Anzeige und Auswahl von Veranstaltungen zur Verfügung
. Eventstr - zeigt alle Zeichenketten, die Veranstaltung Debuggee registriert
. Exepath [<dir> [, ...]] - set ausführbare Suchpfad
. Exepath + [<dir> [, ...]] - append ausführbare Suchpfad
. Expr - Kontrolle Ausdrucksauswertung
. Exptr <Adresse> -. Tun EXR und CXR für EXCEPTION_POINTERS.
. EXR <Adresse> - dump Ausnahme Rekord an der angegebenen Adresse
. Extmatch [<opts>] <pattern> - zeigt alle Erweiterungen passende Muster
. ExtPath <opts> [<dir> [, ...]] - set-Erweiterung Suchpfad
. ExtPath + <opts> [<dir> [, ...]] - append Erweiterung Suchpfad
. F + - Set aktuellen Stack-Frame, um Anrufer der aktuellen Frame
. F-- gesetzt aktuellen Stack-Frame auf der aktuellen Frame Angerufenen
. Faser <Adresse> - setzt Kontext der Faser an der Adresse
Kontext setzt, wenn keine Adresse angegeben
. Fiximports <pattern> - Versuche, die Einfuhr für Bilder zu verlinken
. Fnent <Adresse> - Dump Funktion Eintrag für den angegebenen Code-Adresse
. Fnret <fnaddr> [<retval>] - Anzeige formatiert Rückgabewert
. Für (<init>; <cond>; <step>) {} <commands> - execute <commands> und
<step> bis <cond> ist
Null
. Force_radix_output [0 | 1] - Dump-Integer-Typen in Standard-Basis
. Force_system_init [<Optionen>] - Kraft anhängig Systeme zu initialisieren, wenn möglich
. Force_tb - gewaltsam erlauben Filiale Tracing
. Foreach [setzt] (<alias> <tcmds> {}) {} <ecmds> - execute <ecmds> für
jedes Token in die
Ausgang des <tcmds>
. FPO <options> - Steuerelement überschrieben FPO Informationen
. Frame [<frame>] - gesetzt aktuellen Stack-Frame für Einheimische
. Formate <expr> - Displays Ergebnis des Ausdrucks in vielen Formaten
. Hilfe [<Optionen>] - diese Hilfe
. Holdmem <options> [Bereich] - halten und vergleichen Speicherdaten
. If (<cond>) {<commands>} [<else clauses>] - if / then / else bedingte
Ausführung
. Ignore_missing_pages [0 | 1] - Control Kernel-Dump Zusammenfassung fehlt
Seite Fehlermeldung
. Imgscan <options> - Scan-Speicher für PE-Abbilder
. Jdinfo <jdi_addr> - interpretieren AeDebug Informationen
. Kframes <count> - Satz Standard-Stack-Trace-Tiefe
. Töten - töten den aktuellen Prozess
. Lastevent - die zuletzt aufgetretenen Ereignisses
. Verlassen - Beenden des umschließenden fangen.
. Linien - Toggle Liniensymbol Laden
. Last <name> - stell 'das Erweiterungs-DLL zur Verlängerungskette
. Loadby <name> <mod> - fügen Sie die Erweiterungs-DLL in das Modul
Verzeichnis der Verlängerungskette
. Locale [<locale>] - Das aktuelle Gebietsschema
. Logfile - Anzeige Status-Log
. Logopen [<Datei>] - eröffnen neue Log-Datei
. Logappend [<Datei>] - An Datei anhängen anmelden
. Logclose - in der Nähe Protokolldatei
. Netsyms [0 | 1] - erlauben / verbieten net Symbolpfade
. NetUSE [<Optionen>] - Netzwerk-Verbindungen verwalten
. Noshell - disable-Shell-Befehle
. Noversion - disable Erweiterung Versionsprüfung
. Ofilter <pattern> - Filter Debuggee Ausgang gegen die vorgegebenen Muster
. Ocommand <prefix> - Genuss-Ausgang mit dem angegebenen Präfix als Befehl
. Opendump <file> - öffnen Sie eine Dump-Datei
. Outmask <mask> - gesetzten Bits in der aktuellen Ausgabe Maske
. Outmask-<mask> - klar Bits in der aktuellen Ausgabe Maske
. PCMD [<Optionen>] - Steuerung per-Prompt Befehl
. Pop [<Optionen>] - Pop-Zustand
. Prefer_dml [0 | 1] - Kontrolle DML-Modus standardmäßig
. Printf "<format>", <args…> - formatierte Ausgabe
. Prozess [<Adresse>] - setzt implizite Verfahren
setzt Verzug, wenn keine Adresse angegeben
. Prompt_allow [<Optionen>] - steuern, welche Informationen angezeigt werden können
an der Eingabeaufforderung
. Push [<Optionen>] - Push-Status
. Quit_lock [<Optionen>] - Schlösser Sitzung gegen unerwartet beendet
. Readmem <file> <range> - read raw-Speicher aus einer Datei
. Record_branches [0 | 1] - Kontrollen Aufzeichnung von Prozessor-Verzweigung
. Reload [<image.ext> [= <Adresse>, <Größe>]] - reload Symbole
. Starten - verlangen eine Sitzung starten
. Remote <pipename> - Start remote.exe Server
. Sichere [0 | 1] - verbieten Operationen gefährlich für den Host
. Send_file <options> - Senden von Dateien an Remote-Server
. Server <options> - Motor starten Server
. Server - Liste aktiv Remoting-Server
. Setdll <name> - Debugger für Erweiterungen in dieser DLL erstes suchen
. Shell [<command>] - Befehl ausführen
. Show_read_failures [<opts>] - zusätzliche Kontrolle Lesefehler Ausgang
. Show_sym_failures [<opts>] - Kontrolle zusätzliches Symbol Ausfall Ausgang
. Schlaf <Millisekunden> - Debugger schläft gegebene Dauer
praktisch, wenn es Zugang zu einer Maschine, die ist in der
gebrochen auf einer Ntsd-d
. Srcfix [<Pfad extra>] - fix Quelle Suchpfad
. Srcfix + [<Pfad extra>] - append festen Quelle Suchpfad
. Srcnoisy [0 | 1] - Kontrolle verbose Quelle Ladeleistung
. Srcpath [<dir> [, ...]] - set Quelle Suchpfad
. Srcpath + [<dir> [, ...]] - append Quelle Suchpfad
. Step_filter [<opts>] ["<pattern> [; <pattern> ...]"] - Symbol Set-Muster
zu überspringen beim Einsteigen
. Symfix [<localsym>] - fix Symbol Suchpfad
. Symfix + [<localsym>] - append festen Symbol Suchpfad
. Symopt <flags> - set symbol Optionen
. Symopt + <flags> - set symbol Optionen
. Symopt-<flags> - deutliches Symbol Optionen
. SYMPATH [<dir> [, ...]] - set symbol Suchpfad
. SYMPATH + [<dir> [, ...]] - append Symbol Suchpfad
. Thread [<Adresse>] - Sets Rahmen der Faden an der Adresse
setzt Standardkontext wenn keine Adresse angegeben
. Zeit - zeigt Sitzungszeit Informationen
. TTime - zeigt Faden Zeitinformation
. Tlist - Liste laufender Prozesse
. Typeopt <flags> - set / clear-Optionen
. Entladen <name> - entfernen Sie diese Erweiterungs-DLL aus der Liste der Erweiterungs-DLLs
. Unloadall - entfernen Sie alle Erweiterungs-DLLs aus der Liste der Erweiterungen DLLs
. Wake - aufwecken sleep'ing Debugger.
. While (<cond>) {} <commands> - execute <commands> während <cond> ist nicht Null
. Writemem <file> <range> - write raw-Speicher in eine Datei

Verwenden Sie ". Hh <command>" oder offene Debugger.chm in der Debugger-Verzeichnis zu bekommen
ausführliche Dokumentation zu einem Befehl.

Erweiterungs-Befehle

Die Anfahrt mit!, In der Regel für einen bestimmten Bereich, wie SOS-Erweiterung Befehle für verwaltete Debuggen. Sie können! <ext>. Helfen, um Befehle von einer Erweiterung aufzulisten, möchten! Exts.help. Für fortgeschrittene System-Debugging, wie die Erfassung von Speicherlecks, Deadlock etc, müssen Sie sehr vertraut sein mit diesen Befehlen Erweiterung.

SOS

Überblick

SOS ist die Abkürzung für Son of Strike (fragt mich nicht warum), eine Debug-Erweiterung für verwaltete Debuggen. Ich glaube, es von CLR-Team für die CLR-Debuggen erfunden wurde, so hat es etwa für eine lange Zeit gewesen, und es gibt viele gute Informationen im Internet. Einige empfohlene Literatur:

Jede Version der CLR verfügt über eine eigene SOS (NET Framework 3.5 verwendet immer noch CLR 2.0 und Silverlight verfügt über eine eigene CLR.):

Verzeichnis von C: \ Programme \ Debugging Tools for Windows \ clr10
2007.09.19 07.01 948.784 SOS.dll
1 Datei (en) 948.784 Bytes

Verzeichnis von C: \ Program Files \ Microsoft Silverlight \ 2.0.31005.0
2008.10.05 02.16 Uhr 495.424 SOS.dll
1 Datei (en) 495.424 Bytes

Verzeichnis von C: \ Windows \ Microsoft.NET \ Framework \ v1.1.4322
2004.07.15 00.35 Uhr 319.488 SOS.dll
1 Datei (en) 319.488 Bytes

Verzeichnis von C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727
2008.07.27 10:03 392184 SOS.dll
1 Datei (en) 392.184 Bytes


Befehle

SOS Laufzeit Hilfe ist so groß, dass man fast benötigen keine andere doc anderes als ein paar try and error und einige Frustration :-)

0:016>! Hilfe
---------------------------
SOS ist ein Debugger-Erweiterungs-DLL entwickelt, um in das Debuggen von verwalteten helfen
Programmen. Funktionen sind nach Kategorien aufgelistet, dann etwa in der Reihenfolge der
Bedeutung. Shortcut-Namen für beliebte Funktionen sind in Klammern aufgeführt.
Geben Sie "! Hilfe <Funktionsname>" für detaillierte Informationen über diese Funktion.

Object-Code Inspection Untersuchen und Stacks
--------------------
DumpObj (do) Themen
DumpArray (da) CLRStack
DumpStackObjects (DSO) IP2MD
DumpHeap U
DumpVC DumpStack
GCRoot EEStack
ObjSize GCInfo
FinalizeQueue EHInfo abrufen
PrintException (PE) COMState
TraverseHeap BPMD

Untersuchen CLR-Datenstrukturen Diagnostic Utilities
--------------------
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)

Die Untersuchung der GC Geschichte Andere
--------------------
HistInit FAQ
HistStats
HistRoot
HistObj
HistObjFind
HistClear

Debug Probe Demonstration

Ich verwende das gleiche einfachste Silverlight-Anwendung in früheren Post ( Silverlight Debuggen mit Visual Studio ) zu demonstrieren, Debugging mit WinDbg SOS:

image_thumb

Hier ist die Debug-Protokoll mit meinen Anmerkungen (beginnen mit / /):

/ / Einrichten Symbol Pfad zum Symbol Server verwenden
0:013>. SYMPATH
Symbol Suchpfad ist: <leer>
0:013> symfix C:. \ Users \ ningz \ AppData \ Local \ Temp \ Symbols
0:013>. SYMPATH
Symbol Suchpfad ist: SRV * C: \ Users \ ningz \ AppData \ Local \ Temp \ Symbols \ * \ Symbols \ Symbole

/ / Füge PDB-Pfad für die Anwendung gedebuggt
0:013> SYMPATH +. "C: \ Users \ ningz \ Documents \ Visual Studio 2008 \ Projects \ SilverlightApplication1 \ SilverlightApplication1 \ Bin \ Debug"
Symbol Suchpfad ist: SRV * C: \ Users \ ningz \ AppData \ Local \ Temp \ Symbols *
http://msdl.microsoft.com/download/symbols;
C: \ Users \ ningz \ Documents \ Visual Studio 2008 \ Projects \ SilverlightApplication1 \ SilverlightApplication1 \ Bin \ Debug

/ / Laden alle Symbole
0:013>. Reload
Nachladen von aktuellen Module

/ / Einrichten Quellpfad zu Quelle-Server verwenden
0:013>. Srcpath
Quelle Suchpfad ist: <leer>
0:013>. Srcfix
Quelle Suchpfad ist: SRV *
0:013> srcpath +. "C: \ Users \ ningz \ Documents \ Visual Studio 2008 \ Projects \ SilverlightApplication1 \ SilverlightApplication1"
Quelle Suchpfad ist: SRV * C: \ Users \ ningz \ Documents \ Visual Studio 2008 \ Projects \ SilverlightApplication1 \ SilverlightApplication1

/ / Laden SOS. Bitte beachten Sie:
/ / 1. es scheint mscorwks mit CoreCLR in Silverlight wird ersetzt
/ / 2. . statt loadby, können Sie auch Last. "C: \ Program Files \ Microsoft Silverlight \ 2.0.31005.0 \ SOS.dll"
0:013>. Loadby SOS CoreCLR
Loaded C: \ Program Files \ Microsoft Silverlight \ 2.0.31005.0 \ SOS-Erweiterungs-DLL

/ / Einen Haltepunkt für Button Click-Ereignishandler
0:013>! BPMD SilverlightApplication1 SilverlightApplication1.Page.Button_Click
Gefunden 1 Methoden ...
MethodDesc = 03983a30
Hinzufügen anhängig Haltepunkte ...
0:013> bl
0 e 0428215b 0001 (0001) 0: ****
0:013> g
Modload: 70800000 7080c000 C: Windowssystem32dwmapi.dll

/ / Auf die Schaltfläche klicken und brechen in windbg
Breakpoint 0 Treffer
*** WARNUNG: Kann Prüfsumme für SilverlightApplication1.dll überprüfen
! SilverlightApplication1 Button_Click:
04850398 55 push ebp
Integriertes Managed Debugging unterstützt keine Aufzählung von lokalen Variablen.
Siehe http://dbg/managed.htm für weitere Details.
Managed Rahmen ist fehlgeschlagen, HRESULT 0x80004005

/ / Vergleichen! Threads und ~ * Ausgang
0:005>! Fäden / / Liste verwalteten Threads nur
ThreadCount: 3
UnstartedThread: 0
BackgroundThread: 3
PendingThread: 0
DeadThread: 0
Hosted Laufzeit: ja
PreEmptive GC Alloc-Lock
ID OSID ThreadOBJ Staat GC Context Domain Count APT Exception
5 1 1b08 043576e0 220 Disabled 04f9f214: 04f9ffe8 06f529d8 0 STA
9 2 928 043689c8 B220 Aktiviert 00000000:00000000 0433c738 0 MTA (Finalizer)
10 3 1e8c 06f509d0 1220 Enabled 00000000:00000000 0433c738 0 UKn
0:005> ~ * / / Liste alle Threads
0 Art.-Nr.: 162c.1a28 Suspend: 1 Teb: 7ffde000 aufgetaut
Start: iexplore wWinMainCRTStartup (00a52d79)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
2 ID: 162c.1020 Suspend: 1 Teb: 7ffdc000 aufgetaut
Start:! :: Ole32 CRpcThreadCache RpcWorkerThreadEntry (76dfe0cc)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
3 ID: 162c.1e00 Suspend: 1 Teb: 7ffda000 aufgetaut
Start:! Ntdll TppWaiterpThread (778ab61b)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
4 ID: 162c.1f00 Suspend: 1 Teb: 7ffd9000 aufgetaut
Start:! Msvcrt _endthreadex 0 x6f (76162da8)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
. 5 ID: 162c.1b08 Suspend: 1 Teb: 7ffd8000 aufgetaut
Start:! :: IEFrame CTabWindow _TabWindowThreadProc (6c163fdb)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
7 ID: 162c.170 Suspend: 1 Teb: 7ffd6000 aufgetaut
Start:! :: Npctrl CXcpDispatcher DispatcherTimerCallback (6a6d16f4)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
8 ID: 162c.1cd0 Suspend: 1 Teb: 7ffd5000 aufgetaut
Start:! :: CoreCLR DebuggerRCThread ThreadProcStatic (640eb5cd)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
9 ID: 162c.928 Suspend: 1 Teb: 7ffd4000 aufgetaut
Start:! :: Thema CoreCLR intermediateThreadProc (63fb8e4f)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
10 ID: 162c.1e8c Suspend: 1 Teb: 7ffd3000 aufgetaut
Start:! :: Thema CoreCLR intermediateThreadProc (63fb8e4f)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
11 Id: 162c.1fac Suspend: 1 Teb: 7ffaf000 aufgetaut
Start:! :: Agcore CMulticoreTaskScheduler WorkerThread (660547de)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
12 ID: 162c.1b78 Suspend: 1 Teb: 7ffae000 aufgetaut
Start:! :: Agcore CMulticoreTaskScheduler WorkerThread (660547de)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
13 Id: 162c.1d18 Suspend: 1 Teb: 7ffdb000 aufgetaut
Start:! Ntdll RtlUserThreadStart (778c9a78)
Priorität: 0 Prioritätsklasse: 32 Affinity: 3
Managed Rahmen ist fehlgeschlagen, HRESULT 0x80004005
Integriertes Managed Debugging unterstützt keine Aufzählung von lokalen Variablen.
Siehe http://dbg/managed.htm für weitere Details.

/ / Vergleichen! Clrstack & k-Ausgang
0:005>! Clrstack-p / / Liste verwaltet Stack-Frames nur
OS Thread-ID: 0x1b08 (5)
ESP EIP
0450f850 04800398 SilverlightApplication1.Page.Button_Click (System.Object, System.Windows.RoutedEventArgs)
PARAMETER:
diese (<CLR reg>) = 0x04f59c78
Absender (<CLR reg>) = 0x04f5b948
e (0x0450f854) = 0x04f9f1f0

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

0450f870 048cdd10 System.Windows.Controls.Button.OnClick ()
PARAMETER:
dies = <no Daten>

0450f880 048cdc3d
PARAMETER:
diese (0x0450f884) = 0x04f5b948
e (0x0450f880) = 0x04f9f188

0450f890 048cdba1 System.Windows.Controls.Control.OnMouseLeftButtonUp (System.Windows.Controls.Control, System.EventArgs)
PARAMETER:
Strg = <no Daten>
e = <no Daten>

0450f8a0 0483a0e7 MS.Internal.JoltHelper.FireEvent (IntPtr, IntPtr, Int32, System.String)
PARAMETER:
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 / / Liste alle Stack-Frames
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
WARNUNG: Frame-IP nicht in jedem Modul bekannt. Folgende Frames sind möglicherweise falsch.
0450fc10 6607e0db 0x4c513d2
0450fc70 6a6dc1fc agcore! CCoreServices :: 0 CLR_FireEvent X183
Managed Rahmen ist fehlgeschlagen, 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

/ / Heap untersuchen, beachten Sie den Komfort stark typisierte Objekt Haufen,
/ / Anstelle von nicht typisiert Bytes als im systemeigenen Heap
0:005>! Dumpheap-Typ SilverlightApplication1
Anschrift MT Größe
04f4f31c 046336b0 36
04f59c78 04633a6c 68
insgesamt 2 Objekten
Statistik:
MT Graf TotalSize Class Name
046336b0 1 36 SilverlightApplication1.App
04633a6c 1 68 SilverlightApplication1.Page
Insgesamt 2 Objekte
0:005>! Tun 04f59c78
Name: SilverlightApplication1.Page
MethodTable: 04633a6c
EEClass: 0463196c
Größe: 68 (0x44) Bytes
Datei: SilverlightApplication1, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null
Felder:
MT Feld Offset Typ VT Attr Wert Name
047d97a0 40000dc 4 ... al.NativeResource 0 Beispiel 04f5a5c0 m_nativePtr
04853ab8 40000df 8 ... System.Windows]] 0 Beispiel 00000000 _valueTable
047d9874 40000e0 c ... reTypeEventHelper 0 Beispiel 04f5a600 _coreTypeEventHelper
04856388 40000e3 10 ... hnische, mscorlib]] 0 Beispiel 04f79a58 _treeChildren
047ae03c 40000e4 14 ... rnal.IManagedPeer 0 Beispiel 00000000 _treeParent
03d50a90 40000dd 2B0 System.IntPtr 1 Gemeinsam statisch StaticNativePointer
>> Domain: Wert 0433c738: NotInit 06f529d8: 00000000 <<
03d50f28 40000de 2B4 System.Boolean 1 gemeinsames statische _isCoreCreate
>> Domain: Wert 0433c738: NotInit 06f529d8: 0 <<
047ae384 40000e1 8 .... 0 DependencyObject Gemeinsam statisch PropertyReferencesHolder
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f489b8 <<
04661618 40000e2 c ... flection.Assembly 0 Gemeinsam statisch _executingAssembly
>> Domain: Wert 0433c738: NotInit 06f529d8: 00000000 <<
047d0b90 40000f1 18 ... rs.AutomationPeer 0 Beispiel 00000000 m_pAP
047d7404 40000e8 10 ... 0 ependencyProperty Gemeinsam statisch OpacityProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a4a8 <<
047d7404 40000e9 14 ... 0 ependencyProperty Gemeinsam statisch ClipProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a4d0 <<
047d7404 40000ea 18 ... 0 ependencyProperty Gemeinsam statisch RenderTransformProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a4f8 <<
047d7404 40000eb 1c ... ependencyProperty 0 Gemeinsam statisch OpacityMaskProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a50c <<
047d7404 40000ec 20 ... 0 ependencyProperty Gemeinsam statisch RenderTransformOriginProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a534 <<
047d7404 40000ed 24 ... 0 ependencyProperty Gemeinsam statisch IsHitTestVisibleProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a548 <<
047d7404 40000ee 28 ... 0 ependencyProperty Gemeinsam statisch VisibilityProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a570 <<
047d7404 40000ef 2c ... ependencyProperty 0 Gemeinsam statisch RenderSizeProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a598 <<
047d7404 40000f0 30 ... 0 ependencyProperty Gemeinsam statisch UseLayoutRoundingProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a5ac <<
00000000 4000108 0 Beispiel 1c 00000000 BindingValidationError
04856ae4 400010a 20 ... angedEventHandler 0 Beispiel 00000000 DPChanged
048bc8a4 400010b 24 ... angedEventHandler 0 Beispiel 00000000 DataContextChanged
03d50f28 400010c 2c System.Boolean 1 Instanz 0 _isDataContextBound
0481f43c 400010d 28 ... angedEventHandler 0 Beispiel 00000000 _sizeChanged
047d7404 40000f2 34 ... 0 ependencyProperty Gemeinsam statisch TriggersProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a144 <<
047d7404 40000f3 38 ... 0 ependencyProperty Gemeinsam statisch ResourcesProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a158 <<
047d7404 40000f4 3c ... ependencyProperty 0 Gemeinsam statisch LanguageProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a180 <<
047d7404 40000f5 40 ... 0 ependencyProperty Gemeinsam statisch ActualWidthProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a194 <<
047d7404 40000f6 44 ... 0 ependencyProperty Gemeinsam statisch ActualHeightProperty
>> Domain: Wert 0433c738: NotInit 06f529d8: 04f5a1a8 <<
047d7404 40000f7 48 ... 0 ependencyProperty Gemeinsam statisch 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 <<
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

/ / Zwei Zeilen über das Button-Objekt auf der Seite Objekt
/ / Die Adresse erinnern 04f5b948, da wir, um es später beziehen werden
/ / Können wir die gleiche Adresse für das Button-Objekt über dumpheap Befehl bekommen:
0:005>! Dumpheap-mt 04852a10
Anschrift MT Größe
04f5b948 04852a10 92
insgesamt 1 Objekten
Statistik:
MT Graf TotalSize Class Name
04852a10 1 92 System.Windows.Controls.Button
Insgesamt 1 Objekte
0:005>! Gcwhere 04f5b948 Taste / / belegt in Gen0, da es keine GC Noch
Adresse Gen Heap-Segment beginnen zugewiesene Größe
04f5b948 0 0 04f40000 04f41000 04f9fff4 0x5c (92)
0:005>! Gcroot 04f5b948 / / sehen, wer hält Verweis auf das Button-Objekt
Hinweis: Roots auf Stapel gefunden werden False Positives sein. Run "! Helfen gcroot" für
mehr Info.
/ / Registrierung Referenzen
ECX: Root: 04f59c78 (SilverlightApplication1.Page) ->
04f5b948 (System.Windows.Controls.Button) ->
EDX: Root: 04f5b948 (System.Windows.Controls.Button) ->
/ / Stack-Referenzen
Scan-Thread 5 OSTHread 1b08
ESP: 450f860: Root: 04f5ca18 (System.Windows.RoutedEventHandler) ->
04f59c78 (SilverlightApplication1.Page) ->
04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f864: Root: 04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f874: Root: 04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f884: Root: 04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f894: Root: 04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f8d4: Root: 04f5b948 (System.Windows.Controls.Button) ->
ESP: 450f8e4: Root: 04f5b948 (System.Windows.Controls.Button) ->
Scan-Thread 9 OSTHread 928
Scan-Thread 10 OSTHread 1e8c
/ / Domain-Referenzen
DOMAIN (06F529D8): HANDLE (gemerkt): 46412f8: Root: 05f44260 (System.Object []) ->
04f45234 (System.Collections.Generic.List `1 [[System.Object, mscorlib]]) ->
04f59980 (System.Object []) ->
04f59c78 (SilverlightApplication1.Page) ->
04f5b948 (System.Windows.Controls.Button) ->
Managed Rahmen ist fehlgeschlagen, HRESULT 0x80004005
Integriertes Managed Debugging unterstützt keine Aufzählung von lokalen Variablen.
Siehe http://dbg/managed.htm für weitere Details.

// 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
Felder:
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
Felder:
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 _invocationCount

0: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.

Abschluss

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. Vielen Dank!

Technorati Tags: , , , ,
Categories: Debug , Silverlight Tags: , , ,
  1. Noch keine Kommentare.
  1. Bisher keine Trackbacks.