From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88635 invoked by alias); 16 May 2017 13:45:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 85784 invoked by uid 89); 16 May 2017 13:45:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 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=H*o:Research, transfer 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, 16 May 2017 13:45:34 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v4GDhfuC097282 for ; Tue, 16 May 2017 09:45:29 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2afx2aemr9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 16 May 2017 09:45:29 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 May 2017 14:45:27 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 16 May 2017 14:45:26 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v4GDjQ343146140; Tue, 16 May 2017 13:45:26 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C754AE045; Tue, 16 May 2017 14:43:36 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66BF6AE058; Tue, 16 May 2017 14:43:36 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.109]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 16 May 2017 14:43:36 +0100 (BST) From: Andreas Arnez To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 08/19] write_pieced_value: Include transfer size in byte-wise check References: <1494352015-10465-1-git-send-email-arnez@linux.vnet.ibm.com> <1494352015-10465-9-git-send-email-arnez@linux.vnet.ibm.com> <86zied9p8f.fsf@gmail.com> Date: Tue, 16 May 2017 13:45:00 -0000 In-Reply-To: <86zied9p8f.fsf@gmail.com> (Yao Qi's message of "Tue, 16 May 2017 09:32:00 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 17051613-0008-0000-0000-00000449AF95 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17051613-0009-0000-0000-00001DB2DFB5 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-16_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705160112 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00344.txt.bz2 On Tue, May 16 2017, Yao Qi wrote: > Andreas Arnez writes: > >> In write_pieced_value, when checking whether the data can be transferred >> byte-wise, the current logic verifies the source- and destination offsets >> to be byte-aligned, but not the transfer size. This is fixed. >> > >> --- >> gdb/dwarf2loc.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c >> index 1122c8a..8b5cbc5 100644 >> --- a/gdb/dwarf2loc.c >> +++ b/gdb/dwarf2loc.c >> @@ -1986,7 +1986,8 @@ write_pieced_value (struct value *to, struct value *from) >> this_size = (this_size_bits + dest_offset_bits % 8 + 7) / 8; >> source_offset = source_offset_bits / 8; >> dest_offset = dest_offset_bits / 8; >> - if (dest_offset_bits % 8 == 0 && source_offset_bits % 8 == 0) >> + if (dest_offset_bits % 8 == 0 && source_offset_bits % 8 == 0 >> + && this_size_bits % 8 == 0) > > Can you add a comment here saying that "Check whether the data can be > transferred byte-wise."? OK. > Otherwise, patch is good tome. Thanks! -- Andreas