windbg

Biggest windbg pet peeve

What is your biggest pet peeve related to the windbg debugger from microsoft? (note: I actually really like windbg if I ignore the unpolished UI.) ...

Adding WinDbg to the "Open With" menu for .DMP files?

Currently, when I right-click on .DMP (or .MDMP) files, the "Open With" popup has Visual Studio 2005 and 2008 on it. How can I add WinDbg to this list, without removing either of the Visual Studio options? I've used the "Choose a program" option, and this adds WinDbg to the list. Unfortunately, WinDbg needs some command-line options to ...

Debugging Delphi Application on Non Development Environment

I am attempting to use WinDBG or another debugger to debug a CodeGear Delphi 2007 Windows application on a remote machine. I have been unable to produce symbol files for WinDBG. Is there a way to use WinDBG or another debugger to debug Delphi applications on a system that doesn't include the IDE? Edit1 The remote debugger is not an o...

IE hanging with 100% CPU / Got stack trace

I have a situation where IE7 hangs accessing my web app. Based on the excellent suggestion from George V. Reilly, I installed WinDbg to download the IE symbols, setup Process Explorer to use those symbols, and then used Process Explorer to get a stack trace for the hung thread. I have pasted the stack trace below. Does someone more fami...

Windbg stack trace issue

Hello everyone, I am debugging a crash dump of managed code, when using !threads to show all threads here, a couple of threads has Exception field value with various exceptions. My question is how to identify which exception is the root exception which causes process crash in a quick way? Any ideas why so many threads are associated wi...

how to write a loop in Windbg like this?

Hello everyone, I have a type called Foo and it has a field called length. I want to write a single loop statement in Windbg which will dump length field of all object instances of type Foo in managed heap? thanks in advance, George ...

Object not garbage collected, but contains no gcroots

Running into a prickly problem with our web app here. (Asp.net 2.0 Win server 2008) Our memory usage for the website, grows and grows even though I would expect it to remain at a fairly static level. (We have a small amount of data that gets stored in state). Wanting to find out what the problem is, I've run a System.GC.Collect(); a fe...

debug symbol issue

Hello everyone, I am interested in which symbol file is used when we analyze dump file using Windbg or Visual Studio. Suppose my application is using a utility library, and the utility library has related private symbol file. When there is crash dump in my application, I need the symbol of the utility library to analyze the full call st...

How can I know the CLR version of a crash dump?

I have a minidump crashed from a .NET application. Is there any way to know the CLR version (e.g. version of mscorwks.dll) of the fault machine (which generates the crash dump) using either Windbg or some other tool? ...

Large Object Heap Fragmentation

The C#/.NET application I am working on is suffering from a slow memory leak. I have used CDB with SOS to try to determine what is happening but the data does not seem to make any sense so I was hoping one of you may have experienced this before. The application is running on the 64 bit framework. It is continuously calculating and se...

PDB file crashdump user.dmp

Hi, I have an application crash, and as a result it is generating a crash dump in Windows platform. I send the exe and dll file to the customer. The customer has sent the user.dmp and drwtsn32.log file me. But, the customer do not have the corresponding pdb file. The customer just has dll and exe file. So, when I attach this user.dmp fil...

What is the easiest way to assign data in a Windbg script?

I have a windbg script that I plan on assigned to run via a breakpoint. In this script I want to tokenize a command using .foreach, but I want to be able to assign a variable to remember something about a current token for the next time around the for loop. For example, something like this (written in psuedo windbg-script-code): $this...

How to use WinDbg to analyze the crash dump for VC++ application.

Hi Any one knows how to use the windbg for analyzeing dump file. Please share the info how to analyze crash dump using windbg. Thanks, Haranadh ...

How can you change an age-mismatched PDB to match properly?

Our nightly build process was broken for a long time, such that it generated PDB files that were a few hours different in age than the corresponding image files. I have since fixed the problem. However, I would like to start using a symbol server, but cannot due to having to use these age-mismatched pdb files. I work around this is...

Value of a variable using WinDbg

Question: How to display the value of a C++ iterator using WinDbg, illustrated below: for (vector<string>::iterator i = args.begin(); i != args.end(); i++) //omitted //for instance: } else if (*i == "-i") {//attempting to display the value of *i ++i; if (!::PathFileExistsA(i->c_str())) { Note: Using ?? evaluate C++ expression ...

How to check if a NULL character is in a string when debugging with WinDbg

For instance: 0:000> ?? testFile //check this variable char * 0x009c6758 "e:\TEST\example.FOO" Question: How can I check for a NULL-terminated character in above? ...

understanding WinDbg output

I have a Winform application (C#) which imports some functions from dll. Sometimes when running the application i get the following exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. I catch it in AppDomain.CurrentDomain.UnhandledExc...

Representation of wchar_t and char in WinDbg

Note: /* * Trivial code */ wchar_t *greeting = L"Hello World!"; char *greeting_ = "Hello World!"; WinDbg: 0:000> ?? greeting wchar_t * 0x00415810 "Hello World!" 0:000> ?? greeting_ char * 0x00415800 "Hello World!" 0:000> db 0x00415800 00415800 48 65 6c 6c 6f 20 57 6f-72 6c 64 21 00 00 00 00 Hello World!.... 00415810 48 00 65 00 6...

live debugging a stack overflow

I have a managed code Windows Service application that is crashing occasionally in production due to a managed StackOverFlowException. I know this because I've run adplus in crash mode and analyzed the crash dump post mortem using SoS. I have even attached the windbg debugger and set it to "go unhandled exception". My problem is, I can'...

Forcing GC when using windbg/sos

I'm debugging a memory leak with windbg/sos and I cannot find a way to have sos force a garbage collection. The list of sos commands does not seem to include gc. ...