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 v3] Use std::vector in lm_info_target


On 05/02/2017 06:25 PM, Simon Marchi wrote:
> On 2017-05-02 12:12, Pedro Alves wrote:
>> 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.
> 
> Indeed, I changed it.  Thanks.
> 

Thanks.  (There's a similar case in the segment_bases path, but
you probably saw it.)

-- 
Pedro Alves


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