Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Subject: [RFA 0/4] Conver observers to C++
Date: Mon, 03 Oct 2016 04:22:00 -0000	[thread overview]
Message-ID: <1475468542-11446-1-git-send-email-tom@tromey.com> (raw)

This weekend I decided to try to convert observers to C++.  This
series is the result.

I'm a bit undecided about this patch.  I tend to think it's a mild
improvement, but it does have some disadvantages as well.  Mostly I
covered these in the description for the first patch.

It does have one long(er) term advantage, which is that it's simpler
to add features to this code.  For example, adding a way to provide a
user-data argument to a callback can be done by subclassing the new
gdb_function; or by adding an equivalent to std::bind.

This is broken into a series for easier review, but the patch would
have to be squashed before landing.

This patch requires you to do a clean build after it is applied,
because observer.h now migrates to the source directory.  This could
be fixed by changing the name of the new file -- easy to do if you'd
prefer that.

Built and regtested on x86-64 Fedora 24.

Tom



             reply	other threads:[~2016-10-03  4:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03  4:22 Tom Tromey [this message]
2016-10-03  4:22 ` [RFA 4/4] Change observer tests to use selftest framework Tom Tromey
2016-10-03  4:22 ` [RFA 1/4] Convert observers to C++ Tom Tromey
2016-10-03 17:32   ` Trevor Saunders
2016-10-03  4:22 ` [RFA 2/4] Change types to match observer.attach Tom Tromey
2016-10-03  4:22 ` [RFA 3/4] Update all observer uses Tom Tromey

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=1475468542-11446-1-git-send-email-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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