From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79481 invoked by alias); 8 Aug 2017 09:21:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 79468 invoked by uid 89); 8 Aug 2017 09:21:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:816 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Aug 2017 09:21:23 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v789LG40005841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 8 Aug 2017 05:21:21 -0400 Received: by simark.ca (Postfix, from userid 112) id E380A1EA1C; Tue, 8 Aug 2017 05:21:16 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 70F0D1E9AB; Tue, 8 Aug 2017 05:21:16 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 08 Aug 2017 09:21:00 -0000 From: Simon Marchi To: John Baldwin Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] Replace home-grown linked-lists in FreeBSD's native target with std::list. In-Reply-To: <20170808061917.73979-4-jhb@FreeBSD.org> References: <20170808061917.73979-1-jhb@FreeBSD.org> <20170808061917.73979-4-jhb@FreeBSD.org> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 8 Aug 2017 09:21:17 +0000 X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00143.txt.bz2 Hi John, > --- a/gdb/fbsd-nat.c > +++ b/gdb/fbsd-nat.c > @@ -40,6 +40,8 @@ > #include "elf-bfd.h" > #include "fbsd-nat.h" > > +#include > + > /* Return the name of a file that can be opened to get the symbols for > the child process identified by PID. */ > > @@ -711,13 +713,7 @@ fbsd_update_thread_list (struct target_ops *ops) > sake. FreeBSD versions newer than 9.1 contain both fixes. > */ > > -struct fbsd_fork_info > -{ > - struct fbsd_fork_info *next; > - ptid_t ptid; > -}; > - > -static struct fbsd_fork_info *fbsd_pending_children; > +static std::list fbsd_pending_children; If you only need a singly linked list with push/pop at the front, you can use std::forward_list. Otherwise, LGTM. Simon