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: [RFA] Remove make_cleanup_free_section_addr_info


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


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