473,785 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ 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 2435
"Chris Stankevitz" <ch******@stank evitz.nospample ase.com> wrote in message
news:uf******** ******@TK2MSFTN GP15.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******** ********@TK2MSF TNGP09.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******@stank evitz.nospample ase.com> wrote in message
news:eI******** ******@TK2MSFTN GP12.phx.gbl...
Thanks Will.
You are welcome.
In my case I want to "dump" before the crash (when everything is okay).


Then you call MiniDumpWriteDu mp() 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 MiniDumpWriteDu mp() 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 MiniDumpWriteDu mp 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******** ******@TK2MSFTN GP10.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
2101
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. I am using egenenix 2.0.4 and MySQLdb 0.9.2. I have also replaced the -shared flag in the Makefile is /usr/local/lib/Python2.1/config with -G (a recommended solaris change to let the build of the modules work in the first place) -> notably I also...
3
6208
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. Eg $ python -c 'import sys; sys.setrecursionlimit(100000) def f(): return f() f()' Segmentation fault (core dumped)
1
4240
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 make it possible too see what the error is, and where it is located. or some more information about the error. Thanks in advance Sam
10
4024
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 need it to generate a 300Mb file every time I add a new printf statement to debug the code. can i do something to prevent it from dumping the core file even when it seg faults? (is this a unix/linux thing, or a c thing?) thanks!
4
2485
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. Mohan
5
4066
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' from this command we know 'soffice.bin' process dumped core. Now can i do the same using python i.e. finding which process dumped core? if so how can i do it?
1
10086
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 using g++ compliier..
2
4256
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 available in source and always compiled at the target's system. Every now and then it crashes, giving me a core dump. Here's the problem: Even though I'm sent the binary file (including
1
1256
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 debugging from a core dump? Thanks, peter.
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10090
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5380
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.