diff options
| author | Cherry Zhang <cherryyz@google.com> | 2021-03-12 18:38:02 -0500 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2021-03-17 17:50:50 +0000 |
| commit | 8628bf9a972993bdb978b7d6fa7a6bb1ca2cddbe (patch) | |
| tree | 04e0ff18d1bf9b20531aeb9572a6237502e9fb58 /src/cmd/compile/internal/base | |
| parent | 0bd308ff27822378dc2db77d6dd0ad3c15ed2e08 (diff) | |
| download | go-8628bf9a972993bdb978b7d6fa7a6bb1ca2cddbe.tar.xz | |
cmd/compile: resurrect clobberdead mode
This CL resurrects the clobberdead debugging mode (CL 23924).
When -clobberdead flag is set (TODO: make it GOEXPERIMENT?), the
compiler inserts code that clobbers all dead stack slots that
contains pointers.
Mark windows syscall functions cgo_unsafe_args, as the code
actually does that, by taking the address of one argument and
passing it to cgocall.
Change-Id: Ie09a015f4bd14ae6053cc707866e30ae509b9d6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/301791
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/compile/internal/base')
| -rw-r--r-- | src/cmd/compile/internal/base/flag.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/base/flag.go b/src/cmd/compile/internal/base/flag.go index ade17fc0cd..1087f97d07 100644 --- a/src/cmd/compile/internal/base/flag.go +++ b/src/cmd/compile/internal/base/flag.go @@ -90,6 +90,7 @@ type CmdFlags struct { BuildID string "help:\"record `id` as the build id in the export metadata\"" CPUProfile string "help:\"write cpu profile to `file`\"" Complete bool "help:\"compiling complete package (no C or assembly)\"" + ClobberDead bool "help:\"clobber dead stack slots (for debugging)\"" Dwarf bool "help:\"generate DWARF symbols\"" DwarfBASEntries *bool "help:\"use base address selection entries in DWARF\"" // &Ctxt.UseBASEntries, set below DwarfLocationLists *bool "help:\"add location lists to DWARF in optimized mode\"" // &Ctxt.Flag_locationlists, set below |
