On Sep 30, 2012 3:10 PM, "Sankar P" <sankar.c...@gmail.com> wrote:
>
> Okay. Found it myself. I just could not get the man pages of gc easily. So, for the benefit of anyone searching for this, the way is:
>
> go run -gcflags -N <filename>
you'd also need -l here to disable inlining.
go run -gcflags "-N -l" <filenames>
Okay. Found it myself. I just could not get the man pages of gc easily. So, for the benefit of anyone searching for this, the way is:
go run -gcflags -N <filename>More arguments for gcflags can be found on: http://golang.org/cmd/gc/
Am Sonntag, 30. September 2012 09:10:22 UTC+2 schrieb Sankar:Okay. Found it myself. I just could not get the man pages of gc easily. So, for the benefit of anyone searching for this, the way is:
go run -gcflags -N <filename>More arguments for gcflags can be found on: http://golang.org/cmd/gc/And the documentation on debugging is lacking this info as well. It's issue 3363
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.