469,594 Members | 2,220 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,594 developers. It's quick & easy.

Create/load core dump for debugging

My app reliably dies after a long time. I would like to dump core before it
dies, and use that core as a starting point in debugging to save me from
having to spend so much time waiting.

Is this possible? I suppose I could run my entire IDE inside a vmware
virtual machine?

Thanks for your help,

Chris
Mar 8 '06 #1
5 2242
"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:uf**************@TK2MSFTNGP15.phx.gbl...
My app reliably dies after a long time. I would like to dump core before
it dies, and use that core as a starting point in debugging to save me
from having to spend so much time waiting.

Is this possible? I suppose I could run my entire IDE inside a vmware
virtual machine?


I guess you could do that.

Alternatively, you can create a minidump of your application's space and
then start the debugger from there.

There is an article by one of the developers on the topic here:

http://www.codeproject.com/debug/pos...&select=924608

and another one by a "cilvilian" <g> here:

http://www.codeproject.com/tools/minidump.asp

Just by the way, one of the reasons for a slient application death is a
trashed or exhausted stack. I think there are case in which the stack is so
messed up that exception handlers and whatnot can simply not run.

Regards,
Will
Mar 8 '06 #2
"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:uD****************@TK2MSFTNGP09.phx.gbl...
Just by the way, one of the reasons for a slient application death is a
trashed or exhausted stack. I think there are case in which the stack is
so

Thanks Will. In my case I want to "dump" before the crash (when everything
is okay).

Chris
Mar 8 '06 #3
"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:eI**************@TK2MSFTNGP12.phx.gbl...
Thanks Will.
You are welcome.
In my case I want to "dump" before the crash (when everything is okay).


Then you call MiniDumpWriteDump() when you need to.

There's a bit of Heisenberg uncertainty <g> here in that the call stack for
the calling thread is not preserved.

So, at first I was tempted to say that what you'd need to do is have a
background thread in your application periodically writing the dump. But
then I fear that reading the dump for problem resolution would also restore
the thread that writes the dump, gumming up the works.

Regards,
Will
Mar 8 '06 #4
In my case I want to "dump" before the crash (when everything is okay).
Then you call MiniDumpWriteDump() when you need to.

There's a bit of Heisenberg uncertainty <g> here in that the call stack for
the calling thread is not preserved.


It is possible to preserve the call stack of the calling thread with the help
of an exception (use a filter to catch it and write the minidump with
exception information). For example, as shown here:
http://www.codeproject.com/debug/XCrashReportPt3.asp

Also it is of course possible to create minidumps using another application,
e.g. as here:
http://www.debuginfo.com/articles/ea...html#savedumps
So, at first I was tempted to say that what you'd need to do is have a
background thread in your application periodically writing the dump. But
then I fear that reading the dump for problem resolution would also restore
the thread that writes the dump, gumming up the works.


That still would work, since minidumps save information about all threads
in the process (unless you explicitly ask MiniDumpWriteDump not to save it).

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]


Mar 9 '06 #5
"Oleg Starodumov" <com-dot-debuginfo-at-oleg> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl...
Also it is of course possible to create minidumps using another
application,
e.g. as here:
http://www.debuginfo.com/articles/ea...html#savedumps


Thanks for the new "bookmark".

Regards,
Will

Mar 9 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dave Harrison | last post: by
3 posts views Thread by Nick Craig-Wood | last post: by
1 post views Thread by Sam | last post: by
10 posts views Thread by ken | last post: by
4 posts views Thread by news.fe.internet.bosch.com | last post: by
2 posts views Thread by Johannes Bauer | last post: by
1 post views Thread by peter | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.