[PATCH 07/10] Class-ify lm_info_target

Pedro Alves palves@redhat.com
Fri Apr 28 16:00:00 GMT 2017


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



More information about the Gdb-patches mailing list