From patchwork Mon Nov 24 19:58:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 3890 Received: (qmail 16164 invoked by alias); 24 Nov 2014 19:58:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 16151 invoked by uid 89); 24 Nov 2014 19:58:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 24 Nov 2014 19:58:51 +0000 From: Mark Wielaard To: gdb-patches@sourceware.org Cc: Mark Wielaard Subject: [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants. Date: Mon, 24 Nov 2014 20:58:16 +0100 Message-Id: <1416859096-29132-1-git-send-email-mjw@redhat.com> X-Spam-Score: -2.9 (--) The following patch is needed to recognize the new DW_LANG constants that GCC 5 might emit as implemented by this GCC patch: https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02852.html gdb/ChangeLog * dwarf2read.c (set_cu_language): Recognize DW_LANG_C11, DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14. include/ChangeLog * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and DW_LANG_C_plus_plus_14. OK to commit? Thanks, Mark diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0790388..36cbbd9 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -16711,11 +16711,14 @@ set_cu_language (unsigned int lang, struct dwarf2_cu *cu) { case DW_LANG_C89: case DW_LANG_C99: + case DW_LANG_C11: case DW_LANG_C: case DW_LANG_UPC: cu->language = language_c; break; case DW_LANG_C_plus_plus: + case DW_LANG_C_plus_plus_11: + case DW_LANG_C_plus_plus_14: cu->language = language_cplus; break; case DW_LANG_D: diff --git a/include/dwarf2.h b/include/dwarf2.h index 120e2c1..ca440dd 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -309,6 +309,10 @@ enum dwarf_source_language /* DWARF 5. */ DW_LANG_Go = 0x0016, + DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */ + DW_LANG_C11 = 0x001d, + DW_LANG_C_plus_plus_14 = 0x0021, + DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */