This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libdw: Add DWARF5/GCC5 DW_LANG_Fortran03 and DW_LANG_Fortran08 support.


GCC5 adds support for the new Fortran 2003 and 2008 standard DWARF5
language codes. Add them to dwarf.h and handle them in dwarf_aggregate_size.

http://dwarfstd.org/ShowIssue.php?issue=141121.1

Also documented at https://fedorahosted.org/elfutils/wiki/DwarfExtensions

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 libdw/ChangeLog              | 6 ++++++
 libdw/dwarf.h                | 2 ++
 libdw/dwarf_aggregate_size.c | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 3432557..813eab4 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,5 +1,11 @@
 2015-02-09  Mark Wielaard  <mjw@redhat.com>
 
+	* dwarf.h: Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
+	* dwarf_aggregate_size.c (array_size): Recognize array lower bound
+	for new Fortran language codes is 1.
+
+2015-02-09  Mark Wielaard  <mjw@redhat.com>
+
 	* dwarf.h: Add DW_TAG_atomic_type.
 	* libdw.h (dwarf_peel_type): Document DW_TAG_atomic_type.
 	* dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_atomic_type.
diff --git a/libdw/dwarf.h b/libdw/dwarf.h
index a97a2c3..5b88c8f 100644
--- a/libdw/dwarf.h
+++ b/libdw/dwarf.h
@@ -592,6 +592,8 @@ enum
     DW_LANG_C_plus_plus_11 = 0x001a, /* ISO C++:2011 */
     DW_LANG_C11 = 0x001d,	     /* ISO C:2011 */
     DW_LANG_C_plus_plus_14 = 0x0021, /* ISO C++:2014 */
+    DW_LANG_Fortran03 = 0x0022,	     /* ISO/IEC 1539-1:2004 */
+    DW_LANG_Fortran08 = 0x0023,	     /* ISO/IEC 1539-1:2010 */
 
 
     DW_LANG_lo_user = 0x8000,
diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c
index 667c274..0247847 100644
--- a/libdw/dwarf_aggregate_size.c
+++ b/libdw/dwarf_aggregate_size.c
@@ -123,6 +123,8 @@ array_size (Dwarf_Die *die, Dwarf_Word *size,
 		    case DW_LANG_Fortran77:
 		    case DW_LANG_Fortran90:
 		    case DW_LANG_Fortran95:
+		    case DW_LANG_Fortran03:
+		    case DW_LANG_Fortran08:
 		    case DW_LANG_Pascal83:
 		    case DW_LANG_Modula2:
 		    case DW_LANG_PL1:
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]