This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA] add DW_LANG_Rust
- From: Tom Tromey <tom at tromey dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 Apr 2016 16:05:59 -0600
- Subject: [RFA] add DW_LANG_Rust
- Authentication-results: sourceware.org; auth=none
Hi. I've been working on Rust support for gdb, and I needed this patch
as a prerequisite.
DW_LANG_Rust is only defined in DWARF 5, which isn't released yet.
However, the value is mentioned in the DWARF issue requesting the
addition; and similar DWARF-5-only constants have already been added to
dwarf2.h.
I added DW_LANG_Rust_old because some versions of the Rust compiler use
this value and it's nice to have a name for it.
Ok?
Tom
2016-04-26 Tom Tromey <tom@tromey.com>
* dwarf2.h (enum dwarf_source_language) <DW_LANG_Rust,
DW_LANG_Rust_old>: New constants.
diff --git a/include/dwarf2.h b/include/dwarf2.h
index 4ada871..1a145aa 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 and
DWARF3 symbolic debugging information formats.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -308,6 +308,7 @@ enum dwarf_source_language
DW_LANG_Go = 0x0016,
DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
+ DW_LANG_Rust = 0x001c,
DW_LANG_C11 = 0x001d,
DW_LANG_C_plus_plus_14 = 0x0021,
DW_LANG_Fortran03 = 0x0022,
@@ -325,7 +326,10 @@ enum dwarf_source_language
DW_LANG_HP_Basic91 = 0x8004,
DW_LANG_HP_Pascal91 = 0x8005,
DW_LANG_HP_IMacro = 0x8006,
- DW_LANG_HP_Assembler = 0x8007
+ DW_LANG_HP_Assembler = 0x8007,
+
+ /* Rust extension, but replaced in DWARF 5. */
+ DW_LANG_Rust_old = 0x9000
};
/* Names and codes for macro information. */