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: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 13 Jun 2017 13:18:31 +0100
- 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> <m3ink02inb.fsf@oc1027705133.ibm.com>
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