From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12074 invoked by alias); 15 Jun 2009 12:55:23 -0000 Received: (qmail 12063 invoked by uid 22791); 15 Jun 2009 12:55:22 -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; Mon, 15 Jun 2009 12:55:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1ACB910DC5; Mon, 15 Jun 2009 12:55:11 +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 DEB7110A42; Mon, 15 Jun 2009 12:55:10 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MGBiP-0005xs-Dj; Mon, 15 Jun 2009 08:55:09 -0400 Date: Mon, 15 Jun 2009 12:55:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: Phil Muldoon , gdb@sources.redhat.com Subject: Re: Robustifying pretty-printers Message-ID: <20090615125509.GA20779@caradoc.them.org> Mail-Followup-To: Vladimir Prus , Phil Muldoon , gdb@sources.redhat.com References: <200906131411.34204.vladimir@codesourcery.com> <200906131421.24719.vladimir@codesourcery.com> <4A363E6F.6020005@redhat.com> <200906151638.57869.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906151638.57869.vladimir@codesourcery.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/msg00142.txt.bz2 On Mon, Jun 15, 2009 at 04:38:57PM +0400, Vladimir Prus wrote: > On Monday 15 June 2009 Phil Muldoon wrote: > > + return self.val['_M_dataplus']['_M_p'].string (encoding, length = len) > > Great, this is exactly what I was looking for. Is it? This uses the length from the (possibly uninitialized) std::string as a maximum. I think we want something higher level, similar to today's "set print elements", to apply. -- Daniel Jacobowitz CodeSourcery