On 12/01/2014 04:37 PM, Jakub Jelinek wrote:
for an unexpected type?
Yes: placeholder expressions are supposed only to refer to the type allowed
by the context. I updated the message to talk about the context and I added
another one for the (invalid) case when want_address == 0.
I meant that you wrote "a" rather than "an".
Argh, sorry! ;-) Back to the simple and fixed version.
- DW_AT_{lower,upper}_bound attributes are now encoded as DW_FORM_sdata
(i.e. SLEB128) instead of as DW_FORM_data1/2/4/8. This is a clear win for
negative ones.
That might be a compatibility issue for older debuggers, especially for the
strict dwarf cases. Where does this difference come from? Why doesn't
[...]
+ add_AT_unsigned (die, attr, TREE_INT_CST_LOW (value));
+ else
+ add_AT_int (die, attr, TREE_INT_CST_LOW (value));
[...]
handle it the same as it used to? Unconditional DW_FORM_sdata is certainly
not a size win for various values...
No, indeed: there are few positive values for which DW_FORM_sdata is one
byte longer than the shortest appropriate DW_FORM_data1/2/4/8. However
having different forms for the same attribute will generate as many
abbreviations. I'm not sure how to balance what is best...
Besides if I understand correctly, the behavior of the code above has
not changed. Instead, the array language hook used to call
add_descr_info_field which itself used to call add_AT_unsigned even for
signed types (instead of add_AT_int as above). Looking at add_AT_int and
size_of_die, it looks like signed types are always encoded in SLEB128 in
the "regular circuitry".
While I agree this might trigger compatibility issues with old
debuggers, I don't know what to do assuming this change is not
acceptable: should we add a kludge in add_scalar_info in order to force
unsignedness when generating debugging information for Fortran?
--
Pierre-Marie de Rodat