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 07/10] Class-ify lm_info_target


On 04/26/2017 11:51 PM, Simon Marchi wrote:
> This patch makes lm_info_target a "real" class.  It adds a destructor,
> uses std::string, initializes the fields and replaces XCNEW/xfree with
> new/delete.
> 
> gdb/ChangeLog:
> 
> 	* solib-target.c (struct lm_info_target): Add destructor,
> 	initialize fields.
> 	<name>: Change type to std::string.
> 	(library_list_start_library): Allocate lm_info_target with new.
> 	(solib_target_free_library_list): Free lm_info_target with
> 	delete.
> 	(solib_target_current_sos): Adapt to std::string.
> 	(solib_target_free_so): Free lm_info_target with delete.

LGTM.  There was a report a while ago about SO_NAME_MAX_PATH_SIZE
being shorter than some paths Windows reports.  Moving in the direction
of std::string will end up fixing that as "fallout".

Thanks,
Pedro Alves


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