Re: siginfo_t.si_code macro constants



Hi,
Thanks.
Are there going to be backported?
--
Siavosh Benabbas

On 1/17/07, David Xu <davidxu@xxxxxxxxxxx> 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
> <sys/signal.h> 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



_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: sprite format; a Select compatibility problem?
    ... Evan Clark wrote: ... then this should be reported to David. ... archive into a second zip file newly created by SparkFS. ... it are in the archives of the David Pilling Software freelists mailing ...
    (comp.sys.acorn.apps)
  • Re: Gammon Empire - playing direction?
    ... David C. Ullrich wrote: ... > You may be able to send a Cancel request, and some news servers ... > there's nothing that requires news servers or archives to ...
    (rec.games.backgammon)
  • Re: Mailing lists? French groups?
    ... tell me how to access archives. ... include header, so download the headers and pick the piccies you want. ... No direct access to fubc seems necessary and certainly no need for a "David" ...
    (uk.rec.waterways)
  • Re: Porting a new operating system
    ... I remember it was David and Neale who gave the presentation. ... The primary developer, Neale Ferguson, had also worked on the Bigfoot ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ... Search the archives at http://bama.ua.edu/archives/ibm-main.html ...
    (bit.listserv.ibm-main)