[Dwarf-discuss] Encoding fixed-point types

Paul Hilfinger hilfingr
Tue Jun 28 02:38:21 GMT 2005


The Ada language provides fixed-point types, defined to represent a set
of rational numbers consisting of a lower bound added to multiples
of some fixed real increment or delta.   They are sometimes called
scaled integers, since their representation typically consists of an integer
representing a multiple of the fixed delta.  

It appears that at the moment, Dwarf provides no way to represent such
types.  Ideally, we would like to propose the addition of a standard
DW_AT_scaling attribute.  Failing that, we'd appreciate any advice on
the right formulation for a vendor-supplied attribute.

The tricky part is that this particular attribute does not lend itself to
representation by a single integer.  A ratio of two integers would work, 
but that would seem to require two attributes, which seems inelegant.  
My only other thought is a string containing a fraction, as in
"1/1024".  That does the job, although it seems kludgy.  

Comments appreciated.

Paul Hilfinger
AdaCore





More information about the Dwarf-discuss mailing list