473,473 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2415
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Harrison | last post by:
Hi all, got a problem combinging mx and MySQLdb, when I build and install both for my Python2.1 install on a Solaris 9 box I can import mx fine, but importing MySQLdb causing python to core dump. ...
3
by: Nick Craig-Wood | last post by:
I've just discovered that my python (Python 2.3.4 from debian package 2.3.4-1 running on debian testing x86 + linux 2.4.26) core dumps when I set recursionlimit very high and do lots of recursion....
1
by: Sam | last post by:
Hi all I am a C++ programmer, and very new in Unix and using gcc. When I am compiling my program, I am getting error and core dump. I was wondering if there is any flag or some way in gcc that...
10
by: ken | last post by:
hello, i'm writing a c program on a linux system. i'm debugging a segmentation fault but i don't want it to dump a core file because the memory footprint of the program is over 300Mb and i don't...
4
by: news.fe.internet.bosch.com | last post by:
Hi, I have c++ application which dumps core only static mode and not in debug mode , I used gdb debugger to know which function is reason for core dump , is there other ways to find it out. ...
5
by: su | last post by:
to find which process dumped core at the promt we give $ file core.28424 core.28424: ELF 32-bit LSB core file of 'soffice.bin' (signal 11), Intel 80386, version 1 (SYSV), from 'soffice.bin' ...
1
by: avinash jain | last post by:
I got a segmentation fault.. I came to know that the problem could be easliy solved be the core dump files. could any tell how to create a core dump file and how to read a core dump file. I am...
2
by: Johannes Bauer | last post by:
Hi, I don't think it's quite on-topic here, but neither in in comp.os.linux.development.system - so here it goes anyways. I'm debugging code which is in use on many remote systems. The code is...
1
by: peter | last post by:
AFAIK pdb only can do postmortem debugging if fed a Python stack trace. Is there any way to obtain such a stack trace if all you've got is a core dump? Or, put another way: can I do post-mortem...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.