Hi Jakub,

On Thu, Nov 21, 2024 at 10:16:13AM +0100, Jakub Jelinek via Gdb wrote:
> From what I can read in gdb, it doesn't seem to care about exact standard
> revision, all it cares about is if the TU is C, C++, Fortran, Ada etc.
> So, from this POV perhaps we shouldn't switch at all and ignore all the
> post-DWARF 5 codes.
> Or shall we wait until gdb, elfutils, whatever else actually looks at
> DW_AT_language values is changed to handle the new codes and apply this
> patch after that (still one would need a new version of gdb/elfutils/etc.)?
> Or wait say half a year or year after that support is added in the
> consumers?

I'll work with Sasha to make sure support is there for binutils, gdb,
elfutils and valgrind (patches should be simple) and backport it so
those consumers should be ready before end of year.

> The DWARF 6 planned scheme was designed exactly to overcome this problem,
> consumers that only care if something is C or C++ etc. will be able to
> hardcode the code once and if they care for some behavior on something
> more specific, they can just compare the version, DW_AT_language_version >=
> 201703 for C++ (or < etc.), or for Fortran DW_AT_language_version >= 2008,
> ...

Which is obviously much nicer. But I think it will be a little
confusing to mix pre-DWARF6 (which won't be done before GCC15
releases) with DWARF5. So lets work on that for GCC16.

The patch itself looks good to me.

Cheers,

Mark

Reply via email to