-
Notifications
You must be signed in to change notification settings - Fork 18k
gdb: can't load debug symbols for cgo in 1.8 #18745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Keeping |
Couple of observations:
$ gdb cgo/1.8main
...
(gdb) list
1 go: No such file or directory.
(gdb) info source
No current source file.
(gdb) start
Temporary breakpoint 1 at 0x47bd90: file .../src/github.com/dhananjay92/cgo_debug_info/cgo/main.go, line 11.
Starting program: .../src/github.com/dhananjay92/cgo_debug_info/cgo/1.8main
...
Temporary breakpoint 1, main.main () at .../src/github.com/dhananjay92/cgo_debug_info/cgo/main.go:11
11 func main() {
(gdb) list
6 import (
7 "fmt"
8 "github.com/dhananjay92/cgo_debug_info/a"
9 )
10
11 func main() {
12 fmt.Println(a.A())
13 }
|
Your test case seems to work for me.
Simple uses of gdb seem to work too. I don't see any problems. What do you see in the objdump output? |
objdump shows same output like yours ( Does
I also tried doing the same at 1106512 (just in case), but I get the same result (gdb can't |
Thanks. I see what you mean now. |
Thank you. :) A silly question: Will this automatically get picked up in next 1.8 candidate? Or do I need to ask someone to cherry-pick it? |
This will be in the next release candidate (1.8rc3). |
What version of Go are you using (
go version
)?go1.8rc2
What operating system and processor architecture are you using (
go env
)?linux-amd64
What did you do?
Tried debugging a cgo binary compiled with 1.8rc2. gdb can't seem to load debug symbols for it, but works for pure go binary. gdb also works fine in 1.7 for both go and cgo. Here's full matrix.
dhananjay92/cgo_debug_info has the simple repro code.
The same works in 1.7 compiled cgo binary.
The text was updated successfully, but these errors were encountered: