mirror of
https://github.com/golang/go
synced 2024-11-26 20:51:23 -07:00
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/84135 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
9d5f8eaa8a
commit
bfb8f2a765
@ -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
|
The code generated by the <code>gc</code> compiler includes inlining of
|
||||||
function invocations and registerization of variables. These optimizations
|
function invocations and registerization of variables. These optimizations
|
||||||
can sometimes make debugging with <code>gdb</code> harder. To disable them
|
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
|
<a href="/cmd/go"><code>go</code></a> command used to build the code being
|
||||||
debugged.
|
debugged.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user