Attempting to debug a kernel issue and wanted to see the layout of a struct with pahole (dwarves-1.9-1.fc16.x86_64). When I do so, I get the following spew: # pahole -C mid_q_entry fs/cifs/cifs.ko DW_AT_<0x3c>=0x19 DW_AT_<0x3c>=0x19 [...same line repeated many times...] DW_AT_<0x3c>=0x19 DW_AT_<0x3c>=0x19 die__process_function: DW_TAG_INVALID (0x4109) @ <0x14876> not handled! I also get similar errors on recently built userspace programs.
I ran accross the same issue but I am not sure this is a pahole problem. I tried running an old version on FC16 or the latest on FC15 and they both fail. I'd say the problem comes from bad debug info produced by the latest version of GCC....
Created attachment 561575 [details] Hack patch to make pahole work again. This is likely the wrong fix, but it at least makes pahole work again.
I pushed placeholders for DW_TAG_GNU_call_site (0x4109) and DW_TAG_GNU_call_site_parameter on the DW_TAG_subprogram and DW_TAG_inlined_subroutine handlers. Because we need to handle it there at some point, but yeah, the solution is almost what Lennert proposed, modulo the fact we need to check if die__process_tag found an unhandled DWARF tag like this new 0x4109 or if ENOMEM really hapenned, leading to it returning NULL.o Fixes in: git://git.kernel.org/pub/scm/devel/pahole/pahole.git http://git.kernel.org/?p=devel/pahole/pahole.git;a=summary Just installing all of the debuginfo packages in F16 and F17 Beta x86_64 to run pahole and pfunct before and after these and the DWARF4 support patches I merged from Tom Tromey.
I've tested the code pulled from the git repo. It works fine! Could you make a new release?
Thanks a lot for testing and reporting, I'll tag it and release ASAP.
dwarves-1.10-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/dwarves-1.10-1.fc17
dwarves-1.10-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/dwarves-1.10-1.fc16
dwarves-1.10-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/dwarves-1.10-1.fc15
Package dwarves-1.10-1.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dwarves-1.10-1.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-8660/dwarves-1.10-1.fc17 then log in and leave karma (feedback).
When is the newer package released?
dwarves-1.10-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
dwarves-1.10-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
I still have the issue with 1.10-1: $ pahole unit0.elf die__process_function: DW_TAG_INVALID (0x4109) @ <0x9c4> not handled! $ rpm -q dwarves dwarves-1.10-1.fc17.x86_64 Note: The binary is not i686 or x86_64 ELF but a custom arch and built with a gcc 4.7-0 Problem does not show using dwarves 1.10-2 on FC18..