aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceback.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2017-06-09 11:58:53 -0400
committerAustin Clements <austin@google.com>2017-06-09 17:26:56 +0000
commit27f88731eba585e1d9b5e425f61d270ff170ed68 (patch)
tree7bc0140b17d8fa533841e4313c461e9df0e6d379 /src/runtime/traceback.go
parentf749f856f4867b59cadc66c8eed30e0f9de1bcb3 (diff)
downloadgo-27f88731eba585e1d9b5e425f61d270ff170ed68.tar.xz
runtime: print pc with fp/sp in traceback
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>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r--src/runtime/traceback.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go
index 682e490deb..c74d438757 100644
--- a/src/runtime/traceback.go
+++ b/src/runtime/traceback.go
@@ -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++