From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74376 invoked by alias); 13 Jun 2017 14:41:53 -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 74353 invoked by uid 89); 13 Jun 2017 14:41:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= 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, 13 Jun 2017 14:41:50 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5DEfgUj042812 for ; Tue, 13 Jun 2017 10:41:54 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2b2evgp1et-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 13 Jun 2017 10:41:47 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Jun 2017 15:40:04 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Jun 2017 15:40:01 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5DEe0f636634652; Tue, 13 Jun 2017 14:40:00 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 607A84C04A; Tue, 13 Jun 2017 15:38:14 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B2104C046; Tue, 13 Jun 2017 15:38:14 +0100 (BST) Received: from oc1027705133.ibm.com (unknown [9.152.212.151]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 13 Jun 2017 15:38:14 +0100 (BST) From: Andreas Arnez To: Pedro Alves Cc: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH v2 14/19] read/write_pieced_value: Improve logic for buffer allocation References: <1494352015-10465-1-git-send-email-arnez@linux.vnet.ibm.com> <1494352015-10465-15-git-send-email-arnez@linux.vnet.ibm.com> <6078d216d5112c69d697f7e7a1c53012@polymtl.ca> Date: Tue, 13 Jun 2017 14:41:00 -0000 In-Reply-To: (Pedro Alves's message of "Tue, 13 Jun 2017 13:18:31 +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: 17061314-0020-0000-0000-000003870836 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061314-0021-0000-0000-000042058DB0 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-13_08:,, 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-1706130255 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00385.txt.bz2 On Tue, Jun 13 2017, Pedro Alves wrote: > On 06/13/2017 01:10 PM, Andreas Arnez wrote: >> On Mon, Jun 12 2017, Simon Marchi wrote: >> >>> On 2017-05-09 19:46, Andreas Arnez wrote: >>>> @@ -2045,21 +2022,44 @@ write_pieced_value (struct value *to, struct >>>> value *from) >>>> } >>>> break; >>>> case DWARF_VALUE_MEMORY: >> >> [...] >> >>> + this_size = bits_to_bytes (dest_offset_bits, this_size_bits); >>>> + buffer.reserve (this_size); >>> >>> Reading Pedro's patch about byte_vector: >>> >>> https://sourceware.org/ml/gdb-patches/2017-06/msg00339.html >>> >>> reminded me of this, when I read the patch I didn't think it was a >>> problem. I think this should use resize instead of reserve. >> >> OK, I'll wait for Pedro's patch to go in and then push the series with >> that change. > > Please feel free to push you series in before mine is in. > I think it'll be much easier for me to handle the merge > conflict than for you. Thanks, that works for me ;-) I just pushed the series. -- Andreas