From owner-freebsd-arch@FreeBSD.ORG Thu Jan 18 04:20:49 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3FED16A519 for ; Thu, 18 Jan 2007 04:20:48 +0000 (UTC) (envelope-from sbenabas@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 7742213C465 for ; Thu, 18 Jan 2007 04:20:48 +0000 (UTC) (envelope-from sbenabas@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so68014uge for ; Wed, 17 Jan 2007 20:20:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=CdpElUZCAgmntqy0LV6K7EF+WoBwnKZbnbw70TnZz4GvLIRkXrlMj0SoQn+7PHurI935nmmobmlePN/SgWtsrqHoOh1+V5WuLmG3Apm7CKPOzsI1gXSEzsuqo7rzsPI/GVsGUcp8NOWVBb6coXh/YiCX8yzy3PgdsQNdrXeRwWs= Received: by 10.66.242.20 with SMTP id p20mr639533ugh.1169094047388; Wed, 17 Jan 2007 20:20:47 -0800 (PST) Received: by 10.67.101.20 with HTTP; Wed, 17 Jan 2007 20:20:42 -0800 (PST) Message-ID: <32d8477c0701172020v5fff119dxce8d1a20d775339d@mail.gmail.com> Date: Wed, 17 Jan 2007 23:20:42 -0500 From: "Siavosh Benabbas" To: "David Xu" In-Reply-To: <45AEEC79.3050901@freebsd.org> MIME-Version: 1.0 References: <32d8477c0701171856i6f7c4cdy384ad2e10086a65f@mail.gmail.com> <45AEEC79.3050901@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-arch@freebsd.org Subject: Re: siginfo_t.si_code macro constants X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 04:20:49 -0000 Hi, Thanks. Are there going to be backported? -- Siavosh Benabbas On 1/17/07, David Xu wrote: > > Siavosh Benabbas wrote: > > Hi, > > I am trying to compile parted on freebsd and I came across this. It > seems > > that many macro constants of POSIX that one should be able to check the > > value of siginfo_t.si_code in a 3 parameter signal handler (set by > > sigaction) are missing. These in particular include SEGV_MAPPER, > > SEGV_ACCERR, and many ILL_* constants the man page of sigaction > mentions: > > > > "The code argument of the BSD-style handler and the si_code member > of > > the > > info argument to a SA_SIGINFO handler contain a numeric code > explaining > > the cause of the signal, usually one of the SI_... values from > > or codes specific to a signal, i.e., one of the > FPE_... > > values for SIGFPE." > > > > But it doesn't specifically list the macro's available. According to the > > POSIX standard there should be some SEGV_* and ILL_* constants too. I > > searched in the archives and it seems that this was pointed out around a > > year ago. The mail in the archive also mentioned that siginfo_t.si_code > > actually gets populated but there is no constant to check this against. > The > > following is from (a distribution of) linux's man page for sigaction > > describing some of the constants available on Linux: > > > > +-------------------------------------+ > > | SIGILL | > > +-----------+-------------------------+ > > |ILL_ILLOPC | illegal opcode | > > +-----------+-------------------------+ > > |ILL_ILLOPN | illegal operand | > > +-----------+-------------------------+ > > |ILL_ILLADR | illegal addressing mode | > > +-----------+-------------------------+ > > |ILL_ILLTRP | illegal trap | > > +-----------+-------------------------+ > > |ILL_PRVOPC | privileged opcode | > > +-----------+-------------------------+ > > |ILL_PRVREG | privileged register | > > +-----------+-------------------------+ > > |ILL_COPROC | coprocessor error | > > +-----------+-------------------------+ > > |ILL_BADSTK | internal stack error | > > +-----------+-------------------------+ > > .... > > +----------------------------------------------------+ > > | SIGSEGV | > > +------------+---------------------------------------+ > > |SEGV_MAPERR | address not mapped to object | > > +------------+---------------------------------------+ > > |SEGV_ACCERR | invalid permissions for mapped object | > > +------------+---------------------------------------+ > > .... > > > > Unfortunately I lack the expertise to implement any of these but I > > wanted to > > ask if anybody has a similar problem and/or is working on this. > > > > Thanks, > > Siavosh Benabbas > > These codes are defined in -HEAD branch, RELENG_6 does not have > them, I had added them when I was implementing signal queue. > > Regards, > David Xu > > >