]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: print pc with fp/sp in traceback
authorAustin Clements <austin@google.com>
Fri, 9 Jun 2017 15:58:53 +0000 (11:58 -0400)
committerAustin Clements <austin@google.com>
Fri, 9 Jun 2017 17:26:56 +0000 (17:26 +0000)
If we're in a situation where printing the fp and sp in the traceback
is useful, it's almost certainly also useful to print the PC.

Change-Id: Ie48a0d5de8a54b5b90ab1d18638a897958e48f70
Reviewed-on: https://go-review.googlesource.com/45210
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/traceback.go

index 682e490debecbd7fc350f9589605be0779d0ebfb..c74d4387576281c57dd8e743b66ba24da97ea303 100644 (file)
@@ -433,7 +433,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in
                                        print(" +", hex(frame.pc-f.entry))
                                }
                                if g.m.throwing > 0 && gp == g.m.curg || level >= 2 {
-                                       print(" fp=", hex(frame.fp), " sp=", hex(frame.sp))
+                                       print(" fp=", hex(frame.fp), " sp=", hex(frame.sp), " pc=", hex(frame.pc))
                                }
                                print("\n")
                                nprint++