This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 0/4] Conver observers to C++
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 2 Oct 2016 22:22:18 -0600
- Subject: [RFA 0/4] Conver observers to C++
- Authentication-results: sourceware.org; auth=none
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