From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 6 22:08:15 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4BFA016A40F for ; Wed, 6 Dec 2006 22:08:15 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout7.cac.washington.edu (mxout7.cac.washington.edu [140.142.32.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C0C043CD6 for ; Wed, 6 Dec 2006 22:06:58 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout7.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB6Juuh6017375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Dec 2006 11:56:56 -0800 X-Auth-Received: from [128.208.1.158] (sfrench.cs.washington.edu [128.208.1.158]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB6Juu9f023768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 6 Dec 2006 11:56:56 -0800 Message-ID: <45772088.4090402@u.washington.edu> Date: Wed, 06 Dec 2006 11:56:56 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (X11/20061108) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <457713C8.6020204@u.washington.edu> <45771F7D.8070006@gmail.com> In-Reply-To: <45771F7D.8070006@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.6.114432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: Forcing C program to core dump X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2006 22:08:15 -0000 Niclas Zeising wrote: > Garrett Cooper wrote: >> Hello, >> This may be obvious to some, but after some Googling (apparently >> with the wrong search terms, perhaps) and reading the gcc/gdb >> manpages, I can't seem to find out how to get a program to produce >> core dumps. >> So I was wondering, is there some simple means to produce core >> dumps or a set of conditions that I need to adhere to in order to get >> the OS to core dump the progrdam??? >> Thanks, >> -Garrett > > Just kill it with the abort signal (SIGABRT) or some other signal that > makes the program dump core. Be aware though that if you are catching > or ignoring the signal, this won't work. > Regards! > //Niclas Wow. I got a lot of interesting ways to kill and force a coredump. Haha... Not quite what I had in mind, but I guess that's what I get for improperly wording the question. Thank you all, the information I've gotten recently is definitely educational and it'll probably end up being useful later! -Garrett