Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Side by Side Diff: src/pkg/runtime/panic.c

Issue 100870044: code review 100870044: runtime: make continuation pc available to stack walk (Closed)
Patch Set: diff -r 95cc2b2ebec5 https://code.google.com/p/go/ Created 10 years, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/mgc0.c ('k') | src/pkg/runtime/proc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/pkg/runtime/mgc0.c ('k') | src/pkg/runtime/proc.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b