From: Shenghou Ma Date: Tue, 3 Jul 2012 16:50:03 +0000 (-0400) Subject: doc/debugging_with_gdb: mention how to disable gc optimization X-Git-Tag: go1.1rc2~2838 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d9c4cef67050791892511d1c2cb653dbcb15204c;p=gostls13.git doc/debugging_with_gdb: mention how to disable gc optimization R=golang-dev, r CC=golang-dev https://golang.org/cl/6353055 --- diff --git a/doc/debugging_with_gdb.html b/doc/debugging_with_gdb.html index b2683913fc..6b1e2536e0 100644 --- a/doc/debugging_with_gdb.html +++ b/doc/debugging_with_gdb.html @@ -23,6 +23,14 @@ Pass the '-s' flag to the linker to omit the debug information (for example, go build -ldflags "-s" prog.go).

+

+The code generated by the gc compiler includes inlining of +function invocations and registerization of variables. These optimizations +can sometimes make debugging with gdb harder. To disable them +when debugging, pass the flags -gcflags "-N -l" to the +go command used to build the code being +debugged. +

Common Operations