From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta034.useast.a.cloudfilter.net (omta034.useast.a.cloudfilter.net [44.202.169.33]) by sourceware.org (Postfix) with ESMTPS id 3DCB43858D3C for ; Wed, 13 Sep 2023 15:11:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DCB43858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from eig-obgw-5009a.ext.cloudfilter.net ([10.0.29.176]) by cmsmtp with ESMTP id gQLoqOhzDez0CgRWbqnqSe; Wed, 13 Sep 2023 15:11:29 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id gRWwqKOhV6gNXgRWxqQBXS; Wed, 13 Sep 2023 15:11:51 +0000 X-Authority-Analysis: v=2.4 cv=I+Z2+fsg c=1 sm=1 tr=0 ts=6501d137 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=zNV7Rl7Rt7sA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=zstS-IiYAAAA:8 a=cautniMICx-Rm4L37-8A:9 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=m7ZgWVwnHlqDY6asEcZM7ZwM2l5A9WgnP/p0Xjpy9f0=; b=SkQ7dYYFPOIjy02J42//d9sNfl EMZf8NJLQtHxikM4fvmfdijGvZkyV76b0L4CJ/jXOKE7RIA/2fMqaz9VW+CjwB0RRhVRAjid+PDRJ G2N1OKSDfqSVfAZdE/6jNrFV+; Received: from 71-211-130-31.hlrn.qwest.net ([71.211.130.31]:41904 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qgRWw-003o5J-15; Wed, 13 Sep 2023 09:11:50 -0600 From: Tom Tromey To: Luis Machado via Gdb-patches Cc: Luis Machado , thiago.bauermann@linaro.org Subject: Re: [PATCH v6 14/17] [gdb/generic] corefile/bug: Use thread-specific gdbarch when dumping register state to core files References: <20230913101815.178154-1-luis.machado@arm.com> <20230913101815.178154-15-luis.machado@arm.com> X-Attribution: Tom Date: Wed, 13 Sep 2023 09:11:49 -0600 In-Reply-To: <20230913101815.178154-15-luis.machado@arm.com> (Luis Machado via Gdb-patches's message of "Wed, 13 Sep 2023 11:18:12 +0100") Message-ID: <87cyymhzuy.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.130.31 X-Source-L: No X-Exim-ID: 1qgRWw-003o5J-15 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-130-31.hlrn.qwest.net (murgatroyd) [71.211.130.31]:41904 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPOzF4GHaXFFrIV4lUxxzzWChhsTSMJMf70Sc4DH11mNihcDbAXesfZRTXWgQkHIGSTe5N6SCrQ4v67tzmNlYqVS/teRLpPHWDD0R+Ojaiu2Hpp6akUZ 2AxVgVnVLyBKtHnKQrpcLs7JV4ZB45B5UNbSuB1FWengVeomdjl+FEj8V28fIITG0gfjZYLm9YTVkoUlHfUC3vj6qK3OJfi971Y= X-Spam-Status: No, score=-3019.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Luis" == Luis Machado via Gdb-patches writes: Luis> When we have a core file generated by gdb (via the gcore command), gdb dumps Luis> the target description to a note. During loading of that core file, gdb will Luis> first try to load that saved target description. Luis> This works fine for almost all architectures. But AArch64 has a few Luis> dynamically-generated target descriptions/gdbarch depending on the vector Luis> length that was in use at the time the core file was generated. Luis> The target description gdb dumps to the core file note is the one generated Luis> at the time of attachment/startup. If, for example, the SVE vector length Luis> changed during execution, this would not reflect on the core file, as gdb Luis> would still dump the initial target description. Luis> Another issue is that the gdbarch potentially doesn't match the thread's Luis> real gdbarch, and so things like the register cache may have different formats Luis> and sizes. Luis> To address this, fetch the thread's architecture before dumping its register Luis> state. That way we will always use the correct target description/gdbarch. FWIW this seems fine to me. Approved-By: Tom Tromey Tom