Russ Cox | 580ef3e | 2014-11-11 17:07:37 -0500 | [diff] [blame] | 1 | package runtime |
| 2 | |
| 3 | const ( |
| 4 | // These values are referred to in the source code |
| 5 | // but really don't matter. Even so, use the standard numbers. |
Russ Cox | 5bfed7c | 2015-01-14 11:18:24 -0500 | [diff] [blame] | 6 | _SIGQUIT = 3 |
Austin Clements | c5ed10f | 2018-04-26 21:43:19 -0400 | [diff] [blame] | 7 | _SIGTRAP = 5 |
Russ Cox | 580ef3e | 2014-11-11 17:07:37 -0500 | [diff] [blame] | 8 | _SIGSEGV = 11 |
| 9 | _SIGPROF = 27 |
| 10 | ) |
| 11 | |
| 12 | type timespec struct { |
| 13 | tv_sec int64 |
| 14 | tv_nsec int32 |
| 15 | } |
| 16 | |
| 17 | type excregs386 struct { |
| 18 | eax uint32 |
| 19 | ecx uint32 |
| 20 | edx uint32 |
| 21 | ebx uint32 |
| 22 | esp uint32 |
| 23 | ebp uint32 |
| 24 | esi uint32 |
| 25 | edi uint32 |
| 26 | eip uint32 |
| 27 | eflags uint32 |
| 28 | } |
| 29 | |
| 30 | type exccontext struct { |
| 31 | size uint32 |
| 32 | portable_context_offset uint32 |
| 33 | portable_context_size uint32 |
| 34 | arch uint32 |
| 35 | regs_size uint32 |
| 36 | reserved [11]uint32 |
| 37 | regs excregs386 |
| 38 | } |
| 39 | |
| 40 | type excportablecontext struct { |
| 41 | pc uint32 |
| 42 | sp uint32 |
| 43 | fp uint32 |
| 44 | } |