Skip to content

Commit 75f4aa8

Browse files
doc: mention -compressdwarf=false on gdb page
Update #11799 Change-Id: I2646a52bfb8aecb67a664a7c6fba25511a1aa49f Reviewed-on: https://go-review.googlesource.com/138182 Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: David Chase <drchase@google.com>
1 parent 756c352 commit 75f4aa8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/debugging_with_gdb.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,15 @@ <h3 id="Known_Issues">Known Issues</h3>
180180
that needs to be quoted. It objects even more strongly to method names of
181181
the form <code>pkg.(*MyType).Meth</code>.
182182
<li>All global variables are lumped into package <code>"main"</code>.</li>
183+
<li>As of Go 1.11, debug information is compressed by default.
184+
Older versions of gdb, such as the one available by default on MacOS,
185+
do not understand the compression.
186+
You can generate uncompressed debug information by using <code>go
187+
build -ldflags=-compressdwarf=false</code>.
188+
(For convenience you can put the <code>-ldflags</code> option in
189+
the <a href="/cmd/go/#hdr-Environment_variables"><code>GOFLAGS</code>
190+
environment variable</a> so that you don't have to specify it each time.)
191+
</li>
183192
</ol>
184193

185194
<h2 id="Tutorial">Tutorial</h2>

0 commit comments

Comments
 (0)