[Dwarf-Discuss] dwarf_siblingof() failure
davea42 at earthlink.net
Mon Sep 15 14:44:35 PDT 2008
Ron Louzon wrote:
> I am using version 8/18/2008 of the DWARF library. My object file is generated from a GNU compiler and it is in DWARF 2 format.
> The DWARF Library correctly finds all of the compilation unit DIEs in my object file. It also correctly finds the first child DIE under each compilation unit. There is a problem when I try to get the siblings of any of those child DIEs. I am using the dwarf_siblingof() call to retrieve the sibling and this call always fails with DW_DLE_NEXT_DIE_PTR_NULL.
> Is there another way to get the next sibling of a DIE? Why does this call fail? I have successfully used this with object files generated by Mercury compilers but something is different with this GNU output.
> I really do not know how to get around this problem. Help!
The DWARF committee does not support any particular
software or any DWARF implementation.
I do support libdwarf.
An earlier version (than the one you mention) showed that error
when there were 'too many' abbreviations in one compile unit.
But that was fixed before the libdwarf-20080818.tar.gz release.
Contact me off-list. Try running dwarfdump -i on
the object file. Let me know what happens.
More information about the Dwarf-Discuss