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
12
votes
1 answer

Avoiding OutOfMemoryException during large, fast and frequent memory allocations in C#

Our application continuously allocates arrays for large quantities of data (say tens to hundreds of megabytes) which live for a shortish amount of time before being discarded. Done naively this can cause large object heap fragmentation, eventually…
12
votes
2 answers

Breakpoint set by sosex.mbp or sosex.mbm not working

I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) …
Harvey Kwok
  • 11,713
  • 6
  • 37
  • 59
11
votes
4 answers

Looking for ideas debugging a tricky windows service startup gremlin

In the last few months I've received few reports from QA about one of our services hanging. Upon examining a hang dump using WinDbg, every time I discovered the same thing: Loader lock critical section is locked but owning thread is nowhere to be…
DXM
  • 4,413
  • 1
  • 19
  • 29
11
votes
2 answers

How to list threads in WinDbg (kernel debugging)

Does anyone know how I can list all threads in WinDbg while kernel debugging. I have found older references that say ~ but that does not work. Specifically, I am looking to the find the ID of a thread that caused an event, namely a breakpoint.
user963228
  • 644
  • 1
  • 7
  • 7
11
votes
5 answers

Windows Debugging Tools Not Installing

I'm trying to install the Windows Debugging Tools via the Windows SDK and after two attempts I am at a loss for what to do. I start the installation and receive no errors at all but the debugging tools (windbg and kd) are nowhere to be found... The…
Robert Kaucher
  • 1,841
  • 3
  • 22
  • 44
11
votes
1 answer

Error 0x80004005 when reading dump file with WinDbg

I'm working on a 32 bit application which sometimes causes a certain 64 bit Windows 7 machine to crash. I've generated a dump file of the crash using the ProcDump utility from Sysinternals. (I used the command "procdump -ma -h MyApplication.exe".)…
user181813
  • 1,861
  • 6
  • 24
  • 42
11
votes
2 answers

Creating minidump for access violation exception using SetUnhandledExceptionFilter()

I am using the following code to create a minidump file whenever there is a structured exception generated from my code: void CreateMiniDump( EXCEPTION_POINTERS* pep ) { // Open the file typedef BOOL (*PDUMPFN)( HANDLE hProcess, DWORD…
Naveen
  • 74,600
  • 47
  • 176
  • 233
11
votes
3 answers

starting debugger cdbengine for abi "x86-windows-msvc2015-pe-64bit" hangs in qtcreator

I added the x64 cdb from Windows Kits 10 to debugger settings in the MSVC 2015 64bit Kit in qtcreator 4.1.0 on latest Windows 10. But when I run the debugger for my application, the debugger seems to start really slowly. Even a first run of hello…
xgdgsc
  • 1,367
  • 13
  • 38
11
votes
1 answer

Forcing to load unmatched symbols in Visual Studio 2015 debugger

I am debugging a user mode crash dump file with Visual studio 2015. However the symbols don't match. In WinDbg there is a command line .reload /f /i where the /i ignores the timestamp which binds the PDB files to executable. Is there something…
zar
  • 11,361
  • 14
  • 96
  • 178
11
votes
2 answers

WinDbg not telling me where my string is rooted

I am trying to track down why a string is stored so long in my application, and eating up an excessive amount of memory. I have a Windows Service which runs regularly. It reads data from a database (in the form of a DataSet) and then does some…
Dominic Zukiewicz
  • 8,258
  • 8
  • 43
  • 61
11
votes
1 answer

Can Windbg display thread names?

Windbg should understand the MS exception protocol used to pass thread names to a debugger. I can't get this to work. Looking on the net there are many examples showing "~" thread lists with no thread names, and that's what I see. I'm debugging a…
Nick Westgate
  • 3,088
  • 2
  • 34
  • 41
11
votes
1 answer

How to get a Windows symbol server set up

I have a spare server on the network that I'd like to have host all of our build symbols. I already know how to set up a symbol cache on my local development system and pointing my debugger (e.g. Windbg) to that path in 'Symbol File Path'. I…
ykay
  • 1,877
  • 19
  • 24
11
votes
2 answers

What does kb show for 64 bit processes?

I have recently made a mistake analyzing a callstack, because I didn't expect the application to be 64 bit. I have used the WinDbg command kb to show the callstack and parameters passed to methods. On 64 bit, the parameters are not passed via the…
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
11
votes
2 answers

How do I debug a process that starts at boot time?

I am trying to set a breakpoint into a Windows service that starts at boot time. Because of an unfortunate mistake on my end, the service forces the machine into a reboot loop: this means that I can't get to a stable state from which I could deploy…
zneak
  • 134,922
  • 42
  • 253
  • 328
11
votes
3 answers

List loaded modules using gdb

Is there a way to list all the loaded modules using gdb, just like Windbg, that automatically shows all the loaded modules. Its okay if there is no one word answer, I'll be happy to work things out myself if someone could please provide me a…
0fnt
  • 8,211
  • 9
  • 45
  • 62