Book description
Use Windows debuggers throughout the development cycle—and build better software
Rethink your use of Windows debugging and tracing tools—and learn how to make them a key part of test-driven software development. Led by a member of the Windows Fundamentals Team at Microsoft, you’ll apply expert debugging and tracing techniques—and sharpen your C++ and C# code analysis skills—through practical examples and common scenarios. Learn why experienced developers use debuggers in every step of the development process, and not just when bugs appear.
Discover how to:
Go behind the scenes to examine how powerful Windows debuggers work
Catch bugs early in the development cycle with static and runtime analysis tools
Gain practical strategies to tackle the most common code defects
Apply expert tricks to handle user-mode and kernel-mode debugging tasks
Implement postmortem techniques such as JIT and dump debugging
Debug the concurrency and security aspects of your software
Use debuggers to analyze interactions between your code and the operating system
Analyze software behavior with Xperf and the Event Tracing for Windows (ETW) framework
Table of contents
- Inside Windows® Debugging
- Table of Contents
- Foreword
- Introduction
- 1. A Bit of Background
-
2. Debugging for Fun and Profit
-
2. Getting Started
- Introducing the Debugging Tools
-
User-Mode Debugging
- Debugging Your First Program with WinDbg
- Listing the Values of Local Variables and Function Parameters
- Source-Level Debugging in WinDbg
- Symbol Files, Servers, and Local Caches
- Caching Symbols Offline for WinDbg
- Troubleshooting Symbol Resolution Issues in WinDbg
- Name Decoration Considerations
- Getting Help for WinDbg Commands
-
Kernel-Mode Debugging
- Your First (Live) Kernel Debugging Session
- Setting Up a Kernel-Mode Debugging Environment Using Physical Machines
- Setting Up a Kernel-Mode Debugging Environment Using Virtual Machines
- Diagnosing Host/Target Communication Issues
- Understanding the KD Break-in Sequence
- Controlling the Target in the Kernel Debugger
- Setting Code Breakpoints in the Kernel Debugger
- Getting Help for WinDbg Kernel Debugging Commands
- Summary
- 3. How Windows Debuggers Work
- 4. Postmortem Debugging
-
5. Beyond the Basics
- Noninvasive Debugging
-
Data Breakpoints
- Deep Inside User-Mode and Kernel-Mode Data Breakpoints
- Clearing Kernel-Mode Data Breakpoints
- Execution Data Breakpoints vs. Code Breakpoints
- User-Mode Debugger Data Breakpoints in Action: C++ Global Objects and the C Runtime Library
- Kernel-Mode Debugger Data Breakpoints in Action: Waiting for a Process to Exit
- Advanced Example: Who Is Changing a Registry Value?
- Scripting the Debugger
- WOW64 Debugging
- Windows Debugging Hooks (GFLAGS)
- Summary
- 6. Code Analysis Tools
-
7. Expert Debugging Tricks
- Essential Tricks
- More Useful Tricks
- Kernel-Mode Debugging Tricks
- Summary
- 8. Common Debugging Scenarios, Part 1
- 9. Common Debugging Scenarios, Part 2
- 10. Debugging System Internals
-
2. Getting Started
-
3. Observing and Analyzing Software Behavior
- 11. Introducing Xperf
- 12. Inside ETW
- 13. Common Tracing Scenarios
-
A. WinDbg User-Mode Debugging Quick Start
- Starting a User-Mode Debugging Session
- Fixing the Symbols Path
- Fixing the Sources Path
- Displaying the Command Line of the Target Process
- Control Flow Commands
- Listing Loaded Modules and Their Version
- Resolving Function Addresses
- Setting Code (Software) Breakpoints
- Setting Data (Hardware) Breakpoints
- Switching Between Threads
- Displaying Call Stacks
- Displaying Function Parameters
- Displaying Local Variables
- Displaying Data Members of Native Types
- Navigating Between Call Frames
- Listing Function Disassembly
- Displaying and Modifying Memory and Register Values
- Ending a User-Mode Debugging Session
-
B. WinDbg Kernel-Mode Debugging Quick Start
- Starting a Kernel-Mode Debugging Session
- Switching Between CPU Contexts
- Displaying Process Information
- Displaying Thread Information
- Switching Process and Thread Contexts
- Listing Loaded Modules and Their Version
- Setting Code (Software) Breakpoints Inside Kernel-Mode Code
- Setting Code (Software) Breakpoints Inside User-Mode Code
- Setting Data (Hardware) Breakpoints
- Ending a Kernel-Mode Debugging Session
- Index
- About the Author
- Copyright
Product information
- Title: Inside Windows® Debugging
- Author(s):
- Release date: May 2012
- Publisher(s): Microsoft Press
- ISBN: 9780735671348
You might also like
book
Debugging ASP.NET
Debugging ASP.NET focuses on the various tools, techniques, and best practices associated with debugging ASP.NET web …
book
Beginning C# 7 Programming with Visual Studio 2017
Easily get started programming using the ultra-versatile C# 7 and Visual Studio 2017 Beginning C# 7 …
book
.NET Common Language Runtime Unleashed
The .NET Framework provides a runtime environment called the Common Language Runtime, which manages the execution …
book
Advanced .NET Debugging
“Mario Hewardt’s Advanced .NET Debugging is an excellent resource for both beginner and experienced developers working …