windbg

How do I evaluate dependency properties in silverlight/WPF from S.O.S. ?

Hello all. This question is fairly straightforward -- I am trying to debug a memory leak in a silverlight application using s.o.s. I was able to get some good info using !gcroot to determine what objects have open references to the one that should be getting cleared; but in these cases they tend to be core UI elements (like grid and st...

Windbg help -> how can I read the code at this callstack?

Hi folks, I have a dump of a windows service i made. The exception is that my code can't move a file (for some reason). Now, in my code there's a number of places where i move files around the filesystem. So, using Windbg, i'm trying to see the code where the exception occurs. here's my !clrstack dump.. 0:016> !clrstack -p OS Threa...

How do I find the lockholder (reader) of my ReaderWriterLock in windbg

I've got a dump of a .Net process that has hung due to a deadlock (the gui thread is no longer responding, and my logs show that some threads have stopped responding). I have taken a snapshot and am now looking through it in windbg, and all threads bar one are waiting for the last one. Looking at that one thread's stacktrace with !clrsta...

Can I run a .NET garbage collection from WinDbg?

I'm looking into why a managed process is using a lot of memory. Is there a way to run GC.Collect(3) from WinDbg, so that I can focus on the actual memory allocation? ...

Application.Exit didn't kill a message pump?

I have thread exception handler which saves the exception stack trace and should close the application. I call Applicatoin.Exit, but that only closes the window, living the app running windowless. I know, that this usually happens because some background threads are still running. I attached windbg to the windowless process and there s...

Current Classes Loaded Constantly Increasing - Memory Leak

I've got a service that has a very slow memory leak. If I analyze the .NET CLR Loading counters, I see that the Current Classes Loaded counter is constantly increasing and matches Total Classes Loaded counter at all times. This gives me the impression that the memory leak is related to resources not being freed (This is just a guess). ...

What is the best resource for learning the features and benefits of windbg?

What is the best resource for learning the features and benefits of windbg? I want to be able to discuss investigate memory issues (handles, objects), performance issues, etc . . . ...

Getting a list of 3rd party modules with Windbg?

I'm using windbg to examine some crash dumps sent in by an app. There seems to be some correlation between a crash I'm seeing and having a certain 3rd party DLL loaded into the process (a flaky Winsock LSP, I suspect). To make this sort of analysis easier in the future, is there a windbg script that would just show me a list of modules...

x86: Possible to debug-break when a particular pointer-to-string is pushed on the stack?

Hi, I am debugging a third-party DLL for which I don't have the source code. This DLL maintains a pool of strings. I want to trap the earliest occurrence at which one of these strings is passed into a function...any function at all... In other words, I want to detect when a pointer-to-a-null-terminated-string having a certain format is...

Debugging Tools for Windows: Symbol Proxy doesn't proxy

I'm attempting to set up a symbol proxy using symproxy.dll from Debugging Tools for Windows. When I issue ".reload /f" from the debugger, none of the symbol files can be found. It looks like Symproxy isn't going out to the Microsoft Symbol Server to actually get the symbols. I see nothing in Wireshark, for example. SYMPROXY.DLL is defin...

Display content of shared memory section in WinDbg?

I've got a couple of programs that communicate using a named memory section. Is there any way that I can view the contents of this shared memory section from WinDBG, either in user mode or kernel mode? I don't have a pointer to it, but I do know the name. ...

How Best to Alias an Executable Name in a WinDBG Crash Script?

Background Information For saving out crash dumps, I have a script passed to cdb.exe in the Debugger value of the AeDebug registry key: C:\progra~1\debugg~1\cdb.exe -p %ld -e %ld -g -y SRV*c:\mss*http://msdl.microsoft.com/download/symbols -c "$<d:\tgticker\Dumps\RDFD.cdbscript" Here is the first portion of the script: as /c CrashFir...

How do I find the handle owner from a hang dump using windbg?

How do I find out which thread is the owner of my Event handle in windbg: I'm running !handle 00003aec f and get Handle 00003aec Type Event Attributes 0 GrantedAccess 0x1f0003: Delete,ReadControl,WriteDac,WriteOwner,Synch QueryState,ModifyState HandleCount 2 PointerCount 4 Name <none> ...

WinDbg symbol resolution

When using WinDbg, where should the private symbol files (pdb?) be placed? My situation is: I have a DLL which I want to debug. I have the source code and symbol files for this DLL. This DLL is called by another DLL (which I don't have symbols or source for) which, in turn, is called by an EXE (which I also don't have symbols or source ...

IDebugSymbols::GetNameByOffset and overloaded functions

I'm using IDebugSymbols::GetNameByOffset and I'm finding that I get the same symbol name for different functions that overload the same name. E.g. The code I'm looking up the symbols for might be as follows: void SomeFunction(int) {..} void SomeFunction(float) {..} At runtime, when I have an address of an instruction from each of the...

RedirectedThreadFrame in Callstack

Has anyone seen a RedirectedThreadFrame in a callstack in windbg? That is from the managed callstack. I am seeing alot of exceptions being thrown inside the framework that I am never seeing bubbled to me and I am trying to figure out why. The native callstack just has: 0526f6b0 79f63d27 KERNEL32!RaiseException+0x53 0526f718 79f6410...

WinDbg -- TraceListener and Saturated ThreadPool

I have a multithreaded .NET Windows Service that hangs intermittently -- maybe once every two weeks of 24/7 operation. When the hangs occurs the threadpool is completely saturated because calls to our custom tracelistener start blocking for some reason. There aren't any locks in the offending code nor anything blocking according to windb...

windbg and visual studio express editions

Does anyone know if windbg can be used together with Visual C# 2008 Express Edition Ta! ...

Limit !dumpheap (windbg) output to n objects

When using windbg and running !dumpheap command to see the addresses of objects, how can you limit to a specific number of objects. The only way I found was using CTRL+BREAK and a command line on a blog http://dotnetdebug.net/2005/07/04/dumpheap-parameters-and-some-general-information-on-sos-help-system/ -l X - Prints out only X items f...

How can I view the local variables on the evaluation stack when debugging a .NET CLR application?

I'm using Windbg (with the sos extention) and trying to debug a crashed application. I was able to dump the IL of the call that threw the exception and by examining the code, it seems like I could obtain the information that I need if I could dump the contents of the evaluation stack. Is it possible to do what with WinDbg & sos ? Here...