Buildbot failure in Wildebeest Builder on whole buildset
Dodji Seketeli
dodji@seketeli.org
Tue Jan 1 00:00:00 GMT 2019
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
More information about the Libabigail
mailing list