From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65235 invoked by alias); 4 Apr 2016 16:26:11 -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 65225 invoked by uid 89); 4 Apr 2016 16:26:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=pretty-printers, Evans, evans X-HELO: mail-pa0-f47.google.com Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 04 Apr 2016 16:26:09 +0000 Received: by mail-pa0-f47.google.com with SMTP id td3so146790225pab.2 for ; Mon, 04 Apr 2016 09:26:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=iyflvN5BFMzl5meZJR4nTYuvWDT01K6iOqb+OPTCfKY=; b=MvdnNqS/iWO7+Qzqc4YWJt/PdF2A9uDF17yZqqRS5NmWPUtBRmcNyD4g17qn+cEyAh lDw7bTi+5bhlqoG3Xyo1wg1QwoB4Y3Z8MFkXPebDVo8asDyxq4pOg4NjvtRI7LIZYsLa ei04Vtej5mk8Ah1FC2ur2UUEB4cLgiriKv1V3GmoDNvCGT8UQwF4cK9cf8MOdcysl/iZ MmS+fyoXYERtcIk77OXEW3mtC01qUDtpMJWKrjKj8y04Cx9bHkpxXlxEUB4Gq5hagmbV nEA2YoheZ5QM7PXBCBvE2fF9u8Wfa661wM0SZdMM29XfsNyM6CZpy5N70/iF5dgDc+UG pTIQ== X-Gm-Message-State: AD7BkJKBTdcVUFQ8OtlT2zgInqiYZO3FG50CWCvYoUrmieLx91eEvqOePZTZcuwXjHCJrA== X-Received: by 10.66.249.166 with SMTP id yv6mr51333810pac.91.1459787168120; Mon, 04 Apr 2016 09:26:08 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id ml5sm1492363pab.2.2016.04.04.09.26.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 04 Apr 2016 09:26:07 -0700 (PDT) From: Yao Qi To: Doug Evans Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix use of lazy strings outside of pretty-printers References: <001a113acad09920e7052f4b6c95@google.com> Date: Mon, 04 Apr 2016 16:26:00 -0000 In-Reply-To: <001a113acad09920e7052f4b6c95@google.com> (Doug Evans's message of "Wed, 30 Mar 2016 22:11:14 +0000") Message-ID: <86r3elnxwo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00044.txt.bz2 Doug Evans writes: Hi Doug, patch is good to me, > + long length =3D self_string->length; > + struct type *index_type, *range_type, *array_type; > + > + if (TYPE_OBJFILE_OWNED (elm_type)) > + index_type > + =3D objfile_type (TYPE_OWNER (elm_type).objfile)->builtin_long; > + else > + index_type > + =3D builtin_type (TYPE_OWNER (elm_type).gdbarch)->builtin_long; > + > + if (self_string->length =3D=3D -1) Nit: s/length/self_string->length/ > + range_type =3D create_static_range_type (NULL, index_type, 0, -1); > + else > + range_type > + =3D create_static_range_type (NULL, index_type, 0, length - 1); --=20 Yao (=E9=BD=90=E5=B0=A7)