From patchwork Mon Feb 9 22:20:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 4980 Received: (qmail 14839 invoked by alias); 9 Feb 2015 22:21:07 -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 14789 invoked by uid 89); 9 Feb 2015 22:21:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 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, 09 Feb 2015 22:21:04 +0000 From: Mark Wielaard To: gdb-patches@sourceware.org Cc: Mark Wielaard Subject: [PATCH] Recognize new DWARF5/GCC5 DW_LANG Fortran 2003 and Fortran 2008 standards. Date: Mon, 9 Feb 2015 23:20:50 +0100 Message-Id: <1423520450-31303-1-git-send-email-mjw@redhat.com> X-Spam-Score: -2.9 (--) DWARFv5 defines and GCC5 may output two new DW_LANG constants for the Fortran 2003 and Fortran 2008 standards. Recognize both as variants of language_fortran. gdb/ChangeLog: * dwarf2read.c (set_cu_language): Recognize DW_LANG_Fortran03 and DW_LANG_Fortran08 as language_fortran. include/ChangeLog * dwarf2.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08. http://dwarfstd.org/ShowIssue.php?issue=141121.1 The dwarf2.h from gcc already contains the same constant definitions. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f7b9b90..db35e7e 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -16925,6 +16925,8 @@ set_cu_language (unsigned int lang, struct dwarf2_cu *cu) case DW_LANG_Fortran77: case DW_LANG_Fortran90: case DW_LANG_Fortran95: + case DW_LANG_Fortran03: + case DW_LANG_Fortran08: cu->language = language_fortran; break; case DW_LANG_Go: diff --git a/include/dwarf2.h b/include/dwarf2.h index 791ef56..4ada871 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -310,6 +310,8 @@ enum dwarf_source_language DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */ DW_LANG_C11 = 0x001d, DW_LANG_C_plus_plus_14 = 0x0021, + DW_LANG_Fortran03 = 0x0022, + DW_LANG_Fortran08 = 0x0023, DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */