LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build darwin freebsd linux netbsd openbsd | 5 // +build darwin freebsd linux netbsd openbsd |
6 | 6 |
7 #include "runtime.h" | 7 #include "runtime.h" |
8 #include "defs_GOOS_GOARCH.h" | 8 #include "defs_GOOS_GOARCH.h" |
9 #include "os_GOOS.h" | 9 #include "os_GOOS.h" |
10 #include "signal_GOOS_GOARCH.h" | 10 #include "signal_GOOS_GOARCH.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 runtime·printf("%s\n", runtime·sigtab[sig].name); | 104 runtime·printf("%s\n", runtime·sigtab[sig].name); |
105 | 105 |
106 runtime·printf("PC=%x\n", SIG_PC(info, ctxt)); | 106 runtime·printf("PC=%x\n", SIG_PC(info, ctxt)); |
107 if(m->lockedg != nil && m->ncgo > 0 && gp == m->g0) { | 107 if(m->lockedg != nil && m->ncgo > 0 && gp == m->g0) { |
108 runtime·printf("signal arrived during cgo execution\n"); | 108 runtime·printf("signal arrived during cgo execution\n"); |
109 gp = m->lockedg; | 109 gp = m->lockedg; |
110 } | 110 } |
111 runtime·printf("\n"); | 111 runtime·printf("\n"); |
112 | 112 |
113 if(runtime·gotraceback(&crash)){ | 113 if(runtime·gotraceback(&crash)){ |
114 » » runtime·traceback((void*)SIG_PC(info, ctxt), (void*)SIG_SP(info,
ctxt), (void*)SIG_LR(info, ctxt), gp); | 114 » » runtime·traceback(SIG_PC(info, ctxt), SIG_SP(info, ctxt), SIG_LR
(info, ctxt), gp); |
115 runtime·tracebackothers(gp); | 115 runtime·tracebackothers(gp); |
116 runtime·printf("\n"); | 116 runtime·printf("\n"); |
117 runtime·dumpregs(info, ctxt); | 117 runtime·dumpregs(info, ctxt); |
118 } | 118 } |
119 ········ | 119 ········ |
120 if(crash) | 120 if(crash) |
121 runtime·crash(); | 121 runtime·crash(); |
122 | 122 |
123 runtime·exit(2); | 123 runtime·exit(2); |
124 } | 124 } |
LEFT | RIGHT |