]> Cypherpunks repositories - gostls13.git/commitdiff
doc/gdb: mention GOTRACEBACK=crash
authorAlberto Donizetti <alb.donizetti@gmail.com>
Mon, 9 Jan 2017 18:11:58 +0000 (19:11 +0100)
committerIan Lance Taylor <iant@golang.org>
Fri, 13 Jan 2017 18:05:46 +0000 (18:05 +0000)
Also fix a couple of other errors.

Fixes #6877

Change-Id: I94c81c5847cc7b0adab19418e71687bc2ee7fe94
Reviewed-on: https://go-review.googlesource.com/34960
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/debugging_with_gdb.html

index 52a6e76723e94b7b4743268db132dc213c91ec84..f0e65ea29126c0904086d338a7424b68b64b0897 100644 (file)
@@ -4,7 +4,8 @@
 }-->
 
 <p><i>
-This applies to the <code>gc</code> toolchain. Gccgo has native gdb support.
+This applies to the standard toolchain (the <code>gc</code> Go
+compiler and tools). Gccgo has native gdb support.
 Besides this overview you might want to consult the
 <a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
 </i></p>
@@ -49,6 +50,14 @@ when debugging, pass the flags <code>-gcflags "-N -l"</code> to the
 debugged.
 </p>
 
+<p>
+If you want to use gdb to inspect a core dump, you can trigger a dump
+on a program crash, on systems that permit it, by setting
+<code>GOTRACEBACK=crash</code> in the environment (see the
+<a href="/pkg/runtime/#hdr-Environment_Variables"> runtime package
+documentation</a> for more info).
+</p>
+
 <h3 id="Common_Operations">Common Operations</h3>
 
 <ul>
@@ -130,7 +139,7 @@ the DWARF code.
 
 <p>
 If you're interested in what the debugging information looks like, run
-'<code>objdump -W 6.out</code>' and browse through the <code>.debug_*</code>
+'<code>objdump -W a.out</code>' and browse through the <code>.debug_*</code>
 sections.
 </p>
 
@@ -377,7 +386,9 @@ $3 = struct hchan&lt;*testing.T&gt;
 </pre>
 
 <p>
-That <code>struct hchan&lt;*testing.T&gt;</code> is the runtime-internal representation of a channel.  It is currently empty, or gdb would have pretty-printed it's contents.
+That <code>struct hchan&lt;*testing.T&gt;</code> is the
+runtime-internal representation of a channel. It is currently empty,
+or gdb would have pretty-printed its contents.
 </p>
 
 <p>