From patchwork Fri Apr 7 17:38:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 19898 Received: (qmail 61372 invoked by alias); 7 Apr 2017 17:41:48 -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 61345 invoked by uid 89); 7 Apr 2017 17:41:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Apr 2017 17:41:46 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v37HcZ0M084602 for ; Fri, 7 Apr 2017 13:41:46 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0a-001b2d01.pphosted.com with ESMTP id 29pbcrw7bx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 07 Apr 2017 13:41:46 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Apr 2017 18:41:44 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 7 Apr 2017 18:41:42 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v37Hffbl40501450 for ; Fri, 7 Apr 2017 17:41:41 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2AD2611C05E for ; Fri, 7 Apr 2017 18:41:03 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1082E11C054 for ; Fri, 7 Apr 2017 18:41:03 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.162]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Fri, 7 Apr 2017 18:41:03 +0100 (BST) From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH 4/9] Remove addr_size field from struct piece_closure Date: Fri, 7 Apr 2017 19:38:11 +0200 In-Reply-To: <1491586736-21296-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1491586736-21296-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17040717-0012-0000-0000-00000504A612 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040717-0013-0000-0000-000017F6A6EF Message-Id: <1491586736-21296-5-git-send-email-arnez@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-07_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704070144 X-IsSubscribed: yes The addr_size field in the piece_closure data structure is a relic from before introducing the typed DWARF stack. It is obsolete now. This patch removes it. gdb/ChangeLog: * dwarf2loc.c (struct piece_closure) : Remove field. (allocate_piece_closure): Drop addr_size parameter. (dwarf2_evaluate_loc_desc_full): Adjust call to allocate_piece_closure. --- gdb/dwarf2loc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 09938c4..76a58a3 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1485,9 +1485,6 @@ struct piece_closure /* The number of pieces used to describe this variable. */ int n_pieces; - /* The target address size, used only for DWARF_VALUE_STACK. */ - int addr_size; - /* The pieces themselves. */ struct dwarf_expr_piece *pieces; @@ -1502,7 +1499,7 @@ struct piece_closure static struct piece_closure * allocate_piece_closure (struct dwarf2_per_cu_data *per_cu, int n_pieces, struct dwarf_expr_piece *pieces, - int addr_size, struct frame_info *frame) + struct frame_info *frame) { struct piece_closure *c = XCNEW (struct piece_closure); int i; @@ -1510,7 +1507,6 @@ allocate_piece_closure (struct dwarf2_per_cu_data *per_cu, c->refc = 1; c->per_cu = per_cu; c->n_pieces = n_pieces; - c->addr_size = addr_size; c->pieces = XCNEWVEC (struct dwarf_expr_piece, n_pieces); if (frame == NULL) c->frame_id = null_frame_id; @@ -2412,7 +2408,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame, invalid_synthetic_pointer (); c = allocate_piece_closure (per_cu, ctx.num_pieces, ctx.pieces, - ctx.addr_size, frame); + frame); /* We must clean up the value chain after creating the piece closure but before allocating the result. */ free_values.free_to_mark ();