From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36198 invoked by alias); 7 Dec 2017 09:18:09 -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 35702 invoked by uid 89); 7 Dec 2017 09:18:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=HTo:D*de.ibm.com X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 Dec 2017 09:18:07 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vB79HTNn004389 for ; Thu, 7 Dec 2017 04:18:05 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2epyjdqgmv-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 07 Dec 2017 04:18:05 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Dec 2017 09:18:03 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 7 Dec 2017 09:18:00 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vB79I0Y942008684; Thu, 7 Dec 2017 09:18:00 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3F598A4053; Thu, 7 Dec 2017 09:12:25 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18C12A4040; Thu, 7 Dec 2017 09:12:25 +0000 (GMT) Received: from ThinkPad (unknown [9.152.212.148]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 7 Dec 2017 09:12:25 +0000 (GMT) Date: Thu, 07 Dec 2017 09:18:00 -0000 From: Philipp Rudo To: "Ulrich Weigand" Cc: qiyaoltc@gmail.com (Yao Qi), gdb-patches@sourceware.org, arnez@linux.vnet.ibm.com (Andreas Arnez) Subject: Re: [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch@init In-Reply-To: <20171206102823.13EF7D80322@oc3748833570.ibm.com> References: <20171206105613.0bab3345@ThinkPad> <20171206102823.13EF7D80322@oc3748833570.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17120709-0020-0000-0000-000003D55028 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17120709-0021-0000-0000-0000426ADAF3 Message-Id: <20171207101758.4b32fe1c@ThinkPad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-07_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712070142 X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00129.txt.bz2 Hi Yao, I quickly talked to Uli yesterday about this and you and Uli are right. There is a possibility that a program chooses not to use the vector registers for their abi even when they are present. I fixed the patch locally. Thanks for catching this! Philipp On Wed, 6 Dec 2017 11:28:23 +0100 (CET) "Ulrich Weigand" wrote: > Philipp Rudo wrote: > > > On Tue, 05 Dec 2017 16:16:07 +0000 > > Yao Qi wrote: > > > Is it possible that we have two instances of gdbarch, with the same > > > target description, but different vector_abi? Two different executables > > > compiled with different vector abis, and GDB can debug them together > > > (multi-process debugging. If we consider multi-target debugging in the > > > future, these two executable can from different targets). > > > > For s390 there only is one vector abi (or non at all) at the time. If you were > > debugging two different executables at the same time you would have two > > inferiors each with its own gdbarch (same would be for multi-target debugging). > > So I don't think those are the reasons. > > Actually, I think Yao is right here. As you say, we can have two executables, > one using the vector ABI and one not. These will require two different gdbarch > structures. But with the patch you propose, when trying to allocate the second > of those two, GDB would see the first one that was already created earlier, > and incorrectly assume that it can simply be reused. > > Basically, the problem is that there *can* be different gdbarchs that share > the *same* tdesc, but differ in vector ABI. Therefore *only* checking for > tdesc does not suffice to correctly identify cached gdbarch structures. > > I agree that it is redundant to again check differences (e.g. in register set) > that would already have led to a different tdesc; but the vector ABI at least > is not one of those. > > Bye, > Ulrich >