From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14667 invoked by alias); 8 Aug 2017 15:22:34 -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 14637 invoked by uid 89); 8 Aug 2017 15:22:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Aug 2017 15:22:30 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 9C77A10AF07; Tue, 8 Aug 2017 11:22:28 -0400 (EDT) From: John Baldwin To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] Replace home-grown linked-lists in FreeBSD's native target with std::list. Date: Tue, 08 Aug 2017 15:22:00 -0000 Message-ID: <1823780.IDIx6Mymhs@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <20170808061917.73979-1-jhb@FreeBSD.org> <20170808061917.73979-4-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00148.txt.bz2 On Tuesday, August 08, 2017 11:21:16 AM Simon Marchi wrote: > 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. Oh, yes, and the old list was a singly-linked list as well. > Otherwise, LGTM. > > Simon -- John Baldwin