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] gdb/linux-fork: simplify one_fork_p


On 2020-01-19 11:41 a.m., Christian Biesinger wrote:
> On Sun, Jan 19, 2020 at 11:11 AM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>>
>> Unless I'm missing something, this function is a complicated way of
>> saying "fork_list.size () == 1".
> 
> Before C++11, size() wasn't guaranteed to run in constant time, so I
> assume the code was written to handle that. But GDB uses C++11, so
> this change seems fine.
> https://en.cppreference.com/w/cpp/container/list/size

Ahh, good point.  Although by the time that change was made, we were already
using C++11.  I don't remember if we had a C++ < 11 phase, but if we did it
was very short.

Thanks for looking at it, I'll push it now.

Simon


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