[Dwarf-discuss] Where can I find info about bug 583450?

David Anderson davea
Thu Mar 30 08:47:54 PST 2006


>In dwarf_form.c (libdwarf) there is a note about bug 583450. I guess
>the function to get a "constant" was split in dwarf_formsdata() and
>dwarf_formudata(). That's OK, but it also suggests that the callers
>can retry. And that is not done when printing attribute values, for
>example for DW_AT_encoding. In fact, I would rather see a
>dwarf_formconst() or something alike to deal with this.

The problem is that DW_FORM_data<n> has unspecified signedness
and only the caller can tell what the proper signedness is.

And Dwarf_Signed and Dwarf_Unsigned are distinct forms (of
necessity).

dwarf_formconst() cannot do what is necessary, so it does not exist.

>It just happens that our compiler issues a udata for AT_encoding and
>dwarfdump complains about it for (I think) no reason.

DW_AT_encoding has unspecified signedness (the DWARF document
does  not specify).
I think this is a bug in the document.
The example page 188 is no help...
Given it is a dwarf-assigned number (not compiler-assigned) , 
I think it should always be unsigned.  
But the document is not specific.

dwarfdump is inconsistent in its treatment of
DW_AT_encoding: at one point assuming sdata, at another udata. 
I'm going to change dwarfdump to be consistent, use
formudata for DW_AT_encoding (and the other attributes
along these lines).  Right now  :-)

What do you mean 'dwarfdump complains about it'?

>Before I fix this I want to know more about why this was done the way it
>is. Or is this too old? The Changelog mentions something about formsdata()
>"before May, 1996".

That bug number refers to an old IRIX compiler bug.
One of no interest to anyone any longer.

Sorry about the DW_AT_encoding mistake...
David Anderson
.
.



More information about the Dwarf-Discuss mailing list