Sign in
Debugging Toolbox
Windbg scripts, debugging and troubleshooting tools and techniques to help you isolate software problems.
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
ASP
Books
Breakpoints
Call Stack
Crash
Disassembly
Exceptions
Hang
Heap Corruption
High CPU
Interview
Just For Fun
Magic Pointers
Memory Leak
Modules
NetWiz Tool
PE Headers
Performance Bottlenecks
Performance Monitor
Personal
PowerDbg Library
PowerDbg Scripts
PowerShell Scripts
Random Thoughts
Read Me
Reporting Services
Serviced Components
SharePoint
Sherlock Tool
Special Commands
SQL Commands
SQL Connections
Stack Corruption
Symbols
Threads
Tracing
Troubleshooting
Windbg Scripts
Archive
Archives
October 2012
(1)
May 2012
(1)
March 2012
(1)
October 2011
(1)
September 2011
(1)
February 2011
(1)
October 2010
(1)
August 2010
(1)
May 2010
(1)
March 2010
(2)
January 2010
(1)
December 2009
(1)
November 2009
(1)
October 2009
(2)
September 2009
(3)
August 2009
(5)
May 2009
(1)
April 2009
(2)
March 2009
(3)
February 2009
(3)
January 2009
(1)
November 2008
(2)
October 2008
(1)
September 2008
(2)
August 2008
(5)
July 2008
(5)
June 2008
(5)
May 2008
(1)
April 2008
(7)
March 2008
(5)
February 2008
(4)
January 2008
(2)
December 2007
(2)
October 2007
(1)
September 2007
(2)
August 2007
(1)
July 2007
(4)
June 2007
(2)
May 2007
(3)
April 2007
(5)
March 2007
(5)
MSDN Blogs
>
Debugging Toolbox
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Debugging Toolbox
Special Command—.if and j to Use in Breakpoints and Scripts
Posted
over 5 years ago
by
rafarah
4
Comments
The .if and j commands are used conditionally to execute a command or series of commands. .if is very similar to if from C and C++: .if ( Condition ) { Commands } .elsif ( Condition ) { Commands } .else { Commands } j does the same thing...
Debugging Toolbox
Special Command—Listing the Nearest Symbols with ln
Posted
over 5 years ago
by
rafarah
1
Comments
ln is a very useful command. It stands for list nearest. You provide an address as argumen t, and it gives you the closest symbol that matches the address. Of course, you have to be using the right symbols! Here is the syntax : ln [ address...
Debugging Toolbox
Special Command—Logging Commands Output and Commands History
Posted
over 5 years ago
by
rafarah
2
Comments
If you’ve been following my blog you know I use .logopen and .logclose quite a lot, mainly in PowerDbg . Using these pairs of commands you can save a log file that has all output from the debugger. Usage: .logopen [ Options ] [ FileName ]...
Debugging Toolbox
Special Command—How to See Different Call Stacks Only? !uniqstack
Posted
over 5 years ago
by
rafarah
1
Comments
I’ve been travelling a lot in the US and Latin America: that’s why you haven’t seen any new posts coming. Now I’m back! OK, just for a while, but it’s enough to write more articles. By the way, Buenos Aires (Argentina) is a beautiful place to know! J...
Debugging Toolbox
Special Command—Using Breakpoints: bp, bm, ba, bu
Posted
over 5 years ago
by
rafarah
6
Comments
When doing live debugging you’ll use breakpoints at some point when tackling a problem. A simple breakpoint is easy to use ; however, when you are on the trenches you might need to use advanced breakpoints that save you a lot of manual work. For...
Debugging Toolbox
Special Command—Extracting Class and Struct Fields Using dt
Posted
over 5 years ago
by
rafarah
1
Comments
dt is another command used almost all the time whenever you want to get the fields and type for a structure or class. For example, you may have a this pointer and use dt to get its fields and type. It’s a simple command with interesting variations...
Debugging Toolbox
Special Command—Use lm* and Get All Details from Modules
Posted
over 5 years ago
by
rafarah
3
Comments
Yet another basic and useful command: lm . Hmmmmm… OK so you already know this command. Great! But do you know all of its variations? Usually when we get used to a command we don’t try to explore its variations and sometimes one of these variations...
Debugging Toolbox
[PowerShell Script] Displaying the Top 5 Exceptions and Up to 5 Different Call Stacks For Each Exception
Posted
over 5 years ago
by
rafarah
9
Comments
During a lab I had about a month ago, one of my colleagues, Tag, whom I had opportunity to mention in a previous post, asked me if I could create a PowerShell script that displays statistics of exceptions, with call stacks included. For me it sounded...
Debugging Toolbox
Special Command—Searching the Call Stack for Symbols or Modules Using !findstack
Posted
over 5 years ago
by
rafarah
1
Comments
During your debugging session, you may find yourself trying to identify if a specific symbol or module appears in one or more threads. There’s more than one way to do that, and here I covert it in the simplest way: !findstack This command accepts...
Debugging Toolbox
My Team is Hiring
Posted
over 5 years ago
by
rafarah
2
Comments
All my posts are provided "AS IS" with no warranties, and confer no rights For PFE Job Opportunities at Microsoft, please visit our website at: http://members.microsoft.com/careers/search/default.aspx - search for keyword “PFE” “PFE: The best place...
Debugging Toolbox
[PowerShell Script] PowerDbg v3.1 - Using PowerShell to Control WinDbg
Posted
over 5 years ago
by
rafarah
5
Comments
This new version has one more parser for !PrintException and a killer feature that my colleagues and myself have wanted since the beginning: PowerDbg, more specifically Send-PowerDbgCommand , which now has the ability to wait until a command finished...
Debugging Toolbox
Comparing RegEx.Replace, String.Replace and StringBuilder.Replace – Which has better performance?
Posted
over 5 years ago
by
rafarah
20
Comments
A few days ago I was with Frank Taglianetti (no links here, he doesn’t have a blog yet), a PFE from my team that I met for the first time at that day while doing a Lab for one of our customers. By Lab I mean stress testing and troubleshooting a customer...
Debugging Toolbox
Special Command: Using s to Explore The Memory
Posted
over 5 years ago
by
rafarah
1
Comments
Very often I found myself scanning the stack or the entire virtual memory for the process to find information that may help me. This information may be strings, DWORDS, bytes, chars, etc… To accomplish this you should use the s command. Here...
Debugging Toolbox
Special Command: Repeating a Command Using z While a Given Condition is True
Posted
over 5 years ago
by
rafarah
1
Comments
When doing live debugging, it’s not uncommon to have to repeat a set of commands until a condition becomes true or false. There are several ways to do this, and one of them is through the z command. You can create automated commands using this instruction...
Debugging Toolbox
Special Command: Using ~, the Thread Identifier
Posted
over 5 years ago
by
rafarah
1
Comments
When debugging, most of the time, you have to see all stacks for all threads or to set the context for a specific thread in order to analyze it. To do that you use the ~ command. According to the WinDbg documentation we have: ...
Debugging Toolbox
Special Command: Using ??, @@c++() and poi() with C/C++ Expressions
Posted
over 5 years ago
by
rafarah
6
Comments
I really like using C/C++ expressions from WinDbg. It’s a natural way to extract information from C and C++ applications if you know these programming languages; therefore, I think it’s useful to share how to do this. First, let’s talk about poi...
Debugging Toolbox
Special Command: Advanced Symbol Searching Using x.
Posted
over 5 years ago
by
rafarah
2
Comments
This is yet another command that has powerful capabilities. It’s very flexible, too. You can use different parameter s combinations; though, I recommend you look at or check the WinDbg documentation if you want to explore other variations. Again...
Debugging Toolbox
Special Command: Using dv to See the Local Variables
Posted
over 5 years ago
by
rafarah
5
Comments
The dv command stands for display variables. It’s easy to memorize. The reality , though, is in the trenches you won’t use the standard format of dv because it doesn’t give you enough (or much) information. Here is the way I use this command...
Debugging Toolbox
Special Command: Analyzing the Memory and Stack Using the dp* Command
Posted
over 5 years ago
by
rafarah
2
Comments
When you need to see the raw call stack and memory, you have plenty of options. You can even leverage the WinDbg GUI to see them . Here I’m going to show you how to do that. dpa <address> L <range> dpa <startAddress> <endAddress>...
Debugging Toolbox
Special Command: Displaying Memory Data Using the d* Command and Its Variations
Posted
over 5 years ago
by
rafarah
5
Comments
The d* command and its variations are among the most commonly used commands. In this article I’m covering the most important combinations and showing their output. The d* command is used to display information from memory, including heap and stack...
Debugging Toolbox
Special Command: Analyzing and Reconstructing the Stack Using the k* Command and Its Variations
Posted
over 5 years ago
by
rafarah
4
Comments
I’m starting a new series of articles focused on explaining special commands and showing how they can be used. You can read about WinDbg commands using the WinDbg documentation ; however, sometimes you want to see the output of a specific command or you...
Debugging Toolbox
Moving back to the SIE team… oops, I mean the PFE team
Posted
over 5 years ago
by
rafarah
12
Comments
Years ago I was part of a special and very small and special team, here, at Microsoft - the Solution Integration Engineering team. This team was known to handle any kind of customer issues, even those related to third-party products and technology integration...
Debugging Toolbox
[PowerShell Script] Displaying the Call Stack for Inner and Hidden Exceptions
Posted
over 5 years ago
by
rafarah
7
Comments
This script automates a technique I’ve been using for a long time whenever I need to see the stack for exceptions hidden in a call stack and if you are like me, you prefer to use an automated approach rather than a manual approach. I’m not going to...
Debugging Toolbox
[PowerShell Script] Isolating the Threads Consuming High CPU
Posted
over 6 years ago
by
rafarah
10
Comments
When helping my customers with scenarios in which the symptom is high CPU, I very often end up with only a dump file from the application consuming high CPU and nothing else. When you have a high CPU scenario and you have dump files, you need a Performance...
Debugging Toolbox
[PowerShell Script] PowerDbg v2.3 - Using PowerShell to Control WinDbg
Posted
over 6 years ago
by
rafarah
9
Comments
It has been a while since my previous blog post. I’ve been busy with other tasks, including the new PowerDbg version 2.3. There’s a lot of new stuff on this new version and my estimate is that about 80% of the most used Windbg commands have been covered...
Page 3 of 4 (98 items)
1
2
3
4