From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31625 invoked by alias); 11 Jun 2009 17:14:48 -0000 Received: (qmail 31614 invoked by uid 22791); 11 Jun 2009 17:14:47 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 17:14:36 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id n5BHEYSO030935 for ; Thu, 11 Jun 2009 10:14:34 -0700 Received: from qyk42 (qyk42.prod.google.com [10.241.83.170]) by wpaz21.hot.corp.google.com with ESMTP id n5BHEWbK013619 for ; Thu, 11 Jun 2009 10:14:32 -0700 Received: by qyk42 with SMTP id 42so7221qyk.33 for ; Thu, 11 Jun 2009 10:14:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.110.6 with SMTP id l6mr569028qcp.52.1244740472328; Thu, 11 Jun 2009 10:14:32 -0700 (PDT) In-Reply-To: <200906111229.04020.vladimir@codesourcery.com> References: <200906080310.58102.vladimir@codesourcery.com> <200906111229.04020.vladimir@codesourcery.com> Date: Thu, 11 Jun 2009 17:14:00 -0000 Message-ID: <8ac60eac0906111014y67049cb9vb5048acf2939373b@mail.gmail.com> Subject: Re: Registering pretty-printers From: Paul Pluzhnikov To: Vladimir Prus Cc: tromey@redhat.com, gdb@sources.redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true X-IsSubscribed: yes 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/msg00115.txt.bz2 On Thu, Jun 11, 2009 at 1:29 AM, Vladimir Prus wrote: > I think it's generally wrong to assume that pretty-printers are either: > 1. Always distributed with the library they provide pretty-printing for > 2. Are associated with any separately compiled code. Perhaps my proposal for ".gdb_py" section here: http://sourceware.org/ml/archer/2008-q4/msg00162.html deserves another look? Maybe we don't even need a separate section; just a convention that any variable linked into executable, named "gdb_python_.*_source_me" and containing ASCII be "python sourced" by GDB? The Boost code could declare: const char gdb_python_Boost_Array_source_me[] = "...python code here..."; in the header, and voila: GDB knows how to print boost::array. This could also be easily distributed separately from the library, and the user will just have to link in gdb_boost_array_printer.c into his exe. -- Paul Pluzhnikov