sexta-feira, 10 de maio de 2019

Go com gdb

Dica do Cassio Botaro pra usar o gdb com Golang:

Build the code
   go build -gcflags "-N -l" -o gdb_sandbox debug.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.