This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Use std::vector in lm_info_target
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>, gdb-patches at sourceware dot org
- Date: Tue, 2 May 2017 17:12:21 +0100
- Subject: Re: [PATCH v3] Use std::vector in lm_info_target
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.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 B518AC0EEE31
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B518AC0EEE31
- References: <614e9e92-fa8b-35f3-c15c-9dde043962e8@redhat.com> <20170430003455.13878-1-simon.marchi@polymtl.ca>
On 04/30/2017 01:34 AM, Simon Marchi wrote:
> @@ -372,10 +364,7 @@ Could not relocate shared library \"%s\": wrong number of ALLOC sections"),
> {
> int bases_index = 0;
> int found_range = 0;
> - CORE_ADDR *section_bases;
> -
> - section_bases = VEC_address (CORE_ADDR,
> - li->section_bases);
> + CORE_ADDR *section_bases = li->section_bases.data ();
I think this variable could be eliminated, and replaced by further
below doing:
- low = section_bases[i];
+ low = li->section_bases[i];
in a couple places.
Otherwise LGTM.
Thanks,
Pedro Alves