From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6EaoMly3DmaKNiMAWB0awg (envelope-from ) for ; Thu, 04 Apr 2024 10:21:16 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=WeERaiFb; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=WeERaiFb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CAB421E0C0; Thu, 4 Apr 2024 10:21:16 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A879B1E030 for ; Thu, 4 Apr 2024 10:21:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 473B53858C32 for ; Thu, 4 Apr 2024 14:21:14 +0000 (GMT) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2077.outbound.protection.outlook.com [40.107.20.77]) by sourceware.org (Postfix) with ESMTPS id BBD87385840E for ; Thu, 4 Apr 2024 14:20:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BBD87385840E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BBD87385840E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.20.77 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1712240451; cv=pass; b=LdjkJWCGEYtQpy2b17M3wCIaTNSUU3ptPCcsn9hJTevQzbtEa0s/hGyOz5nt+ek39iASglkrr4zyuqZtMEw7tu/6CUtpGtULpLFa/GrFu5cLhURybBAQf6Z4D0pQK75Pn5ngN6dLmxvyU012zg5UFGfWm7SVP9xQfszT5rE+0uE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1712240451; c=relaxed/simple; bh=nk+KHXQbhC9Cd/TyLOKjGfBpqXgTcoq80rAvkX7yonU=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:To:From: MIME-Version; b=bNqbSlaw3UxY4kTwJbuEMLz42UsyiGmGXyeeQysnoS7L3bkUKLC17mecSjFdvLS2/bshhdJTAj5DT1Bw8WZiDRE6i9ek0lG6XlmVHK7p6EyIJ9m94BdI/9Mve3qao0KkByaWBtYfiAGJE7YwaG+gPAOnhdp9Zpie3hojyCKmV9s= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=kenj5MdzMAbEMniLJAEIY2OR9pH4dmf9sGVf0Xe19DkdxX85e0q4JSnAIMYupnxDMAh8o5WWKpdi1ZT/3vrZGriHfRnMjbuPcQhS7WFWA2jAJvxf/5j8+vTHJvGPX5l6HWn7fRHMIYZawObqqUbxTwSi4cj/CTtvAfTSxtm00TmNmGp9D3zssgP9gNjEUdDyNg3ToK6+ZE76MMZl4qIsOrIYIBd7bTRrSsctadnakAlqBt9sFI6Z/bKr8k97CuBZEtxRSEmGCbfmUIj6v5Ae71bEatyJmM7TBhwL5/LiNB5QUDPJmWH5+PGhurcA5qtoUrl7mRKdVdLJWUWsqsh2dQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NRK0/hcjWHBqibjUa1nhMymYn/tTaFu9giac1dgLpzA=; b=c9Nm3AaiwqPJAkWF8+wZv1zEBAkiYJeTIAwluEVbpd5CabzrlThPU1JVxxaoSomrpXCBbPQ1Ylkzia1aM7oJDAeXwvvGFVuMjjdZBDDWdAd0P90YkWhAgZMk2vbK3aTEbzx04In2u+76Fs6tJ/BnFyAgQmvJ7yH7TiQW79h72JG18zd5f425hUJE+xlQj6dUmVU0jtokbG/1M51F+ZBUI6Sx6x7gcJl3aflDKCcn0uovoz+oyEOkUfVrhYPnKFPRyD82KE3dy5AInelyjeQs1qbYLcQOK+Tm/3go+X4Aj3YyyNKowA9/KMsRXao35ajJsobBNFkJ8xsGAg+P4FUDXA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NRK0/hcjWHBqibjUa1nhMymYn/tTaFu9giac1dgLpzA=; b=WeERaiFbgMyNX2TaKUqtrwOh/Q/ig1bjsGgiHs4KQFGMyH4ryiM16brvIrTxITHN/nU2LIEcsemyGkgJ1vO/zODyfG1X9H8N4L+YPZ/pujjWVzlOdeGc2vNrdQE0hP9fEaqHWid38tbr/tYgXQuhic8tQGTNEUZR+CLlqf9W3PY= Received: from AM6P193CA0090.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::31) by DU5PR08MB10636.eurprd08.prod.outlook.com (2603:10a6:10:523::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.40; Thu, 4 Apr 2024 14:20:39 +0000 Received: from AM1PEPF000252E0.eurprd07.prod.outlook.com (2603:10a6:209:88:cafe::7d) by AM6P193CA0090.outlook.office365.com (2603:10a6:209:88::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46 via Frontend Transport; Thu, 4 Apr 2024 14:20:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM1PEPF000252E0.mail.protection.outlook.com (10.167.16.58) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Thu, 4 Apr 2024 14:20:39 +0000 Received: ("Tessian outbound 9b7417e2a8eb:v300"); Thu, 04 Apr 2024 14:20:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4595488efe824f0f X-CR-MTA-TID: 64aa7808 Received: from b07193fc5c40.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 23323614-6274-4EF9-B42D-DF7087B1DC69.1; Thu, 04 Apr 2024 14:20:32 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b07193fc5c40.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 04 Apr 2024 14:20:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k3pGQmsQWAfe5Zp6yzfY7lV0B1THoJZ9Z70EIJK9J4n7KqfUoz5uDCxvJYHFB6Rbti1Seay15eWC2QdBW+MyAO+xHBNgUJ5fYs+nA/eaR8Q5oxqMUg7oUk7aB6UUb5IDUJ14GcHg2FKV5uToJwtWzSqpuhZNTB5xqn49Rb7Cnxqc0DUyA3ofj/8ih3IMPwltErIcc4EryJSz3qqP2ghPIUgj//CPLSd3YD0bcz8QzJXK7Te/1LAYVxXZSL3fhw77kWUoiaU8f3hTMCASTe5Aza4EuFDPXPb755A01iQ/sSoVUThh2Ev46kGe2OQGI/pF2U6AubQJg6oJenC5c9znQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NRK0/hcjWHBqibjUa1nhMymYn/tTaFu9giac1dgLpzA=; b=AGqN+VThloFIXRaAK5uuoQHMK2y6zA0fDu/XGGxn/D+zKIwx9ZwCBhLPFS0013UZYeZBkK0zskRJRejn8DSib4HKmaLmzfxC6auuxpdQh6h6VcIa8mXuuEQg7hKi+HQo0zn2qaG8e6h5QvBerlzJthrAmJoHqLMFkTNH4Zx72hE3hIbqLrHkeag6YD3Br96NBX188SiikYCB2BaAjcpkDI+zhaEfdym9X7OHc+gBEl41f2zZ2hcoszfqCplPGlGWDaeHhk8prINtFSYhRa+vC8MxbITfzkjIwKGVdRNZY9TU+yaUTzmKydfTtKHsi8WBpgwUaZXnzoEHpE1aD84lkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NRK0/hcjWHBqibjUa1nhMymYn/tTaFu9giac1dgLpzA=; b=WeERaiFbgMyNX2TaKUqtrwOh/Q/ig1bjsGgiHs4KQFGMyH4ryiM16brvIrTxITHN/nU2LIEcsemyGkgJ1vO/zODyfG1X9H8N4L+YPZ/pujjWVzlOdeGc2vNrdQE0hP9fEaqHWid38tbr/tYgXQuhic8tQGTNEUZR+CLlqf9W3PY= Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AS4PR08MB7579.eurprd08.prod.outlook.com (2603:10a6:20b:4fe::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 4 Apr 2024 14:20:29 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::363f:3fc8:fc36:58ed]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::363f:3fc8:fc36:58ed%5]) with mapi id 15.20.7409.042; Thu, 4 Apr 2024 14:20:28 +0000 Message-ID: <3d4c9bab-aefa-489f-91e2-fe5bc7616755@arm.com> Date: Thu, 4 Apr 2024 15:20:28 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 4/7] gdb: Use passed gdbarch instead of calling current_inferior Content-Language: en-US To: Gustavo Romero , gdb-patches@sourceware.org Cc: thiago.bauermann@linaro.org References: <20240404064819.2848899-1-gustavo.romero@linaro.org> <20240404064819.2848899-5-gustavo.romero@linaro.org> From: Luis Machado In-Reply-To: <20240404064819.2848899-5-gustavo.romero@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO6P265CA0018.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ff::6) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS4PR08MB7579:EE_|AM1PEPF000252E0:EE_|DU5PR08MB10636:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: dA0/CCtcl2sxUHW3LDCe8A3bbFOEshsDPMjH3pateX55rIvj9EgMUZVYDf1iXqDOUPXmuYOU7+mOFPJv42gemfOpOv+V7ZlAIdPb8PNx4uEiGN3f5IJFAiHdc4jL/XMl7Vd4MwTJihew//5Bm4ek5ZV8t0oANRIdZSX3D4eq1fyT2x4wAYzo6ecZ875qfpEEh2AulHNUj0K9wRVn+Z1CR8WYPsBNd0nER3IzC83I1hffD7MOE+zcl2Zk2/oxNGNbgJuj1lbW8sz96gIivrStD6DlRIOaviQlJsgLnrTOL6nfe4uUXQg+RNAGA7eB3ww74oUf8tpSN7Dybevy9ihufXjCjVPsiQeDo/8GZHyryvsUlMbhiI5sECBehnajSBlH39X/U5PhfjZ+WKIIKrk1h/3oUTiuGjM/T5uNN48u7PNOU+DXY+VGvF3ZNY0oGLsNfcXtk5VUu9RkHH5i5Wm4g+M52ja7RVBTRYVLfG4Bb78/OMdqbp71xTJBzZVfFC9a49nkyj76pm54h5/bJyiz3Nx/pAcdMRdEEoDxGPDrxaYaXdFgeucxG4HVaqx57ggdHSMggYh6p16KWhgBg7TRZFJ0j0rtwhzpheccuKJUAdu11CAm4KaZIQHZhFeZuSkXP3WO6CL8oADf5VVHyW9QKR6j3TEvYhT7fpaK/glSySU= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB3919.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005); DIR:OUT; SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7579 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM1PEPF000252E0.eurprd07.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc01bd0d-e0c0-44d1-40bc-08dc54b26743 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j3UxbZEBrA44Sf/lsnzAm5BK8M5cOTLnRx6Wamf8FD2J/tpuVXOqvofKnVgppdWDmWgDiW/UbnBjyCF4HHMgBV6VHFksHmxrzgucnHSQhSoiLOqCJbuGhU3/LN9JjmB/nE2794l7OjhVMYVrHSGxib9u0NRVP2XoR1xK4+WxZ5/W2jV2z5yAmJcud91YKk/dpqwwLStRbu/a5+k8p0qV4fBLeeFEaz4RnmLFcgovjYk0xunhap6EMDZZIcjZmMEUkSYc9Ors76aN9bX7SmiuCvUdi6q5d0uP+T3g3cs2VG/IoanwwZ3IRVFhiknO0Tu7PklZzuG1NsENzDnI5KsjIAKeLjHHEH7nIgpW+E2+0yLxNctCHwjSNNB2sspsG4/vd/fHE/pdC5TMiwS+bR9hmkDg90Kb70g6UM0Y+uQQp57modT618c1E4VUn/31ZXGRgyc8OGN8xmuBts5QOcuskkXuYT9t0eu3824BOcMRIHar7w+mS7+uZzfTVX8KmBf/QJqsuuWKwiB6RI1Ksw3tuV52jRDD8S1TYDzd91hbgPKXxrDywfmAptd3nBppSychh/nC7KWWU5K+Une3nyc8T6yCuf+o7TywdoAR1HW0Slqim4WcoVVWytMr4M6ES0Db8TqwtVZBDXswNzShmtHMmHBh/9wB7qQ3U7hTJEIbyVrVaRJg8KXSROBhRJj6wfVWs8CsyILqNZ0AZvi3nAArrvWyyMXyn2tVMjN4Gti6yQQMd9P2iPGcDeuHkU2FJu57 X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(82310400014)(1800799015)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2024 14:20:39.2671 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc01bd0d-e0c0-44d1-40bc-08dc54b26743 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM1PEPF000252E0.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5PR08MB10636 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org On 4/4/24 07:48, Gustavo Romero wrote: > In do_examine function, use passed gdbarch when checking if an address > is tagged instead of calling current_inferior()->arch() to make the code > more localized and help modularity by not calling a current_* function, > which disguises the use of a global state/variable. There is no change > in the code behavior. > > Signed-off-by: Gustavo Romero > --- > gdb/printcmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/printcmd.c b/gdb/printcmd.c > index 774e3ec74ae..62fbcb98cfb 100644 > --- a/gdb/printcmd.c > +++ b/gdb/printcmd.c > @@ -1132,7 +1132,7 @@ do_examine (struct format_data fmt, struct gdbarch *gdbarch, CORE_ADDR addr) > = value_from_ulongest (builtin_type (gdbarch)->builtin_data_ptr, > tag_laddr); > > - if (gdbarch_tagged_address_p (current_inferior ()->arch (), v_addr)) > + if (gdbarch_tagged_address_p (gdbarch, v_addr)) > { > /* Fetch the allocation tag. */ > struct value *tag Thanks. This is OK and can go in separately, or alongside the rest of the series if you wish. Approved-By: Luis Machado Tested-By: Luis Machado