public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@seketeli.org>
To: Mark Wielaard <mark@klomp.org>
Cc: libabigail@sourceware.org
Subject: Re: Buildbot failure in Wildebeest Builder on whole buildset
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <86tvi7bdeb.fsf@seketeli.org> (raw)
In-Reply-To: <cbdb0350628fa081dbbdfd8ac6807a5f04761f34.camel@klomp.org> (Mark	Wielaard's message of "Thu, 17 Jan 2019 11:21:31 +0100")

Hello Mark

Mark Wielaard <mark@klomp.org> a écrit:

> From: Mark Wielaard <mark@klomp.org>
> Date: Thu, 17 Jan 2019 11:19:02 +0100
> Subject: [PATCH] Define DW_LANG_C_plus_plus_02 and DW_LANG_Rust when unknown.
>
> Older elfutils (pre-0.170) don't define these constants in dwarf.h.
>
> 	* src/abg-dwarf-reader.cc: Define DW_LANG_C_plus_plus_03
> 	and DW_LANG_Rust when undefined.

Thanks for the patch!

I have ended adds support for DW_LANG_Rust and DW_LANG_C_plus_plus_03 in
there.  Pff, and I totally forgot about these pesky old systems (:->->

> Signed-off-by: Mark Wielaard <mark@klomp.org>
> ---
>  src/abg-dwarf-reader.cc | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
> index c9cffc3..aed79f1 100644
> --- a/src/abg-dwarf-reader.cc
> +++ b/src/abg-dwarf-reader.cc
> @@ -66,6 +66,15 @@ ABG_END_EXPORT_DECLARATIONS
>  #define UINT64_MAX 0xffffffffffffffff
>  #endif
>  
> +/* Older elfutils dwarf.h might not define these language constants.  */
> +#ifndef DW_LANG_C_plus_plus_03
> +#define DW_LANG_C_plus_plus_03 0x0019
> +#endif
> +
> +#ifndef DW_LANG_Rust
> +#define DW_LANG_Rust 0x001c
> +#endif
> +

So, in that same file, in the function dwarf_language_to_tu_language,
the was we handle all "new" language enumerators (i.e, the
DW_LANG_something enumerators) is by guarding their use with #ifdef
DW_LANG_something, rather than defining them as you are proposing here.

So, at least for the sake of consistency, I'd rather handle these two
new language enumerators in a similar way.

So, below is what I have committed to master.

Thanks again for taking time to send a patch for this.

Cheers,

commit 2366dca947478b0e69841337fcfec619a5edc0d9
Author: Mark Wielaard <mark@klomp.org>
Date:   Thu Jan 17 11:19:02 2019 +0100

    Conditionalize the use of DW_LANG_C_plus_plus_03 and DW_LANG_Rust
    
    Older elfutils (pre-0.170) don't define these constants in dwarf.h so
    don't use them in that case.
    
    	* include/abg-ir.h (LANG_C_plus_plus_03): Add this new language
    	enum to "enum translation_unit::language".
    	* src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Do not
    	use DW_LANG_Rust or DW_LANG_C_plus_plus_03 if these are not
    	defined.
    	(get_default_array_lower_bound): Handle the new
    	translation_unit::LANG_C_plus_plus_03 enumerator.
    
    Signed-off-by: Mark Wielaard <mark@klomp.org>
    Signed-off-by: Dodji Seketeli <dodji@redhat.com>

diff --git a/include/abg-ir.h b/include/abg-ir.h
index 49910e8..c0b5e7b 100644
--- a/include/abg-ir.h
+++ b/include/abg-ir.h
@@ -537,6 +537,7 @@ public:
     LANG_C99,
     LANG_C11,
     LANG_C,
+    LANG_C_plus_plus_03,
     LANG_C_plus_plus_11,
     LANG_C_plus_plus_14,
     LANG_C_plus_plus,
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index c9cffc3..aa9d147 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -12199,9 +12199,6 @@ dwarf_language_to_tu_language(size_t l)
     case DW_LANG_Ada83:
       return translation_unit::LANG_Ada83;
     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:
       return translation_unit::LANG_C_plus_plus;
     case DW_LANG_Cobol74:
       return translation_unit::LANG_Cobol74;
@@ -12229,7 +12226,9 @@ dwarf_language_to_tu_language(size_t l)
       return translation_unit::LANG_ObjC;
     case DW_LANG_ObjC_plus_plus:
       return translation_unit::LANG_ObjC_plus_plus;
+#ifdef DW_LANG_Rust
     case DW_LANG_Rust:
+#endif
       return translation_unit::LANG_Rust;
 #ifdef DW_LANG_UPC
     case DW_LANG_UPC:
@@ -12251,6 +12250,11 @@ dwarf_language_to_tu_language(size_t l)
       return translation_unit::LANG_Go;
 #endif
 
+#ifdef DW_LANG_C_plus_plus_03
+    case DW_LANG_C_plus_plus_03:
+      return translation_unit::LANG_C_plus_plus_03;
+#endif
+
 #ifdef DW_LANG_C_plus_plus_11
     case DW_LANG_C_plus_plus_11:
       return translation_unit::LANG_C_plus_plus_11;
@@ -12300,6 +12304,7 @@ get_default_array_lower_bound(translation_unit::language l)
     case translation_unit::LANG_C99:
     case translation_unit::LANG_C11:
     case translation_unit::LANG_C:
+    case translation_unit::LANG_C_plus_plus_03:
     case translation_unit::LANG_C_plus_plus_11:
     case translation_unit::LANG_C_plus_plus_14:
     case translation_unit::LANG_C_plus_plus:


-- 
		Dodji

  reply	other threads:[~2019-01-17 13:51 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00   ` Dodji Seketeli [this message]
2019-01-01  0:00     ` Mark Wielaard
2019-01-01  0:00       ` Dodji Seketeli
2019-01-01  0:00     ` Mark Wielaard
2019-01-01  0:00       ` Dodji Seketeli
  -- strict thread matches above, loose matches on Subject: below --
2022-01-17 13:19 buildbot
2021-12-21 19:18 buildbot
2021-12-14 15:55 buildbot
2021-12-15 13:01 ` Mark Wielaard
2021-11-29  8:05 buildbot
2021-11-29 11:23 ` Mark Wielaard
2021-10-27 11:11 buildbot
2021-10-27 11:14 ` Mark Wielaard
2021-10-27 12:04   ` Dodji Seketeli
2021-10-18 10:58 buildbot
2021-09-23 12:12 buildbot
2021-09-23 12:19 ` Mark Wielaard
2021-08-11 17:08 buildbot
2021-07-16 10:11 buildbot
2021-07-16 10:33 ` Mark Wielaard
2021-04-12 15:48 buildbot
2021-03-18 16:05 buildbot
2021-03-19 23:03 ` Mark Wielaard
2020-12-02 15:32 buildbot
2020-11-27 16:59 buildbot
2020-11-25 12:52 buildbot
2020-11-25  8:51 buildbot
2020-11-12 10:50 buildbot
2020-11-02 17:21 buildbot
2020-10-27  9:47 buildbot
2020-10-27 11:30 ` Mark Wielaard
2020-10-27 13:12   ` Mark Wielaard
2020-10-28  9:30     ` Dodji Seketeli
2020-10-28 10:12       ` Mark Wielaard
2020-10-14 10:31 buildbot
2020-10-09  9:35 buildbot
2020-07-30 15:29 buildbot
2020-07-30 15:38 ` Mark Wielaard
2020-07-28 14:40 buildbot
2020-07-28 14:41 ` Mark Wielaard
2020-05-04  9:36 buildbot
2020-04-23 13:09 buildbot
2020-04-23 13:32 ` Mark Wielaard
2020-03-26 15:47 buildbot
2020-03-19 10:55 buildbot
2020-03-19 12:25 ` Mark Wielaard
2020-03-20 22:23   ` Dodji Seketeli
2020-03-12 13:41 buildbot
2020-01-01  0:00 buildbot
2020-01-01  0:00 ` Mark Wielaard
2020-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Mark Wielaard
2019-01-01  0:00   ` Dodji Seketeli
2019-01-01  0:00     ` Mark Wielaard
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 ` Matthias Maennich via libabigail
2019-01-01  0:00   ` Mark Wielaard
2019-01-01  0:00     ` Matthias Maennich via libabigail
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2019-01-01  0:00 buildbot
2018-01-01  0:00 buildbot
2018-01-01  0:00 ` 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=86tvi7bdeb.fsf@seketeli.org \
    --to=dodji@seketeli.org \
    --cc=libabigail@sourceware.org \
    --cc=mark@klomp.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).