From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14849 invoked by alias); 29 Nov 2016 05:06:11 -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 14799 invoked by uid 89); 29 Nov 2016 05:06:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:U*tom, H*MI:10924, H*m:10924, H*r:4.86_1 X-HELO: gproxy7-pub.mail.unifiedlayer.com Received: from gproxy7-pub.mail.unifiedlayer.com (HELO gproxy7-pub.mail.unifiedlayer.com) (70.40.196.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Tue, 29 Nov 2016 05:05:59 +0000 Received: (qmail 27571 invoked by uid 0); 29 Nov 2016 05:05:57 -0000 Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy7.mail.unifiedlayer.com with SMTP; 29 Nov 2016 05:05:57 -0000 Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id Dh5u1u00P2f2jeq01h5xZZ; Mon, 28 Nov 2016 22:05:57 -0700 X-Authority-Analysis: v=2.1 cv=Zpp+dbLG 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=L24OOQBejmoA:10 a=fcMF8LLTcp759E6AK3gA:9 Received: from 71-218-195-233.hlrn.qwest.net ([71.218.195.233]:46172 helo=bapiya.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_1) (envelope-from ) id 1cBac6-0000aB-4z for gdb-patches@sourceware.org; Mon, 28 Nov 2016 22:05:54 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [RFA 0/8] C++-ification series #5 Date: Tue, 29 Nov 2016 05:06:00 -0000 Message-Id: <1480395946-10924-1-git-send-email-tom@tromey.com> X-BWhitelist: no X-Exim-ID: 1cBac6-0000aB-4z X-Source-Sender: 71-218-195-233.hlrn.qwest.net (bapiya.Home) [71.218.195.233]:46172 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-SW-Source: 2016-11/txt/msg00928.txt.bz2 This series holds a few more C++-ification changes: * Generalizes gdbpy_ref to an "externally refcounted" smart pointer, with the behavior controlled by a policy class. This is then used to convert BFD refcounting. * Adds a class to optionally unlink a file in the destructor. * Adds a class to call value_free_to_mark in the destructor. * Adds a class to optionally discard psymtabs in the destructor. * Fix up one more cleanup in the Python code that I missed. * Change demangle_parse_info to have a constructor and destructor and use unique_ptr for managing these. gdb is getting relatively close to no cleanups in the Python layer after this series (25 hits for "make_cleanup"). Please review. I'm running this through the buildbot and will comment when that is done. Note that the BFD refcounting change is a bit tricky. It probably should have extra testing -- I tested it locally, and there's the buildbot, and additionally I built it locally using the mingw32 cross toolchain; but even so it's possible that there are paths that weren't updated. These will manifest as build failures on some other host. One thing that would be nice is if there were a way to build gdb such that all the nat* code were built. This would at least catch compiler errors. I think it could be done by having stub implementations of any platform-specific APIs that are used (just a #define for each would probably suffice), and by arranging for only the real nat*.c file's initialization function to be called at startup. Tom