On 10/20/2016 02:52 PM, Jakub Jelinek wrote:
@@ -8476,7 +8498,16 @@ size_of_die (dw_die_ref die)
             size += DWARF_OFFSET_SIZE;
          break;
        case dw_val_class_range_list:
-          size += DWARF_OFFSET_SIZE;
+         if (dwarf_split_debug_info
+             && dwarf_version >= 5
+             && a->dw_attr_val.val_entry != RELOCATED_OFFSET)

This test, here and in value_format, should be factored out into a separate function with a comment explaining why you check dwarf_split_debug_info.

In general there's a lot of code duplication between the existing ranges support and the new rnglist support; even the new vector is a superset of the old one. Why duplicate the code rather than modify it?

Jason

Reply via email to