[Dwarf-discuss] Encoding fixed-point types

Ron 603-884-2088 brender
Tue Jun 28 09:49:09 GMT 2005


Paul Hilfinger wrote:
>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.  

Take a look at Issue 020401.1 in

  http://dwarf.freestandards.org/ShowIssue.php?issue=020401.1&type=closed

Don't be put off by the title which refers to COBOL data types.
It does include fixed point types with binary, decimal or arbitrary
"small" (inspired by Ada) scale factors. I think it covers what you
seek.

This item was officially adopted very recently.

Ron





More information about the Dwarf-discuss mailing list