From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51017 invoked by alias); 3 Nov 2016 21:20:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 50998 invoked by uid 89); 3 Nov 2016 21:20:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1240, H*f:sk:CADPb22, H*i:sk:CADPb22 X-HELO: mailout02.t-online.de Received: from mailout02.t-online.de (HELO mailout02.t-online.de) (194.25.134.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Nov 2016 21:20:26 +0000 Received: from fwd14.aul.t-online.de (fwd14.aul.t-online.de [172.20.26.242]) by mailout02.t-online.de (Postfix) with SMTP id 494B741AC3EF; Thu, 3 Nov 2016 22:20:24 +0100 (CET) Received: from localhost (bNS2MoZLwhWkT2wJuH9MmHDC2z+4NxwTHHNfl4t3E38NCqOOTZZqbp21nigEaw7w7O@[91.64.140.140]) by fwd14.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1c2PQt-31Lnwe0; Thu, 3 Nov 2016 22:20:23 +0100 Date: Thu, 03 Nov 2016 21:20:00 -0000 From: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= To: Doug Evans Cc: gdb-patches , Eli Zaretskii , Phil Muldoon Subject: Re: [PATCH, doc RFA] Fix lazy string type docs Message-ID: <20161103222909.GA3858@klara.mpi.htwm.de> References: <94eb2c1121f421b06405406923b6@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00073.txt.bz2 On Thu, Nov 03, 2016 at 12:03:46PM -0700, Doug Evans wrote: > To fix this bug we're going to have to break one or the other, or add > a knob (bleah) to control the old, broken, behaviour. Adding a knob to enable the old behaviour does not really help frontends, as with the same effort a frontend adds a "set knob enabled" command it could just adapt to the new behaviour. > Or mark the "type" LazyString attribute as broken/deprecated and > provide a new attribute with correct behaviour. [...] > Opinions? To be honest, I don't really have an opinion on which is better or even correct, as it is still rather unclear to me in which situation a frontend would benefit from using gdb.LazyString at all. To me, the need to specify an encoding or rely on GDB to select something appropriate seems to be a disadvantage over keeping a (address, length) pair and using gdb.Inferior.read_memory() when needed, especially when the contents of that memory can be corrupted and not necessarily contain data of an intended encoding anymore. André PS: > [...] will select the most appropriate > encoding when the sting is printed [...] s/sting/string/ ? (also copied to guile/scm-lazy-string.c)