On Mon, Mar 11, 2019 at 4:00 PM Mohit Verma <
vmoh...@gmail.com> wrote:
>
> Thanks Ian. This helped me to identify what processes are launched when go build is called.
> I then ran gdb just for the process that compiled the file for which I wanted to debug the compilation:
>
> gdb --args /home/administrator/Work/go/src/go/pkg/tool/linux_amd64/compile -o /tmp/go-build037119929/b001/_pkg_.a -trimpath /tmp/go-build037119929/b001 -p main -complete -buildid Y52EEDh5fr669VPNVIvF/Y52EEDh5fr669VPNVIvF -D _/home/administrator/Work/go/src/example_test -importcfg /tmp/go-build037119929/b001/importcfg -pack -c=4 ./example.go
>
> Although I get this error when setting any breakpoint:
> Dwarf Error: Cannot find DIE at 0x182106 referenced from DIE at 0x1892a7
>
> Do I need to build the Go compiler differently to be able to debug it? Currently, I am just building it through make.bash from the src/ directory.
Unfortunately I do not know what this problem is. I haven't seen this
problem. You could try running Delve instead, though I don't know