public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH 4/9] libdw: DWARF5 Add new DW_LANG codes and default lower array bound.
Date: Wed, 26 Jul 2017 22:08:00 -0000	[thread overview]
Message-ID: <1501106866-5846-5-git-send-email-mark@klomp.org> (raw)
In-Reply-To: <1501106866-5846-1-git-send-email-mark@klomp.org>

Add DW_LANG_OpenCL, DW_LANG_Modula3, DW_LANG_C_plus_plus_03,
DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, DW_LANG_Julia,
DW_LANG_Dylan, DW_LANG_RenderScript and DW_LANG_BLISS to dwarf.h.

Update default language array lower bounds in dwarf_aggregate_size.c.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 ChangeLog                    |  4 ++--
 NEWS                         |  4 ++--
 libdw/ChangeLog              | 11 +++++++++++
 libdw/dwarf.h                | 11 ++++++++++-
 libdw/dwarf_aggregate_size.c | 12 ++++++++++++
 5 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cd91c5a..d133061 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 2017-07-25  Mark Wielaard  <mark@klomp.org>
 
-	* NEWS: Mention new DWARF5 attributes, tags and character encodings
-	in dwarf.h.
+	* NEWS: Mention new DWARF5 attributes, tags, character encodings
+	and language codes in dwarf.h.
 
 2017-07-18  Mark Wielaard  <mark@klomp.org>
 
diff --git a/NEWS b/NEWS
index 9437061..2039cfe 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 Version 0.170
 
-libdw: Added new DWARF5 attribute, tag and character encodings constants
-       to dwarf.h.
+libdw: Added new DWARF5 attribute, tag, character encodings constants and
+       language codes to dwarf.h.
 
 strip: Add -R, --remove-section=SECTION and --keep-section=SECTION.
 
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index 25a9648..39a9c1d 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,5 +1,16 @@
 2017-07-26  Mark Wielaard  <mark@klomp.org>
 
+	* dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3,
+	DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
+	DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS.
+	* dwarf_aggregate_size.c (array_size): Add lower bound for
+	DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL,
+	DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift,
+	DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3,
+	DW_LANG_Julia and DW_LANG_BLISS.
+
+2017-07-26  Mark Wielaard  <mark@klomp.org>
+
 	* dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII.
 
 2017-07-25  Mark Wielaard  <mark@klomp.org>
diff --git a/libdw/dwarf.h b/libdw/dwarf.h
index 4072272..dd4384f 100644
--- a/libdw/dwarf.h
+++ b/libdw/dwarf.h
@@ -652,14 +652,23 @@ enum
     DW_LANG_UPC = 0x0012,	     /* Unified Parallel C */
     DW_LANG_D = 0x0013,		     /* D */
     DW_LANG_Python = 0x0014,	     /* Python */
+    DW_LANG_OpenCL = 0x0015,	     /* OpenCL */
     DW_LANG_Go = 0x0016,	     /* Go */
+    DW_LANG_Modula3 = 0x0017,	     /* Modula-3 */
     DW_LANG_Haskell = 0x0018,	     /* Haskell */
+    DW_LANG_C_plus_plus_03 = 0x0019, /* ISO C++:2003 */
     DW_LANG_C_plus_plus_11 = 0x001a, /* ISO C++:2011 */
+    DW_LANG_OCaml = 0x001b,	     /* OCaml */
+    DW_LANG_Rust = 0x001c,	     /* Rust */
     DW_LANG_C11 = 0x001d,	     /* ISO C:2011 */
+    DW_LANG_Swift = 0x001e,	     /* Swift */
+    DW_LANG_Julia = 0x001f,	     /* Julia */
+    DW_LANG_Dylan = 0x0020,	     /* Dylan */
     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_RenderScript = 0x0024,   /* RenderScript Kernal Language */
+    DW_LANG_BLISS = 0x0025,	     /* BLISS */
 
     DW_LANG_lo_user = 0x8000,
     DW_LANG_Mips_Assembler = 0x8001, /* Assembler */
diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c
index 52ef006..0472a9b 100644
--- a/libdw/dwarf_aggregate_size.c
+++ b/libdw/dwarf_aggregate_size.c
@@ -105,14 +105,24 @@ array_size (Dwarf_Die *die, Dwarf_Word *size,
 		    case DW_LANG_C99:
 		    case DW_LANG_C11:
 		    case DW_LANG_C_plus_plus:
+		    case DW_LANG_C_plus_plus_03:
 		    case DW_LANG_C_plus_plus_11:
 		    case DW_LANG_C_plus_plus_14:
 		    case DW_LANG_ObjC:
 		    case DW_LANG_ObjC_plus_plus:
 		    case DW_LANG_Java:
 		    case DW_LANG_D:
+		    case DW_LANG_Python:
 		    case DW_LANG_UPC:
+		    case DW_LANG_OpenCL:
 		    case DW_LANG_Go:
+		    case DW_LANG_Haskell:
+		    case DW_LANG_OCaml:
+		    case DW_LANG_Rust:
+		    case DW_LANG_Swift:
+		    case DW_LANG_Dylan:
+		    case DW_LANG_RenderScript:
+		    case DW_LANG_BLISS:
 		      lower = 0;
 		      break;
 
@@ -127,7 +137,9 @@ array_size (Dwarf_Die *die, Dwarf_Word *size,
 		    case DW_LANG_Fortran08:
 		    case DW_LANG_Pascal83:
 		    case DW_LANG_Modula2:
+		    case DW_LANG_Modula3:
 		    case DW_LANG_PLI:
+		    case DW_LANG_Julia:
 		      lower = 1;
 		      break;
 
-- 
1.8.3.1

  parent reply	other threads:[~2017-07-26 22:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26 22:07 Some easy DWARF5 extensions Mark Wielaard
2017-07-26 22:08 ` [PATCH 6/9] libdw: DWARF5 Add DW_CC_pass_by_reference and DW_CC_pass_by_reference Mark Wielaard
2017-07-26 22:08 ` Mark Wielaard [this message]
2017-07-26 22:08 ` [PATCH 1/9] libdw: Add DWARF5 attributes Mark Wielaard
2017-07-26 22:08 ` [PATCH 2/9] libdw: Add new DWARF5 tag constants Mark Wielaard
2017-07-26 22:08 ` [PATCH 3/9] libdw: Add new DWARF5 character encodings Mark Wielaard
2017-07-26 22:08 ` [PATCH 9/9] libdw: Add DW_MACRO constants and DW_MACRO_GNU compatibility defines Mark Wielaard
2017-07-26 22:08 ` [PATCH 7/9] Handle DWARF5 defaulted member function encodings Mark Wielaard
2017-07-26 22:08 ` [PATCH 8/9] libdw: Handle DWARF5 immutable, packed and shared in dwarf_peel_type Mark Wielaard
2017-07-26 22:08 ` [PATCH 5/9] libdw: Add dwarf_default_lower_bound Mark Wielaard
2017-08-02 12:03 ` Some easy DWARF5 extensions Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1501106866-5846-5-git-send-email-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).