Date: Wed, 11 Sep 2002 15:29:42 -0400 From: "C. A. Daelhousen" <cd9@buffalo.edu> To: sroberts@dsl.pipex.com, FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: Can I safely delete this? Message-ID: <20020911152942.A335@selvirjin.buffalo.edu> In-Reply-To: <20020911170811.GB93658@pacer.dmz.smartrafficenter.org>; from kpieckiel@smartrafficenter.org on Wed, Sep 11, 2002 at 01:08:11PM -0400 References: <1030190969.379.3.camel@Demon.vickiandstacey.com> <20020824101445.A211@selvirjin.alltel.net> <20020911170811.GB93658@pacer.dmz.smartrafficenter.org>
next in thread | previous in thread | raw e-mail | index | archive | help
At approximately Wed, Sep 11, 2002 at 01:08:11PM -0400, Kevin A. Pieckiel scribbled: > On Sat, Aug 24, 2002 at 10:14:45AM -0400, C. A. Daelhousen wrote: > > On Sat, Aug 24, 2002 at 01:09:28PM +0100, Stacey Roberts wrote: > > > I see this in my ~ dir: > > > -rw------- 1 <snip> <snip> 23461888 Aug 1 22:39 opera.core > > > > > > Can I safely delete this file? > > > > > > > Probably. Core files occur when you get a crash, and are only useful > > for debugging. You can change the name it drops with the kern.corefile > > sysctl, or disable them with kern.coredump. > > > > If you're really paranoid, run "file ~/opera.core" first to make sure > > it's really a core file. It should say something like: > > > > /usr/home/foo/opera.core: ELF 32-bit LSB core file (signal 4477762), > > Intel 80386, version 1 (FreeBSD), from 'opera' > > > > Note: The signal number is bogus, because the magic for that is tuned > > for Linux. > > "Tuned for Linux?" What, was this utility adopted from Linux or something? > Looking at the man page, file(1) has been around since v6, although FreeBSD's version apparently hasn't. I traced through the magic file and a couple of cores one night, and it fits Linux core files perfectly. FreeBSD uses a different core format, so you get the bogus signal number. The number is the four bytes "\0DSB", which comes from the tail of a "FreeBSD" string being converted to a 32-bit int, little endian style. (This is referring to the platform I use, which is i386.) The official ELF specification says "the content of core files is not defined". I guess what the magic ought to do is check for a "FreeBSD" string somewhere, and use a different offset to find the signal number in that case. PR 41107 is about this. http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/41107 -- ..: Chad Daelhousen == cd9@buffalo.edu :.........: sig v3.1 :... : Programming for 10 +/- 2 years (50 +/- 10% of a lifetime) : :.............Perl will be the first to implement mind reading.: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020911152942.A335>