aboutsummaryrefslogtreecommitdiff
path: root/doc/debugging_with_gdb.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/debugging_with_gdb.html')
-rw-r--r--doc/debugging_with_gdb.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html
index f3b4e37a2..3899ac92d 100644
--- a/doc/debugging_with_gdb.html
+++ b/doc/debugging_with_gdb.html
@@ -179,7 +179,15 @@ from it.</li>
<code>"fmt.Print"</code> as an unstructured literal with a <code>"."</code>
that needs to be quoted. It objects even more strongly to method names of
the form <code>pkg.(*MyType).Meth</code>.
-<li>All global variables are lumped into package <code>"main"</code>.</li>
+<li>As of Go 1.11, debug information is compressed by default.
+Older versions of gdb, such as the one available by default on MacOS,
+do not understand the compression.
+You can generate uncompressed debug information by using <code>go
+build -ldflags=-compressdwarf=false</code>.
+(For convenience you can put the <code>-ldflags</code> option in
+the <a href="/cmd/go/#hdr-Environment_variables"><code>GOFLAGS</code>
+environment variable</a> so that you don't have to specify it each time.)
+</li>
</ol>
<h2 id="Tutorial">Tutorial</h2>
@@ -248,7 +256,7 @@ Use the <code>"l"</code> or <code>"list"</code> command to inspect source code.
</pre>
<p>
-List a specific part of the source parametrizing <code>"list"</code> with a
+List a specific part of the source parameterizing <code>"list"</code> with a
function name (it must be qualified with its package name).
</p>