LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2008, 08:53 AM   #1
mistretzu
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
Question How to generate a core dump programmatically?


I know how to setup Linux to create core dump when a process crashes.
But it is required to be able to generate the core dump when my process crashes programmatically, so I can control where the core dump is generated and what is the name of the file. Also it would be great if I can do this without modifying any system settings.

On Windows, all these are possible, is this doable on Linux?

Thanks.
 
Old 07-18-2008, 09:06 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Send just about any unhandled signal to force a core dump; 'SIGSEGV' is a favorite.
Within the program, you do this with 'raise' (man 3 raise)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Dump on Solaris (Question about core file) dayalan_cse Solaris / OpenSolaris 5 12-29-2014 07:56 AM
whose core dump is this? mayyash Linux - Software 3 11-21-2007 01:53 AM
rsh started process don't generate core dumps llaswell Linux - Software 0 04-10-2006 11:46 AM
Core Dump MrPotatoHead AIX 3 01-14-2004 09:42 AM
core dump lacrimae Linux - General 3 02-19-2002 01:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration