Skip to content

Commit 99632f0

Browse files
committed
core/overreach: add finishDebugVarsSetup
1 parent 78ed7b8 commit 99632f0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

intra/core/overreach.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,27 @@ func SecureMode(new bool) (prev bool) {
4242
}
4343

4444
// RuntimeSecureMode reports whether the Go runtime is in secure mode.
45+
// github.com/golang/go/blob/e2fef50def98/src/runtime/os_linux.go#L296
4546
func RuntimeSecureMode() (them, us bool) {
4647
return runtime_isSecureMode(), secureMode
4748
}
4849

50+
// RuntimeGotraceback returns the current GOTRACEBACK settings.
51+
// github.com/golang/go/blob/e2fef50def98/src/runtime/runtime1.go#L38
4952
func RuntimeGotraceback() (l int32, all, crash bool) {
5053
return runtime_gotraceback()
5154
}
5255

56+
// RuntimeFinishDebugVarsSetup resets internal runtime debug variables
57+
// by re-reading GODEBUG & GOTRACEBACK env vars.
58+
// github.com/golang/go/blob/e2fef50def98/src/runtime/runtime1.go#L462
59+
func RuntimeFinishDebugVarsSetup() {
60+
runtime_finishDebugVarsSetup()
61+
}
62+
63+
//go:linkname runtime_finishDebugVarsSetup runtime.finishDebugVarsSetup
64+
func runtime_finishDebugVarsSetup()
65+
5366
//go:linkname runtime_isSecureMode runtime.isSecureMode
5467
func runtime_isSecureMode() bool
5568

0 commit comments

Comments
 (0)