From patchwork Tue May 9 17:46:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 20340 Received: (qmail 66142 invoked by alias); 9 May 2017 17:49:47 -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 66129 invoked by uid 89); 9 May 2017 17:49:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 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=Hx-languages-length:1858 X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 May 2017 17:49:45 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v49HhkO9018989 for ; Tue, 9 May 2017 13:49:46 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2aavru0p73-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 09 May 2017 13:49:46 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 May 2017 18:49:44 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 9 May 2017 18:49:41 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v49Hnerq18219264 for ; Tue, 9 May 2017 17:49:40 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ED79C52045 for ; Tue, 9 May 2017 17:47:03 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.109]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id D44E252043 for ; Tue, 9 May 2017 17:47:03 +0100 (BST) From: Andreas Arnez To: gdb-patches@sourceware.org Subject: [PATCH v2 04/19] Remove addr_size field from struct piece_closure Date: Tue, 9 May 2017 19:46:00 +0200 In-Reply-To: <1494352015-10465-1-git-send-email-arnez@linux.vnet.ibm.com> References: <1494352015-10465-1-git-send-email-arnez@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17050917-0020-0000-0000-000003618CC6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17050917-0021-0000-0000-000041A6893E Message-Id: <1494352015-10465-5-git-send-email-arnez@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-09_14:, , 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-1703280000 definitions=main-1705090097 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 061ec6d..8f99844 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -1486,9 +1486,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; @@ -1503,7 +1500,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; @@ -1511,7 +1508,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; @@ -2417,7 +2413,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 ();