]> Cypherpunks repositories - gostls13.git/commit
runtime: show frames for exported runtime functions
authorRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 00:35:36 +0000 (20:35 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 19 Sep 2014 00:35:36 +0000 (20:35 -0400)
commit54245cba1f5f3971c82be6d2b3e658f968f08e7b
treea2507d32d07084f74f665c8420767f11412fc994
parent5a40b568d023922e735ddc21f3b4a30d52197b7a
runtime: show frames for exported runtime functions

The current Windows build failure happens because by
default runtime frames are excluded from stack traces.
Apparently the Windows breakpoint path dies with an
ordinary panic, while the Unix path dies with a throw.
Breakpoint is a strange function and I don't mind that it's
a little different on the two operating systems.

The panic squelches runtime frames but the throw shows them,
because throw is considered something that shouldn't have
happened at all, so as much detail as possible is wanted.

The runtime exclusion is meant to prevents printing too much noise
about internal runtime details. But exported functions are
not internal details, so show exported functions.
If the program dies because you called runtime.Breakpoint,
it's okay to see that frame.
This makes the Breakpoint test show Breakpoint in the
stack trace no matter how it is handled.

Should fix Windows build.
Tested on Unix by changing Breakpoint to fault instead
of doing a breakpoint.

TBR=brainman
CC=golang-codereviews
https://golang.org/cl/143300043
src/runtime/traceback.go