From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8294 invoked by alias); 7 Jun 2009 23:11:07 -0000 Received: (qmail 8286 invoked by uid 22791); 7 Jun 2009 23:11:07 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Jun 2009 23:11:01 +0000 Received: (qmail 6184 invoked from network); 7 Jun 2009 23:10:59 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Jun 2009 23:10:59 -0000 From: Vladimir Prus To: gdb@sources.redhat.com Subject: Registering pretty-printers Date: Sun, 07 Jun 2009 23:11:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.68; i686; svn-948090; 2009-04-01) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200906080310.58102.vladimir@codesourcery.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00067.txt.bz2 Hello, I have a concern about the way Python pretty-printers seem to work now. To register a pretty-printer, one is supposed to do this (according to http://permalink.gmane.org/gmane.comp.debugging.archer/1352) import sys sys.path.insert(0, 'XXX') from libstdcxx.v6.printers import register_libstdcxx_printers register_libstdcxx_printers (None) This seem to contain quite a lot of information that is specific for given pretty printer -- like the package name, and the name of function to register pretty-printers. Some other project might have package named boost and function called register_boost_printers, and some other package might use something else. As result, it is not possible to IDE user to just point at directory and have pretty-printers loaded. Can we maybe require that the __init__ module does registration? I am not quite sure how to avoid specifying this random (for user) libstdcxx.v6 part -- any ideas? - Volodya