Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2006 20:45:07 +0100
From:      Viktor Vasilev <viktor.vasilev@stud.tu-darmstadt.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Forcing C program to core dump
Message-ID:  <200612062045.15184.viktor.vasilev@stud.tu-darmstadt.de>
In-Reply-To: <457713C8.6020204@u.washington.edu>
References:  <457713C8.6020204@u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2038530.FYutxRTgzK
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Wednesday 06 December 2006 20:02 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???

Some signals default action is to cause the program to dump core,=20
when they're delivered. You can see the list in the signal(3) man=20
page. libc also provides the abort(3) function, which does what=20
you want. The code is here:

  /usr/src/lib/libc/stdlib/abort.c


Cheers,
Vik
=2D-=20
PGP Key: 0xE09DC8D8/6799 4011 EBDE 6412 05A1 090C DBDF 5887 E09D C8D8
Signed/encrypted mail welcome!

--nextPart2038530.FYutxRTgzK
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQBFdx3L299Yh+CdyNgRArFeAJ9RuJAW4b9BYps1fWh4VaIHMgksmgCeJXyR
RClm1OThsTlFCLpE+Ng9mv0=
=oCBt
-----END PGP SIGNATURE-----

--nextPart2038530.FYutxRTgzK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612062045.15184.viktor.vasilev>