2

I am using Google Breakpad to generate crash dumps for my windows application when it crashes.

My application mixes C++ native code with C# CLR code. The dumps that breakpad produces don't include any CLR information.

Is it possible to turn CLR dump on with Breakpad? What APIs are necessary to create CLR dumps?

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Aviad Rozenhek
  • 2,259
  • 3
  • 21
  • 42
  • 2
    Dbghelp was optimized to create minidumps for native code. Not very compatible with the notion of a garbage collected heap. You need to tell MiniDumpWriteDump() to also capture *all* heap memory so that the garbage collected heap is included. The result can't really be called "mini" anymore. Debugging it with sos is unfun as well. – Hans Passant Aug 14 '11 at 15:01
  • if you put your comment as an answer i'll mark it as THE answer – Aviad Rozenhek Jul 18 '12 at 11:43

2 Answers2

1

What do you mean by "CLR information"? I've been using Breakpad to create crash dumps and I can debug through them using SOS.

Edit: Here's what you need to do

.loadby sos clr   $$ For .NET 4
~0s   $$ Most crashes are on Thread 0
!pe   $$ Print the exception
~1s   $$ Let's take a look at Thread 1
!clrstack    $$ Dump the managed stack
Ana Betts
  • 73,868
  • 16
  • 141
  • 209
  • I need the logical stack traces in the managed code. what I see instead is function calls in the CLR virtual machine. when I use vs2010 to debug the dump in mixed mode, vs2010 complains that managed debugging information is unavailable. if I create the dump using cdb.exe, debugging in mixed mode from vs2010 works well. – Aviad Rozenhek Aug 16 '11 at 09:42
0

As I explained in How do I take a good crash dump in .NET, the following conditions should be met:

  • bitness matches the bitness of the process
  • a dump with all memory is needed

The latter corresponds to MiniDumpWithFullMemory of the MINIDUMP_TYPE enumeration.

Community
  • 1
  • 1
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222