From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113684 invoked by alias); 13 Jun 2017 12:18:34 -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 113601 invoked by uid 89); 13 Jun 2017 12:18:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=H*M:6937 X-HELO: mail-wr0-f179.google.com Received: from mail-wr0-f179.google.com (HELO mail-wr0-f179.google.com) (209.85.128.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Jun 2017 12:18:32 +0000 Received: by mail-wr0-f179.google.com with SMTP id 36so18655603wry.3 for ; Tue, 13 Jun 2017 05:18:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5y735zfeB3ybHtrLhaYOHywlgqLb0vqcI87UvpjP6a4=; b=kw0frPGryKPyjZz73WOAVQJKNuv/DwyUoJ3/FPKiGOv0nL4MthcbmZamQzEEomdEcH 5/EdaTLNtqkX837JBJpNiGPfBDWMjbcVlGE/PMYw11T0Eor94JWpJ3sgQz7fQA1J9fBR GaJlmVWqgrWm1nbkZcqd8qzUSLq+WQVbKfv5OHQQXWuwCvuxp6niiH9taTNcsMdf4qRq NDGq+rpus1lOUy6ztQMmsPvvSbfyePgP/pomgmyYFSzVcFZALaRS8a8B5GUebheJfuNl 5t8+stXCQ7mrTnqCMHVMNJZpKH5JDWGhAHtR+/itNCGcpcGCwhKnfUr1l/hSFOMynhJd DD8g== X-Gm-Message-State: AKS2vOy/gAkONX4qTAia/xzMHz9KVW3nyUlOs06RtKdies88BhbWiuj/ 74BQvct6yNBtItcg80rJEA== X-Received: by 10.223.178.168 with SMTP id g37mr2510337wrd.158.1497356314209; Tue, 13 Jun 2017 05:18:34 -0700 (PDT) Received: from [192.168.0.102] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id h12sm9385748wrc.43.2017.06.13.05.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 05:18:32 -0700 (PDT) Subject: Re: [PATCH v2 14/19] read/write_pieced_value: Improve logic for buffer allocation To: Andreas Arnez , Simon Marchi 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> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Tue, 13 Jun 2017 12:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00379.txt.bz2 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, Pedro Alves