From patchwork Sun Jul 2 20:11:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 21386 Received: (qmail 115627 invoked by alias); 2 Jul 2017 20:12:03 -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 115591 invoked by uid 89); 2 Jul 2017 20:12:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 02 Jul 2017 20:11:59 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54DCF85545; Sun, 2 Jul 2017 20:11:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 54DCF85545 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jan.kratochvil@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 54DCF85545 Received: from host1.jankratochvil.net (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88D7D1719C; Sun, 2 Jul 2017 20:11:57 +0000 (UTC) Date: Sun, 2 Jul 2017 22:11:54 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [obv] Import include/+libiberty/ r249883 from upstream GCC Message-ID: <20170702201154.GA3212@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) include/ChangeLog 2017-07-02 Jan Kratochvil * dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset) (DW_IDX_parent, DW_IDX_type_hash, DW_IDX_lo_user, DW_IDX_hi_user) (DW_IDX_GNU_internal, DW_IDX_GNU_external): New. * dwarf2.h (DW_IDX, DW_IDX_DUP, DW_FIRST_IDX, DW_END_IDX): New. (enum dwarf_name_index_attribute): Remove. (get_DW_IDX_name): New declaration. libiberty/ChangeLog 2017-07-02 Jan Kratochvil * dwarfnames.c (DW_FIRST_IDX, DW_END_IDX, DW_IDX, DW_IDX_DUP): New. --- include/ChangeLog | 9 +++++++++ include/dwarf2.def | 12 ++++++++++++ include/dwarf2.h | 25 +++++++++++++------------ libiberty/ChangeLog | 4 ++++ libiberty/dwarfnames.c | 11 +++++++++++ 5 files changed, 49 insertions(+), 12 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index 9400f16..8b25ce7 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,12 @@ +2017-07-02 Jan Kratochvil + + * dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset) + (DW_IDX_parent, DW_IDX_type_hash, DW_IDX_lo_user, DW_IDX_hi_user) + (DW_IDX_GNU_internal, DW_IDX_GNU_external): New. + * dwarf2.h (DW_IDX, DW_IDX_DUP, DW_FIRST_IDX, DW_END_IDX): New. + (enum dwarf_name_index_attribute): Remove. + (get_DW_IDX_name): New declaration. + 2017-06-30 Georg-Johann Lay PR gas/21683 diff --git a/include/dwarf2.def b/include/dwarf2.def index ea6194e..a91e943 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -782,3 +782,15 @@ DW_CFA (DW_CFA_GNU_args_size, 0x2e) DW_CFA (DW_CFA_GNU_negative_offset_extended, 0x2f) DW_END_CFA + +/* Index attributes in the Abbreviations Table. */ +DW_FIRST_IDX (DW_IDX_compile_unit, 1) +DW_IDX (DW_IDX_type_unit, 2) +DW_IDX (DW_IDX_die_offset, 3) +DW_IDX (DW_IDX_parent, 4) +DW_IDX (DW_IDX_type_hash, 5) +DW_IDX_DUP (DW_IDX_lo_user, 0x2000) +DW_IDX (DW_IDX_hi_user, 0x3fff) +DW_IDX (DW_IDX_GNU_internal, 0x2000) +DW_IDX (DW_IDX_GNU_external, 0x2001) +DW_END_IDX diff --git a/include/dwarf2.h b/include/dwarf2.h index 9c78880..14b6f22 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -52,6 +52,8 @@ #define DW_ATE(name, value) , name = value #define DW_ATE_DUP(name, value) , name = value #define DW_CFA(name, value) , name = value +#define DW_IDX(name, value) , name = value +#define DW_IDX_DUP(name, value) , name = value #define DW_FIRST_TAG(name, value) enum dwarf_tag { \ name = value @@ -71,6 +73,9 @@ #define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \ name = value #define DW_END_CFA }; +#define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \ + name = value +#define DW_END_IDX }; #include "dwarf2.def" @@ -86,6 +91,8 @@ #undef DW_END_ATE #undef DW_FIRST_CFA #undef DW_END_CFA +#undef DW_FIRST_IDX +#undef DW_END_IDX #undef DW_TAG #undef DW_TAG_DUP @@ -97,6 +104,8 @@ #undef DW_ATE #undef DW_ATE_DUP #undef DW_CFA +#undef DW_IDX +#undef DW_IDX_DUP /* Flag that tells whether entry has a child or not. */ #define DW_children_no 0 @@ -420,18 +429,6 @@ enum dwarf_macro_record_type DW_MACRO_GNU_hi_user = 0xff }; -/* Index attributes in the Abbreviations Table. */ -enum dwarf_name_index_attribute - { - DW_IDX_compile_unit = 1, - DW_IDX_type_unit = 2, - DW_IDX_die_offset = 3, - DW_IDX_parent = 4, - DW_IDX_type_hash = 5, - DW_IDX_lo_user = 0x2000, - DW_IDX_hi_user = 0x3fff - }; - /* Range list entry kinds in .debug_rnglists* section. */ enum dwarf_range_list_entry { @@ -524,6 +521,10 @@ extern const char *get_DW_ATE_name (unsigned int enc); recognized. */ extern const char *get_DW_CFA_name (unsigned int opc); +/* Return the name of a DW_IDX_ constant, or NULL if the value is not + recognized. */ +extern const char *get_DW_IDX_name (unsigned int idx); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index b3087fa..925b152 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2017-07-02 Jan Kratochvil + + * dwarfnames.c (DW_FIRST_IDX, DW_END_IDX, DW_IDX, DW_IDX_DUP): New. + 2017-05-31 DJ Delorie * configure.ac (strnlen): Add to AC_CHECK_DECLS. diff --git a/libiberty/dwarfnames.c b/libiberty/dwarfnames.c index 62563b7..e58d03c 100644 --- a/libiberty/dwarfnames.c +++ b/libiberty/dwarfnames.c @@ -59,6 +59,11 @@ Boston, MA 02110-1301, USA. */ switch (opc) { \ DW_CFA (name, value) #define DW_END_CFA } return 0; } +#define DW_FIRST_IDX(name, value) \ + const char *get_DW_IDX_name (unsigned int idx) { \ + switch (idx) { \ + DW_IDX (name, value) +#define DW_END_IDX } return 0; } #define DW_TAG(name, value) case name: return # name ; #define DW_TAG_DUP(name, value) @@ -70,6 +75,8 @@ Boston, MA 02110-1301, USA. */ #define DW_ATE(name, value) case name: return # name ; #define DW_ATE_DUP(name, value) #define DW_CFA(name, value) case name: return # name ; +#define DW_IDX(name, value) case name: return # name ; +#define DW_IDX_DUP(name, value) #include "dwarf2.def" @@ -85,6 +92,8 @@ Boston, MA 02110-1301, USA. */ #undef DW_END_ATE #undef DW_FIRST_CFA #undef DW_END_CFA +#undef DW_FIRST_IDX +#undef DW_END_IDX #undef DW_TAG #undef DW_TAG_DUP @@ -96,3 +105,5 @@ Boston, MA 02110-1301, USA. */ #undef DW_ATE #undef DW_ATE_DUP #undef DW_CFA +#undef DW_IDX +#undef DW_IDX_DUP