From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1195 invoked by alias); 15 Feb 2017 22:58:31 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 1099 invoked by uid 89); 15 Feb 2017 22:58:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,UNWANTED_LANGUAGE_BODY autolearn=ham version=3.3.2 spammy=8byte, 21619, regname, xxx 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; Wed, 15 Feb 2017 22:58:26 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D7D6551443; Wed, 15 Feb 2017 22:58:26 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-221.ams2.redhat.com [10.36.116.221]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1FMwP7W007109; Wed, 15 Feb 2017 17:58:26 -0500 Subject: [PATCH 4/6] DWARF-5: call sites From: Jan Kratochvil To: binutils@sourceware.org Cc: Victor Leschuk Date: Wed, 15 Feb 2017 22:58:00 -0000 Message-ID: <148719950428.19826.1040771574277672894.stgit@host1.jankratochvil.net> In-Reply-To: <148719947800.19826.950569475344047705.stgit@host1.jankratochvil.net> References: <148719947800.19826.950569475344047705.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00141.txt.bz2 Hi, this patch updates all call sites related DWARF-5 renames. Jan binutils/ChangeLog 2017-02-15 Jan Kratochvil * dwarf.c (decode_location_expression): Support DW_OP_implicit_pointer, DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type, DW_OP_convert and DW_OP_reinterpret. (read_and_display_attr_value): Support DW_AT_call_value, DW_AT_call_data_value, DW_AT_call_target and DW_AT_call_target_clobbered. --- binutils/dwarf.c | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/binutils/dwarf.c b/binutils/dwarf.c index adb9c09..18c1eee 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -1323,12 +1323,16 @@ decode_location_expression (unsigned char * data, print_dwarf_vma (addr, pointer_size); } break; + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: /* XXX: Strictly speaking for 64-bit DWARF3 files this ought to be an 8-byte wide computation. */ if (dwarf_version == -1) { - printf (_("(DW_OP_GNU_implicit_pointer in frame info)")); + printf (_("(%s in frame info)"), + (op == DW_OP_implicit_pointer + ? "DW_OP_implicit_pointer" + : "DW_OP_GNU_implicit_pointer")); /* No way to tell where the next op is, so just bail. */ return need_frame_base; } @@ -1340,7 +1344,9 @@ decode_location_expression (unsigned char * data, { SAFE_BYTE_GET_AND_INC (uvalue, data, offset_size, end); } - printf ("DW_OP_GNU_implicit_pointer: <0x%s> %s", + printf ("%s: <0x%s> %s", + (op == DW_OP_implicit_pointer + ? "DW_OP_implicit_pointer" : "DW_OP_GNU_implicit_pointer"), dwarf_vmatoa ("x", uvalue), dwarf_vmatoa ("d", read_sleb128 (data, &bytes_read, end))); @@ -1364,40 +1370,55 @@ decode_location_expression (unsigned char * data, if (data > end) data = end; break; + case DW_OP_const_type: case DW_OP_GNU_const_type: uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; - printf ("DW_OP_GNU_const_type: <0x%s> ", + printf ("%s: <0x%s> ", + (op == DW_OP_const_type ? "DW_OP_const_type" + : "DW_OP_GNU_const_type"), dwarf_vmatoa ("x", cu_offset + uvalue)); SAFE_BYTE_GET_AND_INC (uvalue, data, 1, end); data = display_block (data, uvalue, end, ' '); break; + case DW_OP_regval_type: case DW_OP_GNU_regval_type: uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; - printf ("DW_OP_GNU_regval_type: %s (%s)", + printf ("%s: %s (%s)", + (op == DW_OP_regval_type ? "DW_OP_regval_type" + : "DW_OP_GNU_regval_type"), dwarf_vmatoa ("u", uvalue), regname (uvalue, 1)); uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; printf (" <0x%s>", dwarf_vmatoa ("x", cu_offset + uvalue)); break; + case DW_OP_deref_type: case DW_OP_GNU_deref_type: SAFE_BYTE_GET_AND_INC (uvalue, data, 1, end); - printf ("DW_OP_GNU_deref_type: %ld", (long) uvalue); + printf ("%s: %ld", + (op == DW_OP_deref_type ? "DW_OP_deref_type" + : "DW_OP_GNU_deref_type"), + (long) uvalue); uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; printf (" <0x%s>", dwarf_vmatoa ("x", cu_offset + uvalue)); break; + case DW_OP_convert: case DW_OP_GNU_convert: uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; - printf ("DW_OP_GNU_convert <0x%s>", + printf ("%s <0x%s>", + (op == DW_OP_convert ? "DW_OP_convert" : "DW_OP_GNU_convert"), dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0)); break; + case DW_OP_reinterpret: case DW_OP_GNU_reinterpret: uvalue = read_uleb128 (data, &bytes_read, end); data += bytes_read; - printf ("DW_OP_GNU_reinterpret <0x%s>", + printf ("%s <0x%s>", + (op == DW_OP_reinterpret ? "DW_OP_reinterpret" + : "DW_OP_GNU_reinterpret"), dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0)); break; case DW_OP_GNU_parameter_ref: @@ -1885,9 +1906,13 @@ read_and_display_attr_value (unsigned long attribute, case DW_AT_segment: case DW_AT_static_link: case DW_AT_use_location: + case DW_AT_call_value: case DW_AT_GNU_call_site_value: + case DW_AT_call_data_value: case DW_AT_GNU_call_site_data_value: + case DW_AT_call_target: case DW_AT_GNU_call_site_target: + case DW_AT_call_target_clobbered: case DW_AT_GNU_call_site_target_clobbered: if ((dwarf_version < 4 && (form == DW_FORM_data4 || form == DW_FORM_data8)) @@ -2161,9 +2186,13 @@ read_and_display_attr_value (unsigned long attribute, case DW_AT_segment: case DW_AT_static_link: case DW_AT_use_location: + case DW_AT_call_value: case DW_AT_GNU_call_site_value: + case DW_AT_call_data_value: case DW_AT_GNU_call_site_data_value: + case DW_AT_call_target: case DW_AT_GNU_call_site_target: + case DW_AT_call_target_clobbered: case DW_AT_GNU_call_site_target_clobbered: if ((dwarf_version < 4 && (form == DW_FORM_data4 || form == DW_FORM_data8))