Commit ec1948a4 authored by Russ Cox's avatar Russ Cox

runtime: clear up lr comments

R=cshapiro
CC=golang-dev
https://golang.org/cl/7230052
parent e1448c07
......@@ -32,7 +32,7 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *gp, int32 skip, uintptr
waspanic = false;
// If the PC is goexit, the goroutine hasn't started yet.
if(pc == (uintptr)runtime·goexit) {
if(pc == (uintptr)runtime·goexit && gp->entry != 0) {
pc = (uintptr)gp->entry;
lr = (uintptr)runtime·goexit;
}
......
......@@ -40,19 +40,12 @@ runtime·gentraceback(byte *pc0, byte *sp, byte *lr0, G *gp, int32 skip, uintptr
waspanic = false;
// If the PC is goexit, the goroutine hasn't started yet.
if(pc0 == gp->sched.pc && sp == (byte*)gp->sched.sp && pc0 == (byte*)runtime·goexit) {
if(pc0 == gp->sched.pc && sp == (byte*)gp->sched.sp && pc0 == (byte*)runtime·goexit && gp->entry != 0) {
fp = sp;
lr = pc;
pc = (uintptr)gp->entry;
}
// If the PC is zero, it's likely a nil function call.
// Start in the caller's frame.
if(pc == 0) {
pc = lr;
lr = 0;
}
// If the PC is zero, it's likely a nil function call.
// Start in the caller's frame.
if(pc == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment