aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
authorZhi Zheng <zhi.zheng052@gmail.com>2021-04-05 16:00:07 -0700
committerPatrik Nyblom <pnyb@google.com>2021-10-29 17:44:52 +0000
commit353d5b6c536c7028eba058ba27014fae0206298a (patch)
treeafc219639acf70a7a07dadf0751694aad5c8b0dc /src/runtime/stack.go
parentd8fc7f785e84515c0a5beb8baeb3c1ca35bebf68 (diff)
downloadgo-353d5b6c536c7028eba058ba27014fae0206298a.tar.xz
runtime: enable crash dump creation on Windows
This change provides ability to create dumps on Windows that can be used by "dlv core" command. Currently only full dumps can be correctly read by Delve. Below are the steps to create and use the dumps. 1. Configure Windows OS to collect dumps before running the program. Instructions on how to do the configuration are here: https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps. In order for Delve to read the dump, set the DumpType to full dump, i.e. DumpType=2. 2. Go program only generates dumps when the environment variable GOTRACEBACK is set to crash. Run command "set GOTRACEBACK=crash" before running the program. 3. Dump files will be generated in %LOCALAPPDATA%\CrashDumps 4. Use Delve command "dlv core" to open the dump, e.g.: "dlv core a.exe a.exe.3840.dmp". Fixes #20498 Change-Id: Ib9aa82e7aea9da19594dc49348876997b24e9600 Reviewed-on: https://go-review.googlesource.com/c/go/+/307372 Run-TryBot: Alessandro Arzilli <alessandro.arzilli@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Patrik Nyblom <pnyb@google.com> Trust: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions