Right now, GOTRACEBACK=0 means do not show any stack traces.
Unset means the default behavior (declutter by hiding runtime routines).
This CL makes GOTRACEBACK=2 mean include the runtime routines.
It avoids having to recompile the runtime when you want to see
the runtime in the tracebacks.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
5633050
bool
runtime·showframe(Func *f)
{
- // return 1; // for debugging - show all frames
- return contains(f->name, ".") && !hasprefix(f->name, "runtime.");
+ static int32 traceback = -1;
+
+ if(traceback < 0)
+ traceback = runtime·gotraceback();
+ return traceback > 1 || contains(f->name, ".") && !hasprefix(f->name, "runtime.");
}