From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75302 invoked by alias); 3 Oct 2016 04:22:48 -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 75040 invoked by uid 89); 3 Oct 2016 04:22:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:4.86_1, observers, Hx-spam-relays-external:10.0.90.82, Hx-spam-relays-external:sk:gproxy1 X-HELO: gproxy10-pub.mail.unifiedlayer.com Received: from gproxy10-pub.mail.unifiedlayer.com (HELO gproxy10-pub.mail.unifiedlayer.com) (69.89.20.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Mon, 03 Oct 2016 04:22:34 +0000 Received: (qmail 12325 invoked by uid 0); 3 Oct 2016 04:22:32 -0000 Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy10.mail.unifiedlayer.com with SMTP; 3 Oct 2016 04:22:32 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id qsNT1t00K2f2jeq01sNWkv; Sun, 02 Oct 2016 22:22:31 -0600 X-Authority-Analysis: v=2.1 cv=AcgiQRnG c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=CH0kA5CcgfcA:10 a=Lmlhp2Q4xpUdKZ90GuYA:9 Received: from 71-218-192-86.hlrn.qwest.net ([71.218.192.86]:60644 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from ) id 1bqulp-0001Vt-1w for gdb-patches@sourceware.org; Sun, 02 Oct 2016 22:22:29 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [RFA 0/4] Conver observers to C++ Date: Mon, 03 Oct 2016 04:22:00 -0000 Message-Id: <1475468542-11446-1-git-send-email-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1bqulp-0001Vt-1w X-Source-Sender: 71-218-192-86.hlrn.qwest.net (bapiya.Home) [71.218.192.86]:60644 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2016-10/txt/msg00014.txt.bz2 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