This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/10] Class-ify lm_info_target
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Fri, 28 Apr 2017 17:00:01 +0100
- Subject: Re: [PATCH 07/10] Class-ify lm_info_target
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 57C30C05AD80
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 57C30C05AD80
- References: <20170426224706.27988-1-simon.marchi@ericsson.com> <20170426225139.313-7-simon.marchi@ericsson.com>
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