From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16011 invoked by alias); 12 Jun 2009 07:20:00 -0000 Received: (qmail 16001 invoked by uid 22791); 12 Jun 2009 07:19:59 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Jun 2009 07:19:51 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MF13E-0007fZ-Mz for gdb@sources.redhat.com; Fri, 12 Jun 2009 07:19:48 +0000 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Jun 2009 07:19:48 +0000 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Jun 2009 07:19:48 +0000 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: Registering pretty-printers Date: Fri, 12 Jun 2009 07:20:00 -0000 Message-ID: References: <200906080310.58102.vladimir@codesourcery.com> <200906111229.04020.vladimir@codesourcery.com> <8ac60eac0906111014y67049cb9vb5048acf2939373b@mail.gmail.com> <20090612005149.GA4987@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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/msg00120.txt.bz2 Daniel Jacobowitz wrote: > 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. Personally, I don't care about executable size much, but I find creating custom source file and linking it into executable a very indirect method. It is hard to implement from IDE side, too, because IDE can be used to debug projects that are build by JRHackerBuildSystem, and be unable to automatically add source files to build. My ultimate goal is allowing IDE user to just specify 10 pretty-printer packages, and have them work on every single project he's working on. - Volodya