From louzonr@yahoo.com  Mon Sep 15 21:05:45 2008
From: louzonr@yahoo.com (Ron Louzon)
Date: Mon, 15 Sep 2008 14:05:45 -0700 (PDT)
Subject: [Dwarf-Discuss] dwarf_siblingof() failure
Message-ID: <302756.20543.qm@web52505.mail.re2.yahoo.com>

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!

Thanks,
Ron


      



From davea42@earthlink.net  Mon Sep 15 21:44:35 2008
From: davea42@earthlink.net (David Anderson)
Date: Mon, 15 Sep 2008 14:44:35 -0700
Subject: [Dwarf-Discuss] dwarf_siblingof() failure
In-Reply-To: <302756.20543.qm@web52505.mail.re2.yahoo.com>
References: <302756.20543.qm@web52505.mail.re2.yahoo.com>
Message-ID: <48CED743.40101@earthlink.net>

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.
David Anderson



