]> Cypherpunks repositories - gostls13.git/commitdiff
doc/debugging_with_gdb: update -gcflags usage
authorHana Kim <hakim@google.com>
Thu, 14 Dec 2017 21:11:03 +0000 (16:11 -0500)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Fri, 15 Dec 2017 15:00:46 +0000 (15:00 +0000)
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>
doc/debugging_with_gdb.html

index 633d058c11164c38095d428afe63f79b18ffcf77..dc8147806bbca2c285b7807a134ec5f4add38586 100644 (file)
@@ -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>