From: John Baldwin <jhb@freebsd.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
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 [thread overview]
Message-ID: <1823780.IDIx6Mymhs@ralph.baldwin.cx> (raw)
In-Reply-To: <d0e7738713300ec16f97d907d68838ab@polymtl.ca>
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 <list>
> > +
> > /* 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<ptid_t> 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
prev parent reply other threads:[~2017-08-08 15:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 6:20 [PATCH 0/3] Some C++-ification of the FreeBSD target John Baldwin
2017-08-08 6:20 ` [PATCH 2/3] Replace remaining cleanups in fbsd-nat.c John Baldwin
2017-08-08 9:16 ` Simon Marchi
2017-08-08 15:22 ` John Baldwin
2017-08-08 6:20 ` [PATCH 1/3] Fix compile in the !HAVE_KINFO_GETVMMAP case John Baldwin
2017-08-08 6:20 ` [PATCH 3/3] Replace home-grown linked-lists in FreeBSD's native target with std::list John Baldwin
2017-08-08 9:21 ` Simon Marchi
2017-08-08 15:22 ` John Baldwin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1823780.IDIx6Mymhs@ralph.baldwin.cx \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox