From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21369 invoked by alias); 26 Jun 2009 20:37:57 -0000 Received: (qmail 21361 invoked by uid 22791); 26 Jun 2009 20:37:57 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 26 Jun 2009 20:37:51 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n5QKbnjj003811 for ; Fri, 26 Jun 2009 16:37:49 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5QKbnm1012203 for ; Fri, 26 Jun 2009 16:37:49 -0400 Received: from opsy.redhat.com (vpn-225-10.phx2.redhat.com [10.3.225.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5QKbm5g014942; Fri, 26 Jun 2009 16:37:49 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id E71E2508250; Fri, 26 Jun 2009 14:37:47 -0600 (MDT) To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Registering pretty-printers References: <200906080310.58102.vladimir@codesourcery.com> <200906111229.04020.vladimir@codesourcery.com> <200906122143.49143.vladimir@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Fri, 26 Jun 2009 20:37:00 -0000 In-Reply-To: (Tom Tromey's message of "Mon\, 15 Jun 2009 14\:23\:03 -0600") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00260.txt.bz2 Vladimir> There are two important points I propose: Vladimir> 1. Having a file at top-level, as opposed in some subdir which name Vladimir> differs. Vladimir> 2. Having a file with fixed name. Vladimir> I am probably wrong, but neither of this is true with the current Vladimir> recommended approach. Tom> Yeah. But isn't this just a matter of documenting "this is how we Tom> recommend you distribute stand-alone printers"? I have been thinking more about this problem. I am now wondering if we could have a solution based on Python Eggs. Background reading: http://peak.telecommunity.com/DevCenter/PythonEggs My rough idea would be that a suite of pretty-printers would be packaged as an Egg. We would define a specific resource which would name the registration function. Hook files could continue to work more or less as they do now. An IDE could upload Python code to gdb to invoke the registration function manually. I haven't tried to experiment with this, but based on my reading so far, it seems like it ought to work. What do you think? Tom