Back to index

glibc  2.9
Functions
exc2signal.c File Reference
#include <hurd.h>

Go to the source code of this file.

Functions

void _hurd_exception2signal (int exception, int code, int subcode, int *signo, int *sigcode, int *error)

Function Documentation

void _hurd_exception2signal ( int  exception,
int  code,
int  subcode,
int signo,
int sigcode,
int error 
)

Definition at line 29 of file exc2signal.c.

{
  *error = 0;

  switch (exception)
    {
    default:
      *signo = SIGIOT;
      *sigcode = exception;
      break;

    case EXC_BAD_ACCESS:
      if (code == KERN_PROTECTION_FAILURE)
       *signo = SIGSEGV;
      else
       *signo = SIGBUS;
      *sigcode = subcode;
      *error = code;
      break;

    case EXC_BAD_INSTRUCTION:
      *signo = SIGILL;
      *sigcode = 0;
      break;

    case EXC_ARITHMETIC:
      *signo = SIGFPE;
      *sigcode = 0;
      break;

    case EXC_EMULATION:
    case EXC_SOFTWARE:
      *signo = SIGEMT;
      *sigcode = 0;
      break;

    case EXC_BREAKPOINT:
      *signo = SIGTRAP;
      *sigcode = 0;
      break;
    }
}

Here is the caller graph for this function: