Skip to content
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

cmd/ld: older gdb cannot parse dwarf3 output #3436

Closed
rsc opened this issue Mar 30, 2012 · 5 comments
Closed

cmd/ld: older gdb cannot parse dwarf3 output #3436

rsc opened this issue Mar 30, 2012 · 5 comments

Comments

@rsc
Copy link
Contributor

rsc commented Mar 30, 2012

I get 
$ gdb server
GNU gdb Fedora (6.8-32.fc10)
...
Dwarf Error: Could not find abbrev number 16008 [in module server]

Will mail lvd a binary.
@lvdlvd
Copy link

lvdlvd commented Mar 30, 2012

Comment 1:

Gdb pre 7 does not understand DWARF3. objdump -W looks completely sane and GNU gdb (GDB)
7.3.1-gg4 happily lists variables and types.

@rsc
Copy link
Contributor Author

rsc commented Mar 30, 2012

Comment 2:

Okay.  That's not such a big deal.  
We're using dwarf3 because something about dwarf2 wasn't good enough, I assume?
This can be a wish for someone who really cares instead of something we need to fix.

Labels changed: added priority-someday, removed priority-later.

Status changed to HelpWanted.

@lvdlvd
Copy link

lvdlvd commented Mar 30, 2012

Comment 3:

i read back the threads from sept 2009, and my interactions with gdb and
apple people. looks like I abandoned the dwarf 2 attempts for reasons that
may have disappeared later.  I can try and see if it works on macos and/or
older linux now.  should be  a matter of changing the lines marked 'dwarf
version (appendix F)' in dwarf.c

@lvdlvd
Copy link

lvdlvd commented Mar 30, 2012

Comment 4:

quick experiment on macos (GNU gdb 6.3.50-20050815 (Apple version gdb-1708)
(Mon Aug 15 16:03:10 UTC 2011)) shows that the
   Dwarf Error: wrong version in compilation unit header (is 3, should be
2)
message goes away, and then i get the same
Dwarf Error: Could not find abbrev number 97 [in module
/Users/lvd/Project/go/bin/go]
but i get the same with gdb7.2 that before prsed the same dwarf with
version 3.  so it's time to have a look at what's actually going on instead
of random poking, because that looks pormising.
turns out debug_pubtypes didnt exist in dwarf2 for example, and _frame
should get version 1 there.

@rsc
Copy link
Contributor Author

rsc commented Mar 19, 2013

Comment 5:

This issue was closed by revision 40d356e.

Status changed to Fixed.

@rsc rsc added fixed labels Mar 19, 2013
@golang golang 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.
Projects
None yet
Development

No branches or pull requests

3 participants