This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 14/19] read/write_pieced_value: Improve logic for buffer allocation
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <palves at redhat dot com>
- Date: Tue, 13 Jun 2017 14:10:00 +0200
- Subject: Re: [PATCH v2 14/19] read/write_pieced_value: Improve logic for buffer allocation
- Authentication-results: sourceware.org; auth=none
- 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>
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.
--
Andreas