From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29539 invoked by alias); 12 Jun 2009 00:52:00 -0000 Received: (qmail 29529 invoked by uid 22791); 12 Jun 2009 00:51:59 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Jun 2009 00:51:53 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id F3C84108A5; Fri, 12 Jun 2009 00:51:50 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 9927D1089C; Fri, 12 Jun 2009 00:51:50 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MEuzl-0001NT-EI; Thu, 11 Jun 2009 20:51:49 -0400 Date: Fri, 12 Jun 2009 00:52:00 -0000 From: Daniel Jacobowitz To: Paul Pluzhnikov Cc: Vladimir Prus , tromey@redhat.com, gdb@sources.redhat.com Subject: Re: Registering pretty-printers Message-ID: <20090612005149.GA4987@caradoc.them.org> Mail-Followup-To: Paul Pluzhnikov , Vladimir Prus , tromey@redhat.com, gdb@sources.redhat.com References: <200906080310.58102.vladimir@codesourcery.com> <200906111229.04020.vladimir@codesourcery.com> <8ac60eac0906111014y67049cb9vb5048acf2939373b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0906111014y67049cb9vb5048acf2939373b@mail.gmail.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00117.txt.bz2 On Thu, Jun 11, 2009 at 10:14:32AM -0700, Paul Pluzhnikov wrote: > 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. In my opinion, anything that increases the size of the executable is a non-starter. I don't think there's any reliable way to create a non-allocatable section, and it would have other problems, like duplicate elimination. -- Daniel Jacobowitz CodeSourcery