DWARF Standard


HOME
SPECIFICATIONS
FAQ
ISSUES



210419.1 Jakub Jelinek Split DW_AT_language into DW_AT_language and DW_AT_language_version Enhancement Open


Section 3.1.1, pg 61-63
PROBLEM DESCRIPTION

Many of the DW_LANG_* codes embed a version number (typically in
a form of a year).  For debugging information consumers, whenever
new DW_LANG_* codes are added to the standard, most of the consumers
need to be changed, because typically consumers want to ask either
is the TU's implementation language C++ (or some other standard)
regardless of version, or somewhat less often is the TU's implementation
language C++11 or later.

RESOLUTION

In Table 2.2 on page 21, add
DW_AT_language_version	Programming language version
row.

In Table 3.1 on pages 61-63, add new column Default version.
In the following text, XX stands for details (typically month)
filled by respective language experts, if we don't have them in
the DWARF committee, we should talk to the standards committees,
I unfortunately don't know all languages well.

Add
DW_LANG_Ada	1983XX	ISO Ada
row before DW_LANG_Ada83, supply Default version for:
DW_LANG_Ada83	1983XX
DW_LANG_Ada95	1995XX
DW_LANG_Ada2005	2005XX
DW_LANG_Ada2012	2012XX

Change DW_LANG_C entry to
DW_LANG_C	0	ISO C or non-standardized C, such as K&R
Supply Default version for:
DW_LANG_C89	1989XX
DW_LANG_C99	199901
DW_LANG_C11	201112
DW_LANG_C17	201710

Change DW_LANG_C_plus_plus entry to
DW_LANG_C_plus_plus	199711	ISO C++
add Default version for:
DW_LANG_C_plus_plus03	199711
DW_LANG_C_plus_plus11	201103
DW_LANG_C_plus_plus14	201402
DW_LANG_C_plus_plus17	201703
DW_LANG_C_plus_plus20	202002

Add
DW_LANG_Cobol	1974XX	ISO Cobol
before DW_LANG_Cobol74 entry, add Default version for:
DW_LANG_Cobol74	1974XX
DW_LANG_Cobol85	1985XX

Add
DW_LANG_Fortran	1977XX	ISO Fortran
entry before DW_LANG_Fortran77, add Default version to:
DW_LANG_Fortran77	1977XX
DW_LANG_Fortran90	1990XX
DW_LANG_Fortran95	1995XX
DW_LANG_Fortran03	2004XX
DW_LANG_Fortran08	2010XX
DW_LANG_Fortran18	2018XX

Add
DW_LANG_Pascal	1983XX	ISO Pascal
before DW_LANG_Pascal83, add Default version to:
DW_LANG_Pascal83	1983XX
DW_LANG_PLI		1976XX

For rows where Default version is not supplied above, use version 0.
Add double dagger or another sign to all DW_LANG_* codes with versioned
suffixes for which an unversioned DW_LANG_* code is now provided and
at the end of table indicate those DW_LANG_* codes are deprecated
and producers should be emitting the unversioned code together with
DW_LANG_language_version attribute.

In Section 3.1.1 on page 63, add as new paragraph
A DW_AT_language_version attribute may be specified whose constant value
is an integer code indicating the year (multiplied by 100) plus month when
a particular version of the source language standard of the compilation
unit has been finalized.  When the attribute is omitted, default values
are specified in Table 3.1.  Zero stands for unspecified version.

In Section 3.1.3 on page 68, add
A DW_AT_language_version attribute.
bullet.

In Section 3.1.4 on page 69, add
A DW_AT_language_version attribute, whose constant value is an integer code
indicating the year (multiplied by 100) plus month when a particular
version of the source language standard used to define the type has been
finalized.

In Section 7.5.4 in Table 7.5, add
DW_AT_language_version	0x8d	constant
entry.

In Section 7.12 in Table 7.17, add
DW_LANG_Ada	0x0003	1
DW_LANG_Fortran	0x0007	1
DW_LANG_Pascal	0x0009	1
entries (making those new DW_LANG_* codes aliases of existing DW_LANG_* versioned
codes).

In Appendix A in Table A.1, add
DW_AT_language_version to DW_TAG_compile_unit, DW_TAG_partial_unit, DW_TAG_type_unit,

In Appendixes D, E and F, adjust examples to use DW_AT_language and
DW_AT_language_version attributes perhaps with DW_FORM_implicit_const.

In Appendix F in Table F.1, add
DW_AT_language_version	Y	Y	-	Y	Y
row.




All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2021 by DWARF Standards Committee.