OLD | NEW |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 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 "stack.h" | 7 #include "stack.h" |
8 #include "malloc.h" | 8 #include "malloc.h" |
9 #include "../../cmd/ld/textflag.h" | 9 #include "../../cmd/ld/textflag.h" |
10 | 10 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 runtime·memclr((byte*)&p, sizeof p); | 219 runtime·memclr((byte*)&p, sizeof p); |
220 p.arg = e; | 220 p.arg = e; |
221 p.link = g->panic; | 221 p.link = g->panic; |
222 p.stackbase = g->stackbase; | 222 p.stackbase = g->stackbase; |
223 g->panic = &p; | 223 g->panic = &p; |
224 | 224 |
225 dabort.fn = &abortpanicV; | 225 dabort.fn = &abortpanicV; |
226 dabort.siz = sizeof(&p); | 226 dabort.siz = sizeof(&p); |
227 dabort.args[0] = &p; | 227 dabort.args[0] = &p; |
228 » dabort.argp = (void*)-1; // unused because abortpanic never recovers | 228 » dabort.argp = NoArgs; |
229 dabort.special = true; | 229 dabort.special = true; |
230 | 230 |
231 for(;;) { | 231 for(;;) { |
232 d = g->defer; | 232 d = g->defer; |
233 if(d == nil) | 233 if(d == nil) |
234 break; | 234 break; |
235 // take defer off list in case of recursive panic | 235 // take defer off list in case of recursive panic |
236 g->defer = d->link; | 236 g->defer = d->link; |
237 g->ispanic = true; // rock for runtime·newstack, where runt
ime·newstackcall ends up | 237 g->ispanic = true; // rock for runtime·newstack, where runt
ime·newstackcall ends up |
238 argp = d->argp; | 238 argp = d->argp; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 { | 557 { |
558 rundefer(); | 558 rundefer(); |
559 runtime·goexit(); | 559 runtime·goexit(); |
560 } | 560 } |
561 | 561 |
562 void | 562 void |
563 runtime·panicdivide(void) | 563 runtime·panicdivide(void) |
564 { | 564 { |
565 runtime·panicstring("integer divide by zero"); | 565 runtime·panicstring("integer divide by zero"); |
566 } | 566 } |
OLD | NEW |