From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99091 invoked by alias); 30 Nov 2018 17:31:57 -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 99077 invoked by uid 89); 30 Nov 2018 17:31:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*UA:6.1, H*u:6.1 X-HELO: aserp2120.oracle.com Received: from aserp2120.oracle.com (HELO aserp2120.oracle.com) (141.146.126.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Nov 2018 17:31:55 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAUHNhc5133436; Fri, 30 Nov 2018 17:31:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=d5rMOPmkezwl/EMWdUUAkBLtj+XyDaesyeMm7kYJnSs=; b=T7USuxx83zyAiwEPnue6UBwuyXSjNIePnZ1JitJmC1w/HYadp/kTjknmtVLRHC5qVhkS svBLFUteP0Z+t5fyXy0GrFt49Tr8kphLR9DQe574AfCTMCh6UvmwpT4I+hDFrSWoPC4I hMBUMqxNZjU8cUpcEcLYmvswGmSohE8imVrWw/LN96Ru2dDEp6Ulz0zNeAwMsX7xtC7Q F20LaGleMzyu+y2emwm3EnvfwK9CHO8J1NYOWmHFu2/KxrAca2gvaXSpKrSjYaY39Bw3 Py55I0nL/INL9qvBKUrmp5HKM8HYvppyEGUPEuiFoFEqyhn7jyy4XFGy6Mhu7Rcz94BJ yw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2nxxkqyhfu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Nov 2018 17:31:51 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAUHVj6o011014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Nov 2018 17:31:45 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAUHVjgg009883; Fri, 30 Nov 2018 17:31:45 GMT Received: from [172.27.35.125] (/108.88.88.153) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 30 Nov 2018 09:31:45 -0800 Subject: Re: [PATCH PR gdb/20057] Internal error on trying to set {char[]}$pc="string" To: Tom Tromey Cc: Joel Brobecker , gdb-patches@sourceware.org References: <1516844738-79996-1-git-send-email-weimin.pan@oracle.com> <20180125041431.tghhxefsgxnxh3l3@adacore.com> <1dfc87b0-353d-3388-a427-fee247dc79a5@oracle.com> <20180131074526.rqbsjxyxp3p26js5@adacore.com> <1d28e9c6-6377-0c46-6bce-1dc25a7fa2d5@oracle.com> <20180201075955.mnqxzmw4ktuy3f5d@adacore.com> <20181114235153.GB4336@adacore.com> <87tvjzae0u.fsf@tromey.com> <82a6d5fc-7152-88aa-115b-c767fd3f3569@oracle.com> <87lg5ba6vl.fsf@tromey.com> <4107cd46-1978-93a8-1f54-6e1622ffe191@oracle.com> <87woou1sqh.fsf@tromey.com> From: Wei-min Pan Message-ID: Date: Fri, 30 Nov 2018 17:31:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87woou1sqh.fsf@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00575.txt.bz2 On 11/30/2018 7:37 AM, Tom Tromey wrote: >>>>>> ">" == Wei-min Pan writes: >>> Let's use an example: >>> (gdb) p {char []}$pc >>> if the element type "char" is defined in the program, i.e. it has an >>> objfile, lookup_array_range_type sets the "index type" with that >>> objfile's builtin_int. > Thanks. > >>> Both resolve_dynamic_array and resolve_dynamic_range call copy_type to >>> allocate a type and yes modify it to represent a static version of the array >>> type from lookup_array_range_type() above. > Ok, I see. Removing the assertion does seem ok then. Thanks for your review. > > thanks, > Tom