Commit 45143aec authored by David du Colombier's avatar David du Colombier

runtime: fix handling of GOTRACEBACK

Since CL 130990043, the GOTRACEBACK variable is
only used when the GODEBUG variable is set.
This change restores the original behavior.

LGTM=rsc
R=golang-codereviews, aram, gobot, r, rsc
CC=golang-codereviews
https://golang.org/cl/132520043
parent c3b5db89
......@@ -287,8 +287,7 @@ runtime·parsedebugvars(void)
intgo i, n;
p = runtime·getenv("GODEBUG");
if(p == nil)
return;
if(p != nil){
for(;;) {
for(i=0; i<nelem(dbgvar); i++) {
n = runtime·findnull((byte*)dbgvar[i].name);
......@@ -300,6 +299,7 @@ runtime·parsedebugvars(void)
break;
p++;
}
}
p = runtime·getenv("GOTRACEBACK");
if(p == nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment