This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [binutils patch] DWARF-5: readelf: .debug_names

Hi Jan,

> thanks for the approval but I cannot check it in yet as it depends on:
> 	[gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external


>>> +      printf (_("Version %ld\n"), (long) dwarf_version);
>>> +      if (dwarf_version != 5)
>> Shouldn't this test be for >= 5 ?
> 0..4: Such .debug_names format has never been defined anywhere.
> 5: The supported version.
> 6..65535: Their format may/will change, I do not think readelf should attempt
> 	  decoding future unknown data format.
> It is written similarly as .gdb_index version check is written:
>    /* Prior versions are obsolete, and future versions may not be
>       backwards compatible.  */
>    if (version < 3 || version > 8)
>      {
>        warn (_("Unsupported version %lu.\n"), (unsigned long) version);
>        return 0;
>      }

Fair enough - but please could you add a comment to this effect so that future
readers of the code do wonder about the version check.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]