From owner-freebsd-hackers Wed Aug 16 12:37:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from obie.softweyr.com (obie.softweyr.com [204.68.178.33]) by hub.freebsd.org (Postfix) with ESMTP id F244337B521 for ; Wed, 16 Aug 2000 12:37:15 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.com ([208.187.122.225]) by obie.softweyr.com (8.8.8/8.8.8) with ESMTP id NAA03035; Wed, 16 Aug 2000 13:35:30 -0600 (MDT) (envelope-from wes@softweyr.com) Message-ID: <399AEE74.9366689F@softweyr.com> Date: Wed, 16 Aug 2000 13:41:40 -0600 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.1-RC i386) X-Accept-Language: en MIME-Version: 1.0 To: Nicolas Leonard Cc: Samuel Tardieu , hackers@FreeBSD.ORG Subject: Re: How to generate a core dump explicily References: <00f101c00140$2a4b5a50$0f0210ac@masa.com> <2000-08-08-15-56-50+trackit+sam@inf.enst.fr> <011301c00146$c709f170$0f0210ac@masa.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Nicolas Leonard wrote: > > Sorry, I wasn't precise enough . > > In fact, I caught the SIGABRT signal (and the others signals which are > ending the program) and I'm doing some ending stuff, and after that, I > would like to dump a core file. > > I could remove the handler of SIGABRT after my ending suff done, and kill > myself another time, but I would like to know if it's possible to dump the > core explicitly. (With a dumpcore() function or whatever ) This one works: void dumpme() { int *p = 0; *p = 0xdeadbeef; } int main() { dumpme(); } -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message