views:

249

answers:

1

Hi,

I've been using MiniDumpWriteDump to generate dump files on a crash. I've been trying to do a full memory dump. This seems to work, and generates a large file as expected.

However when I load this huge file into Visual Studio (2005) I don't seem to be able to see the values of any variables on the heap. In fact it gives me no more information than a normal dump ...

My call to MiniDumpWriteDump is as follows;

MINIDUMP_EXCEPTION_INFORMATION mdi;

mdi.ThreadId = GetCurrentThreadId();
mdi.ExceptionPointers = in_pInfo;
mdi.ClientPointers = FALSE;

MiniDumpWriteDump(GetCurrentProcess(),GetCurrentProcessId(),
    fHan,
    MiniDumpWithFullMemory,
    &mdi,
    0,
    0);

Note: I have a full set of pdb's, a valid stack, and in my test application I am faking an error with a divide by zero.

Any idea why this is?

Cheers Rich

+1  A: 

Probably because you don't have the correct .pdb files. Or because your code has been put through the optimizer's version of RSA encryption. Or because you've got the x64 build where pointers are passed in registers. Or because your code crashed due to heap corruption, making the debug info equally unreliable. Or the stack of the crashing thread is blown, leaving no bread crumbs to track.

Take your pick.

Hans Passant
well I'm testing the app, so i have faked a divide by zero. Stack is intact, pdb's are all loaded and correct. However I can't see the values of any heap or global variables.
Rich
Update your question with crucial info like that. Not telling this up front is just a waste of everybody's time. You'll also need to document exactly which MiniDumpWriteDump() flags you used and what "can't see" means.
Hans Passant
question has been updated.
Rich