1
0
mirror of https://github.com/golang/go synced 2024-10-04 14:21:21 -06:00
go/src/runtime/signals.h
Rob Pike 6e8dbc2051 - catch trace traps
- disassemble the instructions in a trace trap to see if it's a run-time trap
- if so, print relevant info
- avoid double-printing traceback on panic

R=ken,rsc
DELTA=66  (50 added, 7 deleted, 9 changed)
OCL=15199
CL=15224
2008-09-12 09:44:41 -07:00

41 lines
1.8 KiB
C

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
static struct SigTab sigtab[] = {
/* 0 */ 0, "SIGNONE: no trap",
/* 1 */ 0, "SIGHUP: terminal line hangup",
/* 2 */ 0, "SIGINT: interrupt program",
/* 3 */ 1, "SIGQUIT: quit program",
/* 4 */ 1, "SIGILL: illegal instruction",
/* 5 */ 1, "SIGTRAP: trace trap", /* used by panic and array out of bounds, etc. */
/* 6 */ 1, "SIGABRT: abort program",
/* 7 */ 1, "SIGEMT: emulate instruction executed",
/* 8 */ 1, "SIGFPE: floating-point exception",
/* 9 */ 0, "SIGKILL: kill program",
/* 10 */ 1, "SIGBUS: bus error",
/* 11 */ 1, "SIGSEGV: segmentation violation",
/* 12 */ 1, "SIGSYS: non-existent system call invoked",
/* 13 */ 0, "SIGPIPE: write on a pipe with no reader",
/* 14 */ 0, "SIGALRM: real-time timer expired",
/* 15 */ 0, "SIGTERM: software termination signal",
/* 16 */ 0, "SIGURG: urgent condition present on socket",
/* 17 */ 0, "SIGSTOP: stop",
/* 18 */ 0, "SIGTSTP: stop signal generated from keyboard",
/* 19 */ 0, "SIGCONT: continue after stop",
/* 20 */ 0, "SIGCHLD: child status has changed",
/* 21 */ 0, "SIGTTIN: background read attempted from control terminal",
/* 22 */ 0, "SIGTTOU: background write attempted to control terminal",
/* 23 */ 0, "SIGIO: I/O is possible on a descriptor",
/* 24 */ 0, "SIGXCPU: cpu time limit exceeded",
/* 25 */ 0, "SIGXFSZ: file size limit exceeded",
/* 26 */ 0, "SIGVTALRM: virtual time alarm",
/* 27 */ 0, "SIGPROF: profiling timer alarm",
/* 28 */ 0, "SIGWINCH: Window size change",
/* 29 */ 0, "SIGINFO: status request from keyboard",
/* 30 */ 0, "SIGUSR1: User defined signal 1",
/* 31 */ 0, "SIGUSR2: User defined signal 2",
};
#define NSIG 32