From: Trevor Saunders <tbsaunde@tbsaunde.org>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA 1/5] Remove some ui_out-related cleanups from Python
Date: Fri, 10 Feb 2017 06:47:00 -0000 [thread overview]
Message-ID: <20170210065807.cskf2p42n23kncgz@ball> (raw)
In-Reply-To: <c0a70339-49c3-a087-bebf-ecfdd2cc32ca@redhat.com>
On Wed, Feb 08, 2017 at 05:28:11PM +0000, Pedro Alves wrote:
> On 01/16/2017 11:30 AM, Trevor Saunders wrote:
> >> +++ b/gdb/common/gdb_option.h
> >
> > might be nice to put it in include/ but fine to do that later when
> > something else actually wants it.
>
> I've been thinking about putting all these utilities and
> later-standards replacements we're coming up with in its own
> directory/namespace. I had thought of "gtl", for "gdb template
> library", or "gnu template library" if other projects want to
> reuse it. (I think "gnu" is kind of taken by gnulib / libgnu.a)
> One difficulty with putting such a thing at the top level is that
> gdb relies on gnulib headers (that exist under gdb/) while
> other toolchain components don't, yet, at least.
yeah. I've been meaning to get to that too. I think for some of these
things that may not matter, but for some I'm sure it does.
> >> > + /* These aren't deleted in std::optional, but it was simpler to
> >> > + delete them here, because currently the users of this class don't
> >> > + need them, and making them depend on the definition of T is
> >> > + somewhat complicated. */
> > I think you can make <type_traits> do most of it, but fair enough.
> >
>
> Back around <https://sourceware.org/ml/gdb-patches/2016-11/msg00368.html>
> I backported C++17's optional to C++11. I still have that branch
> somewhere locally... /me finds it and pushes to github. Here:
>
> https://github.com/palves/gdb/commits/palves/gdb-import-gcc-optional
>
> This <https://github.com/palves/gdb/commit/880ab485c5873eb0a8ab1dca75e624ec2a064fe8>
> contains the local changes I had made to to port it to C++11. I was surprised
> that other than portable type traits stuff that's missing in C++11, the
> only thing that C++11 loses is constexpr-ness in some cases. Now,
> the result is of course much more code than what Tromey is proposing.
> It probably does make sense to start with something simpler and
> upgrade when/if we find a need. OTOH, looks like the current patch
> doesn't have accessors for the wrapped value, so it seems like we'll
> at least need to be extend it in that direction in no time.
yeah, I think start small is a very reasonable approach, though I'd
agree you'll want to get at the wrapped value pretty soon.
Trev
next prev parent reply other threads:[~2017-02-10 6:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-15 13:43 [RFA 0/5] more cleanup removal in Python Tom Tromey
2017-01-15 13:43 ` [RFA 4/5] Change one more spot to use gdbpy_ref Tom Tromey
2017-02-09 12:52 ` Pedro Alves
2017-01-15 13:43 ` [RFA 1/5] Remove some ui_out-related cleanups from Python Tom Tromey
2017-01-15 21:52 ` Simon Marchi
2017-01-16 16:13 ` Tom Tromey
2017-01-16 11:19 ` Trevor Saunders
2017-02-08 17:28 ` Pedro Alves
2017-02-08 22:27 ` Pedro Alves
2017-02-08 23:05 ` Tom Tromey
2017-02-08 23:52 ` Pedro Alves
2017-02-09 4:34 ` Matt Rice
2017-02-09 12:48 ` Pedro Alves
2017-02-09 12:51 ` Pedro Alves
2017-02-09 15:46 ` Matt Rice
2017-02-09 16:04 ` Simon Marchi
2017-02-10 6:47 ` Trevor Saunders [this message]
2017-01-15 13:43 ` [RFA 3/5] Introduce gdbpy_subclass and use it to simplify some logic Tom Tromey
2017-01-24 20:21 ` Simon Marchi
2017-02-09 11:44 ` Pedro Alves
2017-02-09 18:52 ` Tom Tromey
2017-02-09 13:00 ` Pedro Alves
2017-01-15 13:43 ` [RFA 2/5] Introduce ui_file_up and use it to remove cleanups Tom Tromey
2017-01-16 9:59 ` Trevor Saunders
2017-01-16 17:58 ` Pedro Alves
2017-01-16 19:08 ` Tom Tromey
2017-01-17 1:40 ` Pedro Alves
2017-01-17 19:05 ` Tom Tromey
2017-01-15 13:43 ` [RFA 5/5] Remove some gotos from Python Tom Tromey
2017-02-09 13:03 ` Pedro Alves
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=20170210065807.cskf2p42n23kncgz@ball \
--to=tbsaunde@tbsaunde.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tom@tromey.com \
/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