]> Cypherpunks repositories - gostls13.git/commit
runtime: simply user throws, expand runtime throws
authorMichael Pratt <mpratt@google.com>
Mon, 7 Mar 2022 19:07:14 +0000 (14:07 -0500)
committerMichael Pratt <mpratt@google.com>
Thu, 28 Apr 2022 17:14:41 +0000 (17:14 +0000)
commit4289bd365c38a44db091396873050cab3cfa8098
tree2064c5510eb4c974fdd3e716cf96b54ff4c91d3c
parent29bbca5c2c1ad41b2a9747890d183b6dd3a4ace4
runtime: simply user throws, expand runtime throws

This gives explicit names to the possible states of throwing (-1, 0, 1).

m.throwing is now one of:

throwTypeOff: not throwing, previously == 0
throwTypeUser: user throw, previously == -1
throwTypeRuntime: runtime throw, previously == 1

For runtime throws, we now always include frame metadata and system
goroutines regardless of GOTRACEBACK to aid in debugging the runtime.

For user throws, we no longer include frame metadata or runtime frames,
unless GOTRACEBACK=system or higher.

For #51485.

Change-Id: If252e2377a0b6385ce7756b937929be4273a56c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/390421
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/HACKING.md
src/runtime/os3_plan9.go
src/runtime/panic.go
src/runtime/proc.go
src/runtime/runtime1.go
src/runtime/runtime2.go
src/runtime/signal_unix.go
src/runtime/signal_windows.go
src/runtime/traceback.go