Questions tagged [windbg]

WinDbg is a user and kernel mode debugger for Windows. It can be used to debug both native and managed code.

WinDbg is a GUI-based, user- and kernel-mode debugger for Windows. It is part of the "Debugging Tools for Windows", a free download available from Microsoft.

WinDbg can be used to debug managed code by loading one or more extension DLLs. SOS.dll is available as part of the .NET framework. PSSCOR2.dll and SOSEX.dll are additional extensions for debugging managed code.

2892 questions
1
vote
1 answer

change function return value

I have a .net application that is doing COM interop and calling some native library APIs. One of these APIs are returning some data that is unexpected and causing headaches for me. I am looking for some way of forcing the return value of the managed…
Silverlight Student
  • 3,968
  • 10
  • 37
  • 53
1
vote
1 answer

Syntax for viewing structs in the WinDbg Memory Window?

So for whatever reason I happen to not use an IDE when programming. I compile my programs and generate their corresponding PDB's on the command line. As a consequence I use WinDbg for debugging which I don't mind. Anyhow please consider the…
Nux
  • 31
  • 1
  • 5
1
vote
0 answers

Not enough free threads in the ThreadPool to complete the operation message

I started receiving this exception in my application. I took a dump and here is how the threadpool looks like: 0:014> !threadpool CPU utilization: 81% Worker Thread: Total: 1000 Running: 4 Idle: 996 MaxLimit: 1000 MinLimit: 1000 Work Request in…
DBK
  • 403
  • 4
  • 13
1
vote
1 answer

Dump string array using Windbg debugger commands

I'd like to dump a managed string array into a file where each line in the file corresponds to a single string in the array. I have the the array address, so I've started with: .foreach (ptr { !da
} ) { } How can I .printf the string…
Shmoopy
  • 5,334
  • 4
  • 36
  • 72
1
vote
1 answer

Is it possible to invoke win32 call in windbg?

I'm trying to invoke win32 api with windbg, > .call kernel32!ExitProcess(0) ^ Symbol not a function in '.call kernel32!ExitProcess(0)' windbg should support this, any idea?
daisy
  • 22,498
  • 29
  • 129
  • 265
1
vote
1 answer

Can you set a command for a breakpoint with !bpmd in a single line?

I'd like to run a command each time my breakpoint in managed code is hit, I know how to do it in three commands. Can it be done in one? The way to do it in three commands is !bpmd system.web.dll xxxx; bl; bp yyyy "zzz; g;" Where yyyy is the address…
rjdevereux
  • 1,842
  • 2
  • 21
  • 35
1
vote
1 answer

Multi-threaded application shows only one thread when running !ntsdexts.locks in WinDbg. How to know other thread causing deadlock?

I am trying to debug a multi-threaded application deadlock using windbg. It just shows one thread as output when I run !ntsdexts.locks command in windbg. How can I find other thread which is blocking it? I am not getting any hint like on which…
Chirag Acharya
  • 126
  • 1
  • 12
1
vote
0 answers

Windbg memory size in heap summary did not match the usage statistic

I have a .dmp file, created from TaskManager. When using windbg command: !heap -s it shows result like this: In this line: 00a40000 00000002 1084772 1074756 1084772 339109 3979 218 4 6b LFH we can see the memory usage is about…
Loren Liu
  • 11
  • 1
1
vote
1 answer

Need Help interpreting WinDbg Heap totals for debugging a memory leak

This question is very similar to: windbg memory leak investigation - missing heap memory Except that in my case everything is x86, whereas the answer offered on that post says that Windbg x64 is broken. In my case, when I do "!heap -s" I…
SteveSims
  • 535
  • 6
  • 19
1
vote
3 answers

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,…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
1
vote
1 answer

ASP.NET Core Application hangs with 16000+ Threads in NtWaitForSingleObject - What are they doing?

We have a ASP.NET Core 2.1 application in production which sometimes (from once a day to every two or three days) hangs and serves no more request. This results in 502 Errors from the IIS which is placed in front. Only option to get things working…
Jensen
  • 1,229
  • 12
  • 27
1
vote
1 answer

Windbg script using as /c inside a .foreach, .if, !for_each_local

My objective is to store the class name of the object called this found in a frame's locals. When you look at this sequence of commands, am I falling foul of some Windbg syntax rules that mean the as command doesn't seem to throw any error, but also…
Hippogriff
  • 295
  • 1
  • 4
  • 18
1
vote
0 answers

windbg - What does the "Commit" column of the !vad command output mean?

As above, when I do a !vad in windbg, what do the values in under the Commit column mean? kd> !vad VAD Level Start End Commit ffff8908f102b0c0 4 7ffe0 7ffe0 1 Private READONLY ffff8908ef465290 3 …
Edwin Lee
  • 3,540
  • 6
  • 29
  • 36
1
vote
1 answer

Force a module (DLL) to be loaded at a specific address

An executable is loaded and run in WinDbg It loads modules it needs at certain addresses Breakpoints set/traces retrieved in this session depend on these addresses When another session is started for the same executable, (either depending the on…
OzgurH
  • 443
  • 2
  • 13
1
vote
1 answer

Windbg, how to set method breakpoint on specific process

I've got virtual machine with VirtualKD drivers installed and attached to windbg running on the host machine. So far I've managed to set breakpoints on user-space processes by switching to the desired process context in the following manner : #…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1 2 3
99
100