This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 14/19] read/write_pieced_value: Improve logic for buffer allocation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]