Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-12 Thread 'David Chase' via golang-nuts
Wouldn't mind knowing the version of that Go compiler. What you see there is a bug in generated debugging information (DWARF). You might be better off using Delve; parts of the compiler are multithreaded (with goroutines, not necessarily threads that gdb understands) and that is not best case for

Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-11 Thread Ian Lance Taylor
On Mon, Mar 11, 2019 at 4:00 PM Mohit Verma 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

Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-11 Thread Mohit Verma
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/b

Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-08 Thread Ian Lance Taylor
On Fri, Mar 8, 2019 at 4:23 PM Mohit Verma wrote: > > I was looking to see how the golang compiler works, and wanted to step in to > the compilation process to see what happens. I am looking at the standard Go > compiler in src/cmd/compile from https://github.com/golang/go. > > When I try to run