symbols not found by gdb when using cgo (osx) #5251

Closed
gopherbot opened this Issue Apr 9, 2013 · 4 comments

Comments

Projects
None yet
3 participants

by cgmurray:

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.

Attachments:

  1. main.c (58 bytes)
  2. main.go (127 bytes)
  3. main.h (54 bytes)

Comment 1 by cgmurray:

Unable to reproduce this issue with OSX 10.8.3, go 1. 1 and gdb 7.6
Contributor

davecheney commented May 28, 2013

Comment 2:

Is there anything actionable here, or would you be happy to close this issue?

Status changed to WaitingForReply.

Comment 3 by cgmurray:

As far as I'm concerned the issue can be closed now.
Member

minux commented May 28, 2013

Comment 4:

Status changed to Retracted.

@gopherbot gopherbot locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.