Cary, Thank you for your answer! On 08/13/2015 09:01 PM, Cary Coutant wrote: > I don't think you really need a new TAG here -- DW_TAG_constant could > just as easily take DW_AT_GNU_numerator and DW_AT_GNU_denominator as > an alternative to DW_AT_const_value. Good idea! I updated the patch accordingly. > I'm not really sure why DW_AT_small was defined to refer to a > DW_TAG_constant DIE rather than just providing the constant as the > attribute value. It would seem more efficient, space-wise, to have a > DW_AT_scale attribute that would provide a multiplicative scale > factor, and an optional DW_AT_scale_divisor to provide the denominator > if necessary. Agreed. > Another, perhaps far-fetched, alternative would be to introduce a new > form that would represent a rational constant as two unsigned LEB128 > values, and allow that form for DW_AT_const_value and/or for > DW_AT_small. Indeed, that's an option, but I find it not very convenient: a new form would require us to enhance all DWARF reading tools whereas adding new tags and attributes is very smooth (not sure this is a good reason, but anyway...). > For now, I'd suggest going with your proposal, except use the existing > DW_TAG_constant instead of a new TAG. (I.e., just add the two new > DW_AT_numerator and DW_AT_denominator attributes.) That's what I did. >> include/ >> * dwarf2.def (DW_AT_GNU_bias): New attribute. > > This is OK. Looks like a good idea to me. Great. Thank you again! I comitted the two attached (and updated) patches. I will update the corresponding dwarf2out.c changes I submitted on July as well. I also tried to create the new pages on the wiki but it says "You are not allowed to edit this page." (, I'm logged in as pmderodat). Does anyone know how I should proceed? -- Pierre-Marie de Rodat