Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
symbols not found by gdb when using cgo (osx) #5251
What steps will reproduce the problem? Using attached files: 1. go tool cgo main.go && go build 2. gdb testcgo What is the expected output? Symbols found by gdb What do you see instead? ... BFD: /private/tmp/testcgo/testcgo: unknown load command 0x29 BFD: /private/tmp/testcgo/testcgo: unknown load command 0x29 Reading symbols from /private/tmp/testcgo/testcgo... warning: `/var/folders/73/ysvvspl16bj3pqjvyt5wr3cc0000gn/T/go-build152876071/_/tmp/testcgo/_obj/main.cgo2.o': can't open to read symbols: No such file or directory. ... similar warning emitted for main.o, gcc_amd64.o, gcc_darwin_amd64.o, gcc_setenv.o and gcc_util.o Which compiler are you using (5g, 6g, 8g, gccgo)? go tool cgo main.go && go build Which operating system are you using? osx 10.7.5 Which version are you using? (run 'go version') go version devel +1a196137ed09 Tue Apr 09 18:17:55 2013 +1000 darwin/amd64 gdb 7.5 Please provide any additional information below. osx has a concept similar to .pdb-files on windows called .dsym. Such debug-information is created using the dsymutil. A potential solution is to invoke the dsymutil and generate a .dsym-directory next to the exe prior to deleting the temporary object-files.