3

I'm very new on debugging dumps so still have some questions.

I've read some questions about debugging dumps and now I've attached my code to dump and can see some values of variables.

My question is how to preview raw heap data. I want this because dump is very big, over 4GB so somewhere is a big memory leak, what probably caused the crash. So will be looking for some strings what left.

BTW. I'm coding with C++ and use Visual Studio 2012 for debugging, but I can download some other programs :)

trincot
  • 317,000
  • 35
  • 244
  • 286
ST3
  • 8,826
  • 3
  • 68
  • 92
  • There are better ways to do it, including not waiting until the dump gets gigantic and just listing the heap content takes 10 minutes. A heap debugger like umhd.exe is advisable. Or using a debug allocator like ``. – Hans Passant Aug 07 '13 at 17:09
  • I hope that someone will give you a more exact answer, but you may be interested in a Sasha Goldshtein recent windbg plugin: http://blogs.microsoft.co.il/blogs/sasha/archive/2013/08/05/searching-and-displaying-c-heap-objects-in-windbg.aspx. I haven't used it yet but it seems promising. – Sebastian Aug 07 '13 at 19:20

1 Answers1

2

You should use WinDbg and the !heap command to inspect the Win32 heaps in your process. There are many variations of this command that you could find useful: !heap -s -h 0 will give you statistics, !heap -h 0 will list all the blocks in all the heaps, etc.

You might also want to consider my heap_stat.py debugger script, which will try to search heap memory for objects that have vtable pointers and thus identify what category of objects is taking lots of heap space.

https://github.com/goldshtn/windbg-extensions/blob/master/heap_stat.py

Sasha Goldshtein
  • 3,499
  • 22
  • 35