After go1.10, compiler/linker option flags apply only to the packages
listed directly on the command line unless the matching pattern is
specified. For debugging, we want to apply the flags to all packages.
Change-Id: Ic69eee1491b1080fc140592f200c59a6e03d87ac
Reviewed-on: https://go-review.googlesource.com/84135
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The code generated by the <code>gc</code> compiler includes inlining of
function invocations and registerization of variables. These optimizations
can sometimes make debugging with <code>gdb</code> harder. To disable them
-when debugging, pass the flags <code>-gcflags "-N -l"</code> to the
+when debugging, pass the flags <code>-gcflags=all="-N -l"</code> to the
<a href="/cmd/go"><code>go</code></a> command used to build the code being
debugged.
</p>