From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2385 invoked by alias); 4 Nov 2016 19:29:46 -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 2375 invoked by uid 89); 4 Nov 2016 19:29:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=muldoon, H*RU:74.125.82.51, Hx-spam-relays-external:74.125.82.51 X-HELO: mail-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Nov 2016 19:29:44 +0000 Received: by mail-wm0-f51.google.com with SMTP id f82so10184711wmf.1 for ; Fri, 04 Nov 2016 12:29:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z8e5AIUQXD9p8Hoyn52HNzQ/4uPsxP74mjlUOGOBVXY=; b=hyGu+Owyz8t9E2BlCk05DGjM3Ccqgh/CYMSU3jwBiONlzav/vm8ej6+5n3xi9jddyQ cJqNNCavs5kLcc9AxjVSCmpbF1OKMe08KaFxU+p2axcHgdtiK1le7cL8WjI2kjwOArFz wt28IiAhtyPWts7EDZ00ImSmbEiYY3fwbCYhFHKvenY5c46HV4z3Qw626CpSwDp81cQ1 I9UPPZ4TlI/IXBV4q6c9oWLaqe0YSWOezaTd3ywTbyV7EIdPrH5rBDdWEOKt0O8nW1zh Zk0KdUn9RGcskxhs+miUnv8luymK5BbijhBWAt4TiDzjs6N/yFtqFf2drcdtQ4HeZOQz EEag== X-Gm-Message-State: ABUngvf2GQOAmCD8f4waZjufL4VYR+2JA9qNd9AdRLR5upojdZrwAPIncqheaCcztQ+sBvAHXitigjMXu0W6D1qH X-Received: by 10.28.68.195 with SMTP id r186mr4677734wma.105.1478287782253; Fri, 04 Nov 2016 12:29:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.152.70 with HTTP; Fri, 4 Nov 2016 12:29:01 -0700 (PDT) In-Reply-To: References: <94eb2c1121f421b06405406923b6@google.com> From: Doug Evans Date: Fri, 04 Nov 2016 19:29:00 -0000 Message-ID: Subject: Re: [PATCH, doc RFA] Fix lazy string type docs To: Phil Muldoon Cc: gdb-patches , Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00102.txt.bz2 On Fri, Nov 4, 2016 at 12:20 PM, Phil Muldoon wrote: > On 04/11/16 17:52, Doug Evans wrote: >> On Thu, Nov 3, 2016 at 5:00 PM, Doug Evans wrote: >>> On Thu, Nov 3, 2016 at 12:03 PM, Doug Evans wrote: >>>> On Thu, Nov 3, 2016 at 10:46 AM, Doug Evans wrote: >>>>> Hi. >>>>> > >>>> >>>> (gdb) py print gdb.parse_and_eval("foo").lazy_string().type >>>> const char >>>> (gdb) py print gdb.parse_and_eval("bar").lazy_string().type >>>> const char [19] >>>> >>>> I don't have a strong opinion on what the correct answer is, but there >>>> is certainly a bug here. >>>> >>>> Phil, do you remember why this code exists in valpy_lazy_string(): >>>> >>>> if (TYPE_CODE (value_type (value)) == TYPE_CODE_PTR) >>>> value = value_ind (value); >>>> >>>> [lazy string support went in in commit be759fcf] > > I can't remember. Too many sleeps ;) It's possible it is just a > mistake and we're worrying about a bug that should just be fixed. > > I think lazy strings were implemented to carry around a string that > remains unfetched (in cases of massive strings) until actually needed, > or a pointer to that string. I also thought there was some work > carried out on them by Tom (?) after the initial commit. > > I keep notes and I'll look on the weekend to see of I can dig out > specific implementation details. Hi Phil. Don't spend too much time on this. I think I'm at a point where I'm comfortable with sending a patch I'd like committed.