![]() DWARF has voted in recently https://dwarfstd.org/issues/241209.1.html , which is basically just a guarantee that the DWARF 6 draft DW_AT_language_{name,version} attribute codes and content of https://dwarfstd.org/languages-v6.html can be used as an extension in DWARF 5 and won't be changed. So, this patch is an alternative to the https://gcc.gnu.org/pipermail/gcc-patches/2024-November/669671.html patch, which had the major problem that it required changing all the DWARF consumers to be able to debug C17 or later or C++17 or later sources. This patch uses still DWARF 5 DW_LANG_C11 or DW_LANG_C_plus_plus_14, the latest code in DWARF 5 proper, so all DWARF 5 capable consumers should be able to deal with that, but additionally emits the DWARF 6 attributes so that newer DWARF consumers can see it isn't just C++14 but say C++23 or C11 but C23. Consumers which don't know those DWARF 6 attributes would just ignore them. This is like any other -gno-strict-dwarf extension, except that normally we emit say DWARF 5 codes where possible only after DWARF 5 is released, while in this case there is a guarantee it can be used before DWARF 6 is released. 2025-01-08 Jakub Jelinek <jakub@redhat.com> include/ * dwarf2.h (enum dwarf_source_language): Fix comment pasto. (enum dwarf_source_language_name): New type. * dwarf2.def (DW_AT_language_name, DW_AT_language_version): New DWARF 6 codes. gcc/ * dwarf2out.cc (break_out_comdat_types): Copy over DW_AT_language_{name,version} if present. (output_skeleton_debug_sections): Remove also DW_AT_language_{name,version}. (gen_compile_unit_die): For C17, C23, C2Y, C++17, C++20, C++23 and C++26 emit for -gdwarf-5 -gno-strict-dwarf also DW_AT_language_{name,version} attributes. gcc/testsuite/ * g++.dg/debug/dwarf2/lang-cpp17.C: Add -gno-strict-dwarf to dg-options. Check also for DW_AT_language_{name,version} values. * g++.dg/debug/dwarf2/lang-cpp20.C: Likewise. * g++.dg/debug/dwarf2/lang-cpp23.C: New test. |
||
---|---|---|
.forgejo | ||
.github | ||
c++tools | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcody | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgm2 | ||
libgo | ||
libgomp | ||
libgrust | ||
libiberty | ||
libitm | ||
libobjc | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.b4-config | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
ChangeLog.jit | ||
ChangeLog.tree-ssa | ||
compile | ||
config-ml.in | ||
config.guess | ||
config.rpath | ||
config.sub | ||
configure | ||
configure.ac | ||
COPYING | ||
COPYING.LIB | ||
COPYING.RUNTIME | ||
COPYING3 | ||
COPYING3.LIB | ||
depcomp | ||
install-sh | ||
libtool-ldflags | ||
libtool.m4 | ||
ltgcc.m4 | ||
ltmain.sh | ||
ltoptions.m4 | ||
ltsugar.m4 | ||
ltversion.m4 | ||
lt~obsolete.m4 | ||
MAINTAINERS | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
SECURITY.txt | ||
symlink-tree | ||
test-driver | ||
ylwrap |
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.