[PATCH 6/7] [gdb/build] Return reference in target_read_auxv
Tom Tromey
tom@tromey.com
Wed Aug 16 18:23:23 GMT 2023
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> writes:
Tom> In target_read_auxv we return a copy of an object:
Tom> ...
Tom> gdb::optional<gdb::byte_vector>
Tom> target_read_auxv ()
Tom> {
Tom> ...
Tom> return info->data;
Tom> }
Tom> ...
Tom> Return a reference instead, saving a copy.
I suspect it ought to return a const reference instead.
Tom
More information about the Gdb-patches
mailing list