[RFA] Remove free_memory_read_result_vector
Pedro Alves
palves@redhat.com
Thu Sep 28 15:41:00 GMT 2017
On 09/24/2017 03:11 AM, Tom Tromey wrote:
> This changes read_memory_robust to return a std::vector, allowing the
> removal of free_memory_read_result_vector and associated cleanups.
> This patch also changes the functions it touches to be a bit more
> robust with regards to deallocation; it's perhaps possible that
> read_memory_robust could have leaked in some situations.
>
> This patch is based on my earlier series to remove some MI cleanups.
> Regression tested by the buildbot.
>
Looks fine to me, with one nit:
> -extern void free_memory_read_result_vector (void *);
> + ~memory_read_result () = default;
> +
> + memory_read_result (memory_read_result &&other)
I think this can this be:
memory_read_result (memory_read_result &&other) = default;
(Which ends up being automatically noexcept if possible too.)
> + : begin (other.begin),
> + end (other.end),
> + data (std::move (other.data))
> + {
> + }
> +
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list