From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120540 invoked by alias); 29 Nov 2018 21:10:33 -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 120110 invoked by uid 89); 29 Nov 2018 21:10:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:6.1, H*u:6.1 X-HELO: userp2130.oracle.com Received: from userp2130.oracle.com (HELO userp2130.oracle.com) (156.151.31.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Nov 2018 21:10:31 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wATL8T76022449; Thu, 29 Nov 2018 21:10:27 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=W2FLmw/LWgfT/F0g2KI3ps/nMPTImUQaEwduxiDQCCs=; b=lkKvMK6EY4QVxtlOJ8g4jMm2MX+ZRmthKhQ2r4mWitGqPxBmZIDdy/o5YUohQC+ElSzi USGBitOZhr4UP40p6vqAoKd+xoGT5uGZ/Fk5xXmbVIhqEnPWYXPmP09d7e5iqQdfQeiq hb+1R5eoRIt8Oc1lvGSlQk3WasB1JPHt5xdO7/y4X+w/qYCCeJ3W3LWPicnPDYf0orRt hPFPYRzzRZ0aEhOUYnqjGMcR1savt/hjvzQTAIRbwZbtPur9dtQBiLlEvWFpe+tI9W14 dyURWl9i9dmKuB2CdVgr1N5Z7OGBQsd9+3eRA0pVxgRehbKIEpq5pyrjcJIb5Zh/MDY5 rA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2p2jf0hxqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 21:10:27 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wATLAQ6A026497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Nov 2018 21:10:26 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wATLANTh023345; Thu, 29 Nov 2018 21:10:24 GMT Received: from [10.159.237.89] (/10.159.237.89) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Nov 2018 13:10:23 -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> From: Wei-min Pan Message-ID: <82a6d5fc-7152-88aa-115b-c767fd3f3569@oracle.com> Date: Thu, 29 Nov 2018 21:10: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: <87tvjzae0u.fsf@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00550.txt.bz2 On 11/29/2018 11:18 AM, Tom Tromey wrote: >>>>>> ">" == Wei-min Pan writes: >>> Problem is copy_type will assert on to-be-copied type which does not >>> have an >>> associated objfile. It doesn't matter if the type is entirely arch-owned. > I didn't follow this thread in too much detail, but FWIW I believe the > rule is that an objfile-owned type can refer to a gdbarch-owned type -- > but not vice versa. > > Following that it seems to me that there should not be a need to call > copy_type on a gdbarch-owned type. So maybe that can be avoided, > instead of removing the assert? > > Tom Looks like we have at least 2 options: (1) Making sure the type is objfile-owned before calling copy_type in resolve_dynamic_range and resolve_dynamic_array as you suggested, or (2) Replacing the assert with an objfile-owned check in copy_type, similar to what copy_type_recursive does.