diff --git a/src/pkg/runtime/symtab.c b/src/pkg/runtime/symtab.c index 0346a420b54..df4c9ad76cf 100644 --- a/src/pkg/runtime/symtab.c +++ b/src/pkg/runtime/symtab.c @@ -507,6 +507,9 @@ contains(String s, int8 *p) 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."); }