From: Russ Cox Date: Tue, 9 Jan 2018 20:31:45 +0000 (-0500) Subject: doc/debugging_with_gdb: soften text about disabling optimizations X-Git-Tag: go1.10beta2~27 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ee34617d0d49856c61ba21a5528ab23bccad87f6;p=gostls13.git doc/debugging_with_gdb: soften text about disabling optimizations Don't suggest that it's always necessary to disable optimizations. (The text can be misread that way, even if it's not what was meant.) Change-Id: I9a2dff6a75ce4a3f9210cdf4f5bad6aaaeae9b29 Reviewed-on: https://go-review.googlesource.com/87018 Run-TryBot: Russ Cox Reviewed-by: Ian Lance Taylor --- diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html index ed59cc8a57..4573d49661 100644 --- a/doc/debugging_with_gdb.html +++ b/doc/debugging_with_gdb.html @@ -63,10 +63,9 @@ Pass the '-w' flag to the linker to omit the debug information

The code generated by the gc compiler includes inlining of function invocations and registerization of variables. These optimizations -can sometimes make debugging with gdb harder. To disable them -when debugging, pass the flags -gcflags=all="-N -l" to the -go command used to build the code being -debugged. +can sometimes make debugging with gdb harder. +If you find that you need to disable these optimizations, +build your program using go build -gcflags=all="-N -l".