2.2.3.9
Disassembling Instructions ................................
2–21
2.2.3.10
Displaying Remote Exported Entries .................... 2–21
2.2.3.11
Displaying the File Table ..................................
2–21
2.2.3.12
Displaying the udb and tcb Tables ........................ 2–22
2.2.3.13
Performing Commands on Lists .......................... 2–22
2.2.3.14
Displaying the lockstats Structures ...................... 2–24
2.2.3.15
Displaying lockinfo Structures ............................ 2–25
2.2.3.16
Displaying the Mount Table ............................... 2–26
2.2.3.17
Displaying the Namecache Structures ................... 2–27
2.2.3.18
Displaying Processes’ Open Files ......................... 2–27
2.2.3.19
Converting the Contents of Memory to Symbols ....... 2–28
2.2.3.20
Displaying the Process Control Block for a Thread .... 2–28
2.2.3.21
Formatting Command Arguments ........................ 2–28
2.2.3.22
Displaying the Process Table .............................. 2–29
2.2.3.23
Converting an Address to a Procedure name ........... 2–30
2.2.3.24
Displaying Sockets from the File Table .................. 2–30
2.2.3.25
Displaying a Summary of the System Information .... 2–30
2.2.3.26
Displaying a Summary of Swap Space ................... 2–31
2.2.3.27
Displaying the Task Table ................................. 2–31
2.2.3.28
Displaying Information About Threads .................. 2–32
2.2.3.29
Displaying a Stack Trace of Threads ..................... 2–32
2.2.3.30
Displaying a u Structure ................................... 2–33
2.2.3.31
Displaying References to the ucred Structure .......... 2–34
2.2.3.32
Removing Aliases ............................................
2–36
2.2.3.33
Displaying the vnode Table ................................ 2–36
2.3
The kdebug Debugger ................................................
2–37
2.3.1
Getting Ready to Use the kdebug Debugger ................. 2–39
2.3.2
Invoking the kdebug Debugger ................................ 2–41
2.3.3
Diagnosing kdebug Setup Problems ........................... 2–42
2.3.4
Notes on Using the kdebug Debugger ........................ 2–44
2.4
The crashdc Utility ................................................... 2–44
3 Writing Extensions to the kdbx Debugger
3.1
Basic Considerations for Writing Extensions ..................... 3–1
3.2
Standard kdbx Library Functions .................................. 3–2
3.2.1
Special kdbx Extension Data Types ........................... 3–2
3.2.2
Converting an Address to a Procedure Name ............... 3–3
3.2.3
Getting a Representation of an Array Element ............. 3–4
3.2.4
Retrieving an Array Element Value ........................... 3–4
3.2.5
Returning the Size of an Array ................................ 3–6
3.2.6
Casting a Pointer to a Data Structure ........................ 3–6
iv Contents