[RFA] Remove make_cleanup_free_section_addr_info
Simon Marchi
simon.marchi@polymtl.ca
Wed Mar 14 21:20:00 GMT 2018
On 2018-03-13 12:55, Tom Tromey wrote:
> This removes make_cleanup_free_section_addr_info, instead introducing
> a new section_addr_info_up type and changing all the uses. While
> doing this, I noticed that addrs_section_sort could be changed to
> return a std::vector, allowing the removal of even more cleanups.
>
> Regression tested by the buildbot.
Hi Tom,
Did you consider changing the section_addr_info struct to use entirely
by an std::vector<other_sections>? Functions that return a
section_addr_info could return a vector directly (by value? is that how
we say it?), so we shouldn't need any custom unique pointer. Then,
other_sections::name can be made into a string, removing the need to
free it by hand.
Simon
More information about the Gdb-patches
mailing list