Commit bfb8f2a7 authored by Hana Kim's avatar Hana Kim Committed by Hyang-Ah Hana Kim

doc/debugging_with_gdb: update -gcflags usage

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/84135Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 9d5f8eaa
......@@ -45,7 +45,7 @@ Pass the <code>'-w'</code> flag to the linker to omit the debug information
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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment