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 #include "runtime.h" | 5 #include "runtime.h" |
6 #include "arch_GOARCH.h" | 6 #include "arch_GOARCH.h" |
7 #include "malloc.h" | 7 #include "malloc.h" |
8 | 8 |
9 void runtime·deferproc(void); | 9 void runtime·deferproc(void); |
10 void runtime·newproc(void); | 10 void runtime·newproc(void); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 if(pc > f->entry) | 140 if(pc > f->entry) |
141 runtime·printf(" +%p", (uintptr)(pc - f-
>entry)); | 141 runtime·printf(" +%p", (uintptr)(pc - f-
>entry)); |
142 runtime·printf("\n"); | 142 runtime·printf("\n"); |
143 } | 143 } |
144 n++; | 144 n++; |
145 } | 145 } |
146 ················ | 146 ················ |
147 waspanic = f->entry == (uintptr)runtime·sigpanic; | 147 waspanic = f->entry == (uintptr)runtime·sigpanic; |
148 | 148 |
149 if(pcbuf == nil && f->entry == (uintptr)runtime·newstack && g ==
m->g0) { | 149 if(pcbuf == nil && f->entry == (uintptr)runtime·newstack && g ==
m->g0) { |
150 » » » runtime·printf("----- newstack called from goroutine %d
-----\n", m->curg->goid); | 150 » » » runtime·printf("----- newstack called from goroutine %D
-----\n", m->curg->goid); |
151 pc = (uintptr)m->morepc; | 151 pc = (uintptr)m->morepc; |
152 sp = (byte*)m->moreargp - sizeof(void*); | 152 sp = (byte*)m->moreargp - sizeof(void*); |
153 lr = (uintptr)m->morebuf.pc; | 153 lr = (uintptr)m->morebuf.pc; |
154 fp = (byte*)m->morebuf.sp; | 154 fp = (byte*)m->morebuf.sp; |
155 g = m->curg; | 155 g = m->curg; |
156 stk = (Stktop*)g->stackbase; | 156 stk = (Stktop*)g->stackbase; |
157 continue; | 157 continue; |
158 } | 158 } |
159 ················ | 159 ················ |
160 if(pcbuf == nil && f->entry == (uintptr)runtime·lessstack && g =
= m->g0) { | 160 if(pcbuf == nil && f->entry == (uintptr)runtime·lessstack && g =
= m->g0) { |
161 » » » runtime·printf("----- lessstack called from goroutine %d
-----\n", m->curg->goid); | 161 » » » runtime·printf("----- lessstack called from goroutine %D
-----\n", m->curg->goid); |
162 g = m->curg; | 162 g = m->curg; |
163 stk = (Stktop*)g->stackbase; | 163 stk = (Stktop*)g->stackbase; |
164 sp = (byte*)stk->gobuf.sp; | 164 sp = (byte*)stk->gobuf.sp; |
165 pc = (uintptr)stk->gobuf.pc; | 165 pc = (uintptr)stk->gobuf.pc; |
166 fp = nil; | 166 fp = nil; |
167 lr = 0; | 167 lr = 0; |
168 continue; | 168 continue; |
169 }······· | 169 }······· |
170 ················ | 170 ················ |
171 // Unwind to next frame. | 171 // Unwind to next frame. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 int32 | 208 int32 |
209 runtime·callers(int32 skip, uintptr *pcbuf, int32 m) | 209 runtime·callers(int32 skip, uintptr *pcbuf, int32 m) |
210 { | 210 { |
211 byte *pc, *sp; | 211 byte *pc, *sp; |
212 ········ | 212 ········ |
213 sp = runtime·getcallersp(&skip); | 213 sp = runtime·getcallersp(&skip); |
214 pc = runtime·getcallerpc(&skip); | 214 pc = runtime·getcallerpc(&skip); |
215 | 215 |
216 return runtime·gentraceback(pc, sp, 0, g, skip, pcbuf, m); | 216 return runtime·gentraceback(pc, sp, 0, g, skip, pcbuf, m); |
217 } | 217 } |
LEFT | RIGHT |