From 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 19 Jun 2014 09:22:53 +0200 Subject: Imported Upstream version 1.3 --- doc/debugging_with_gdb.html | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'doc/debugging_with_gdb.html') 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 GDB manual.

+

+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. +

+ +

+In time, a more Go-centric debugging architecture may be required. +

+

Introduction

@@ -19,8 +36,8 @@ use to inspect a live process or a core dump.

-Pass the '-s' flag to the linker to omit the debug information -(for example, go build -ldflags "-s" prog.go). +Pass the '-w' flag to the linker to omit the debug information +(for example, go build -ldflags "-w" prog.go).

-- cgit v1.2.3