On Tue, Mar 31, 2020 at 5:19 PM sanye <xba...@gmail.com> wrote: > > Hello gophers, > I have a problem when debugging with gdb using go1.14/1.14.1, set a > breakpoint on entrypoint will not show line and file information, but > go1.13.9 and older versions have, here is the detail > > demo.go > ---------------- > package main > > func main() { > println("hello world") > } > > build > ---------------- > go build -gcflags "all=-N -l" demo.go > > go1.13.9 > ----------------- > $ go version > go version go1.13.9 linux/amd64 > $ go build -gcflags "all=-N -l" demo.go > $ gdb ./demo > ... > (gdb) info files > Symbols from "/dev/shm/ex/demo". > Local exec file: > `/dev/shm/ex/demo', file type elf64-x86-64. > Entry point: 0x4542a0 > ... > (gdb) b *0x4542a0 > Breakpoint 1 at 0x4542a0: file /dev/shm/ex/go/src/runtime/rt0_linux_amd64.s, > line 8. > > go1.14/go1.14.1 > ---------------- > $ go version > go version go1.14.1 linux/amd64 > $ go build -gcflags "all=-N -l" demo.go > $ gdb ./demo > ... > (gdb) info files > Symbols from "/dev/shm/ex/demo". > Local exec file: > `/dev/shm/ex/demo', file type elf64-x86-64. > Entry point: 0x45cdd0 > ... > (gdb) b *0x45cdd0 > Breakpoint 1 at 0x45cdd0 > > any help would be appreciated
Odd. I can recreate this, but I don't know what is going on here. Please open a bug report at https://golang.org/issue. Thanks. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWwbswFmYZmBV5vto9gvP%2Bn_ufw8VR1D9sGL38CX0rn_g%40mail.gmail.com.