1
0
mirror of https://github.com/golang/go synced 2024-11-19 16:24:45 -07:00
go/src/runtime/defs_nacl_386.go
Russ Cox 5bfed7c6c0 runtime: log all thread stack traces during GODEBUG=crash on Linux and OS X
Normally, a panic/throw only shows the thread stack for the current thread
and all paused goroutines. Goroutines running on other threads, or other threads
running on their system stacks, are opaque. Change that when GODEBUG=crash,
by passing a SIGQUIT around to all the threads when GODEBUG=crash.
If this works out reasonably well, we might make the SIGQUIT relay part of
the standard panic/throw death, perhaps eliding idle m's.

Change-Id: If7dd354f7f3a6e326d17c254afcf4f7681af2f8b
Reviewed-on: https://go-review.googlesource.com/2811
Reviewed-by: Rick Hudson <rlh@golang.org>
2015-01-14 18:33:38 +00:00

44 lines
750 B
Go

package runtime
const (
// These values are referred to in the source code
// but really don't matter. Even so, use the standard numbers.
_SIGQUIT = 3
_SIGSEGV = 11
_SIGPROF = 27
)
type timespec struct {
tv_sec int64
tv_nsec int32
}
type excregs386 struct {
eax uint32
ecx uint32
edx uint32
ebx uint32
esp uint32
ebp uint32
esi uint32
edi uint32
eip uint32
eflags uint32
}
type exccontext struct {
size uint32
portable_context_offset uint32
portable_context_size uint32
arch uint32
regs_size uint32
reserved [11]uint32
regs excregs386
}
type excportablecontext struct {
pc uint32
sp uint32
fp uint32
}