From patchwork Tue Aug 26 17:58:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 383177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 97C1014010B for ; Wed, 27 Aug 2014 03:58:21 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=I2VINfGSSSRP+ASqg FgUIX7aFnm2fV9mQEyPY8Ny/GLeC9f6AtHORJJnWXzOqm2uDx3Ggtaryqfcg0fKJ ya05046YTIqlCi75wFR5bkCY0HxHJMHhMyMEblOZvMzjyUkoQwq/RILtgkJc/1sD c6WYdmD7XMIhAziW4EJ44INfZQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=BqXtO2kasrdhKohe04L0wOY RKCY=; b=ML9fly4cwvgGDQtCHQnrt5hC57RBp98pQ/QjHrYLNynhdUBdN20JMik KTVNTZiH+ijCaCDpia9MpARZRj4d/6RxNXBtoKPqlr30jiQVHOKaWsQK55DN/NRz +BttMZsH1Qi91mecxlo/GTUQ81McwKgrcz5unYyxIwjzgoburwgY= Received: (qmail 14622 invoked by alias); 26 Aug 2014 17:58:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14603 invoked by uid 89); 26 Aug 2014 17:58:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 26 Aug 2014 17:58:11 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7QHw8SH008441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Aug 2014 13:58:09 -0400 Received: from localhost (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7QHw7ZR029823; Tue, 26 Aug 2014 13:58:07 -0400 Date: Tue, 26 Aug 2014 18:58:06 +0100 From: Jonathan Wakely To: Siva Chandra Cc: Jonathan Wakely , gcc-patches , Doug Evans , libstdc++ Subject: Re: [PATCH libstdc++ v3] - Add xmethods for std::vector and std::unique_ptr Message-ID: <20140826175806.GA6689@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Shouldn't there be a change to python/Makefile.am so that xmethods.py gets installed alongside printers.py? Otherwise you can use these new xmethods in the libstdc++ testssuite, but they're not available to users. I'd also expect something to call the register_libstdcxx_xmethods function automatically, as in the attached patch, although this doesn't work for me. How am I expected to use these xmethods? commit 3b04eb18e94cace91cfbc2cd80c0acd0bf7d7d86 Author: Jonathan Wakely Date: Tue Aug 26 18:52:39 2014 +0100 * python/Makefile.am (nobase_python_DATA): Add xmethods.py. * python/Makefile.in: Regenerate. * python/hook.in: Load the xmethods. diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am index ac7341a..c34c860 100644 --- a/libstdc++-v3/python/Makefile.am +++ b/libstdc++-v3/python/Makefile.am @@ -33,6 +33,7 @@ all-local: gdb.py nobase_python_DATA = \ libstdcxx/v6/printers.py \ + libstdcxx/v6/xmethods.py \ libstdcxx/v6/__init__.py \ libstdcxx/__init__.py diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in index 21d74a90..7d0c8ac 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -316,6 +316,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) @ENABLE_PYTHONDIR_TRUE@pythondir = $(prefix)/$(python_mod_dir) nobase_python_DATA = \ libstdcxx/v6/printers.py \ + libstdcxx/v6/xmethods.py \ libstdcxx/v6/__init__.py \ libstdcxx/__init__.py diff --git a/libstdc++-v3/python/hook.in b/libstdc++-v3/python/hook.in index 3620523..29c0f3c 100644 --- a/libstdc++-v3/python/hook.in +++ b/libstdc++-v3/python/hook.in @@ -58,3 +58,8 @@ if gdb.current_objfile () is not None: # Load the pretty-printers. from libstdcxx.v6.printers import register_libstdcxx_printers register_libstdcxx_printers (gdb.current_objfile ()) + +if hasattr(gdb, 'xmethod'): + # Load the xmethods + from libstdcxx.v6.xmethods import register_libstdcxx_xmethods + register_libstdcxx_xmethods (gdb.current_objfile ())