diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
commit | 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch) | |
tree | 4449f2036cccf162e8417cc5841a35815b3e7ac5 /doc/debugging_with_gdb.html | |
parent | c8bf49ef8a92e2337b69c14b9b88396efe498600 (diff) | |
download | golang-upstream/1.3.tar.gz |
Imported Upstream version 1.3upstream/1.3
Diffstat (limited to 'doc/debugging_with_gdb.html')
-rw-r--r-- | doc/debugging_with_gdb.html | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html index b893f931a..afaedf74c 100644 --- a/doc/debugging_with_gdb.html +++ b/doc/debugging_with_gdb.html @@ -9,6 +9,23 @@ Besides this overview you might want to consult the <a href="http://sourceware.org/gdb/current/onlinedocs/gdb/">GDB manual</a>. </i></p> +<p> +GDB does not understand Go programs well. +The stack management, threading, and runtime contain aspects that differ +enough from the execution model GDB expects that they can confuse +the debugger, even when the program is compiled with gccgo. +As a consequence, although GDB can be useful in some situations, it is +not a reliable debugger for Go programs, particularly heavily concurrent ones. +Moreover, it is not a priority for the Go project to address these issues, which +are difficult. +In short, the instructions below should be taken only as a guide to how +to use GDB when it works, not as a guarantee of success. +</p> + +<p> +In time, a more Go-centric debugging architecture may be required. +</p> + <h2 id="Introduction">Introduction</h2> <p> @@ -19,8 +36,8 @@ use to inspect a live process or a core dump. </p> <p> -Pass the <code>'-s'</code> flag to the linker to omit the debug information -(for example, <code>go build -ldflags "-s" prog.go</code>). +Pass the <code>'-w'</code> flag to the linker to omit the debug information +(for example, <code>go build -ldflags "-w" prog.go</code>). </p> <p> |