mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
doc/gdb: mention GOTRACEBACK=crash
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>
This commit is contained in:
parent
4c4c5fc7a3
commit
4601eae6ba
|
@ -4,7 +4,8 @@
|
||||||
}-->
|
}-->
|
||||||
|
|
||||||
<p><i>
|
<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
|
Besides this overview you might want to consult the
|
||||||
<a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
|
<a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>.
|
||||||
</i></p>
|
</i></p>
|
||||||
|
@ -49,6 +50,14 @@ when debugging, pass the flags <code>-gcflags "-N -l"</code> to the
|
||||||
debugged.
|
debugged.
|
||||||
</p>
|
</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>
|
<h3 id="Common_Operations">Common Operations</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -130,7 +139,7 @@ the DWARF code.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
If you're interested in what the debugging information looks like, run
|
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.
|
sections.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -377,7 +386,9 @@ $3 = struct hchan<*testing.T>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
That <code>struct hchan<*testing.T></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<*testing.T></code> is the
|
||||||
|
runtime-internal representation of a channel. It is currently empty,
|
||||||
|
or gdb would have pretty-printed its contents.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
Loading…
Reference in a new issue