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

Delta Between Two Patch Sets: src/pkg/runtime/traceback_arm.c

Issue 132960044: code review 132960044: runtime: changes to g->atomicstatus (nee status) to sup... (Closed)
Left Patch Set: diff -r 47de34bbcca11cd65f683dc7ab0d1c6f088d25f6 https://code.google.com/p/go/ Created 10 years, 6 months ago
Right Patch Set: diff -r 53cc52c4a1dec1ea8ad862af822d1478b24f3d52 https://code.google.com/p/go/ Created 10 years, 6 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/stack.c ('k') | src/pkg/runtime/traceback_x86.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 #include "funcdata.h" 8 #include "funcdata.h"
9 9
10 void runtime·sigpanic(void); 10 void runtime·sigpanic(void);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 if(pc > f->entry) 319 if(pc > f->entry)
320 runtime·printf(" +%p", (uintptr)(pc - f->entry)); 320 runtime·printf(" +%p", (uintptr)(pc - f->entry));
321 runtime·printf("\n"); 321 runtime·printf("\n");
322 } 322 }
323 } 323 }
324 324
325 void 325 void
326 runtime·traceback(uintptr pc, uintptr sp, uintptr lr, G *gp) 326 runtime·traceback(uintptr pc, uintptr sp, uintptr lr, G *gp)
327 { 327 {
328 int32 n; 328 int32 n;
329 » uint32 status; 329
330 330 » if((runtime·readgstatus(gp)&~Gscan) == Gsyscall){
331 » status = runtime·readgstatus(gp);
332 » if(status == Gsyscall || status == Gscansyscall) {
333 // Override signal registers if blocked in system call. 331 // Override signal registers if blocked in system call.
334 pc = gp->syscallpc; 332 pc = gp->syscallpc;
335 sp = gp->syscallsp; 333 sp = gp->syscallsp;
336 lr = 0; 334 lr = 0;
337 } 335 }
338 336
339 // Print traceback. By default, omits runtime frames. 337 // Print traceback. By default, omits runtime frames.
340 // If that means we print nothing at all, repeat forcing all frames prin ted. 338 // If that means we print nothing at all, repeat forcing all frames prin ted.
341 n = runtime·gentraceback(pc, sp, lr, gp, 0, nil, TracebackMaxFrames, nil , nil, false); 339 n = runtime·gentraceback(pc, sp, lr, gp, 0, nil, TracebackMaxFrames, nil , nil, false);
342 if(n == 0) 340 if(n == 0)
(...skipping 13 matching lines...) Expand all
356 pc = (uintptr)runtime·getcallerpc(&skip); 354 pc = (uintptr)runtime·getcallerpc(&skip);
357 355
358 return runtime·gentraceback(pc, sp, 0, g, skip, pcbuf, m, nil, nil, fals e); 356 return runtime·gentraceback(pc, sp, 0, g, skip, pcbuf, m, nil, nil, fals e);
359 } 357 }
360 358
361 int32 359 int32
362 runtime·gcallers(G *gp, int32 skip, uintptr *pcbuf, int32 m) 360 runtime·gcallers(G *gp, int32 skip, uintptr *pcbuf, int32 m)
363 { 361 {
364 return runtime·gentraceback(~(uintptr)0, ~(uintptr)0, 0, gp, skip, pcbuf , m, nil, nil, false); 362 return runtime·gentraceback(~(uintptr)0, ~(uintptr)0, 0, gp, skip, pcbuf , m, nil, nil, false);
365 } 363 }
LEFTRIGHT

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