]> Cypherpunks repositories - gostls13.git/commit
runtime: show runtime.panic frame in traceback
authorRuss Cox <rsc@golang.org>
Wed, 11 Sep 2013 15:59:19 +0000 (11:59 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 11 Sep 2013 15:59:19 +0000 (11:59 -0400)
commitfa4984d535b23c0d2b14650a8842d63083893af3
tree15b072d61bc27e6cf175524b4ada5261bf36a53b
parent382738af513a5390620b55a84b9e14f3afd0128e
runtime: show runtime.panic frame in traceback

Otherwise, if panic starts running deferred functions,
the code that panicked appears to be calling those
functions directly, which is not the case and can be
confusing.

For example:

main.Two()
        /Users/rsc/x.go:12 +0x2a
runtime.panic(0x20dc0, 0x2100cc010)
        /Users/rsc/g/go/src/pkg/runtime/panic.c:248 +0x106
main.One()
        /Users/rsc/x.go:8 +0x55

This makes clear(er) that main.Two is being called during
a panic, not as a direct call from main.One.

Fixes #5832.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13302051
src/pkg/runtime/symtab.c