From patchwork Thu Nov 17 10:31:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 60744 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E09939730EE for ; Thu, 17 Nov 2022 10:32:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E09939730EE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668681128; bh=R7+NJN94ZW4ohC4MAXTAoh5SXHk6iWY2ercVrefAptc=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=CS142gcQ2j9aMKjFCpaCHcqOxeeGv+NIUBHBcZQfvcTpJB7vqhIyJq9zReqhQ9VcU +OadYxrLfR7xJj4vkATyBBju+Y6FnotmwQBcmzL9tmxiJLFDvSXnIdmNMjACYdgbwf r12Ykg86hw0lYV1IBJ/2N+4uMJzFct+i33YAlsmA= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140055.outbound.protection.outlook.com [40.107.14.55]) by sourceware.org (Postfix) with ESMTPS id 5A99D398240E for ; Thu, 17 Nov 2022 10:31:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5A99D398240E Received: from AS9PR06CA0115.eurprd06.prod.outlook.com (2603:10a6:20b:465::24) by DU0PR08MB8954.eurprd08.prod.outlook.com (2603:10a6:10:465::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.6; Thu, 17 Nov 2022 10:31:38 +0000 Received: from AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:465:cafe::b3) by AS9PR06CA0115.outlook.office365.com (2603:10a6:20b:465::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.18 via Frontend Transport; Thu, 17 Nov 2022 10:31:38 +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 AM7EUR03FT020.mail.protection.outlook.com (100.127.140.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.8 via Frontend Transport; Thu, 17 Nov 2022 10:31:37 +0000 Received: ("Tessian outbound 73ab5f36653e:v130"); Thu, 17 Nov 2022 10:31:37 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 3ed43c3910f6c857 X-CR-MTA-TID: 64aa7808 Received: from daf5707a78c4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 86D84F43-61A4-4018-BCA4-E82E9FE04EAA.1; Thu, 17 Nov 2022 10:31:30 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id daf5707a78c4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Nov 2022 10:31:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h0DKn0y77vEVm7ZVraQqPlAewki1CtXHflWAMkxdOuMDJj+yiH7pXKglRIA/jRiNTE4gyw6h+FkXynm74K2/xJNVR4iqA7mGm7KWg6VBHE/fAxJYbw986RwgTeKwKjyaz92OC7cImJX1FiiO+WstnP4t/CceV9HuibhNFLCrP365EhAIMnfj57S36YZE7L9wMu8gLEA0O+vLly45PUPyVtNmXK8PLIBoM3mD8cS8NMb5rUX6sfjb4gIIsgCZbNpayOV6niqfVlsgDBVbHsicawkUaGmcd7omLSveSE7RoCRYxtboq0jlxSa9QX2SWegUVn6wIh4MJjfm1iEHQWTQEQ== 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=R7+NJN94ZW4ohC4MAXTAoh5SXHk6iWY2ercVrefAptc=; b=WqFRrUaS9TqdYC/akZRKMkSkVBj4T0YjX2LB8Og3a640bnzNIJCNXgSJUP+6mESD8cUcaPTp2bNcMwPDSrjWX8QwuqFRmB4jGw1KFo4sI/KkGVspcHblVw4r2wQ3ISfKbkDnVG1gm5Zl5RSegZoPgYQ2nKnkWEQqlKD4mAMyUn+NuSVdehBdzn07Kh+D3UH1Q4c+xpbTyIS/RySJ0yrrWbedx1whZJNi/A5JxaodZLwsHhfAeaX0SnVoDKYpD4lyiY19J4XVtFxmouJBx5uxmJXrvNDDy67HXBmlIOeZ2L4NrPYqWWrkX4gEfmT2FLnZQHl+P0LoyIk4golBixVSgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6P192CA0044.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::21) by PAXPR08MB6447.eurprd08.prod.outlook.com (2603:10a6:102:de::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Thu, 17 Nov 2022 10:31:27 +0000 Received: from AM7EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:82:cafe::3f) by AM6P192CA0044.outlook.office365.com (2603:10a6:209:82::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.20 via Frontend Transport; Thu, 17 Nov 2022 10:31:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT007.mail.protection.outlook.com (100.127.140.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Thu, 17 Nov 2022 10:31:27 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 17 Nov 2022 10:31:26 +0000 Received: from e129171.arm.com (10.57.68.244) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 17 Nov 2022 10:31:26 +0000 To: CC: Subject: [PATCH] [obv] Document the memory_tagged argument for memory region callbacks Date: Thu, 17 Nov 2022 10:31:25 +0000 Message-ID: <20221117103125.2358414-1-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT007:EE_|PAXPR08MB6447:EE_|AM7EUR03FT020:EE_|DU0PR08MB8954:EE_ X-MS-Office365-Filtering-Correlation-Id: 46ccf39b-0cbb-4be8-23fa-08dac886e896 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: 61O4rmhLDyWdGWc7YV6cEUuq2udKCJFX9RjPzs9viyOgvSjaqpOu51n66vbfhuyCbJQVrGCo7GTizYSRW5ce9poUliA3eOFzUfWi7kExXxJQWX50T1VVjRh+RFiRsqV5PAH1T0nwpajQ1fJhsVHYKBiycBA2uVP+AowuE6CawCoKIkis3tIJsTHHkSuKYp8T+rIQ3w5JGUJB5MP9+DcZ+uxqshLV2jMENBKZe9R7owkK/c/xAypJO9V1/mQ6UAcEn1OhzV56GP3hGeUQYNwl+r9VKerhZ9fpXJtlGVeBNhUHX51JSPkDBaP+3Fp0qTG3qlpEuVUhkIFxhURZVu7DIFFaYH27ZBLCfC49tK9gEtiqQXTRugf1CrskoIe+WRxztvxTa5YbSz2J2Cw+W7TZvWRj4QSbLklrqVzEfOvC2d9KuqlQEK3FmWsNBCJ1pU/vXWTOlmZnkDhviIRBotXzTUHAZfxfFs7jUoQJDIHZFP/sHh8Nhw5Wuofe81k5aKZiVAAZy9Jl6akQT/UxrtWpHhllIyTHI4Mo6EAvT0HNtWWuB5diEK6Ao0qXi12BxpZDowl/OB3WWKMhpCe9Q+3Q6kuI5M7k6kcsdj0CR8GWpa/fIqAdLaTAYOtFsoFIWHAhB09h/Zs3Rtxh1lHHig/AdxU3kuvqkK0zR24mXX4MDzs72naqps0S05K7KH9BazpJzZ7ulTqTBl4UTnR+0ZIaniHkh9LSeFCcE4N0YxPyAho= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(376002)(396003)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(7696005)(44832011)(26005)(81166007)(70586007)(8676002)(356005)(4326008)(8936002)(70206006)(36756003)(5660300002)(186003)(336012)(426003)(1076003)(47076005)(2616005)(41300700001)(82310400005)(82740400003)(478600001)(40460700003)(86362001)(316002)(6916009)(40480700001)(2906002)(36860700001)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6447 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 12058f83-bcc0-4932-4f96-08dac886e274 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 27JNFAAqjuKkCU5EVgXVsnhT0LFUtU3Q+/hq4YI4RT52ibOJn4K4e0aUWoAYwXWaTJ85/AKaaEZFNm8Fqemj7Of5nP46co8We+yHljAhDYefzhFJeqjjAJS+RVzXsPlNyzGFic568Tlf+tM5NDrE1uTjgM9aJoDq8taRRlvClV6fHCcQ2jbe6fyUPhh5J73n9rB9gmcBXOD4gAxXsYLIkXwhFPm+TC9nNgvNT6cfpKGK03WqNqvb3g6xtKl0yIhG4aypNwaPsfoOflCKBuapH41syFpY+okYjzjPJwTQunCikMSuCO757bqHeqG2DqnBBM/1MFEOt97EpE5iKyD70BV+1C/raK7U5TQsiLx8TEk7zel9dSe1Bn12YCrCIbqfrHmFiu6AhDDps+4WonQhLJe5JAyUve1HHAt9cwNe3I1PGS22EFvXVSXKmM4jmnwr6trhN2FAI/wxPUVpQ4te1pBGiEHvQyg5jkdlvbUOD7xxjTQnHa4WolW1LAVCBC6KO6+DFz75ev6x8r6I1hhX6V+ONJgj9i77jsNF0zJYn88PIUS7pImod90GQO6FrtF8t3iNhkTObTljidv9wWWBK3u7zuDzhFgpCXS7J9k46cXumulOwj3qQjPSASsmV0uSsbJfSohDcxOaPDuYumj9PHFKtm3I5pNdv4UAOpFvS0K1UlTt2g/pJiLKG8koZzv/mEYcYIK1SLZTimzt/0yiFw== 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:(13230022)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199015)(40470700004)(36840700001)(46966006)(70206006)(2906002)(8936002)(81166007)(36860700001)(82740400003)(36756003)(70586007)(44832011)(4326008)(40460700003)(8676002)(41300700001)(83380400001)(5660300002)(478600001)(40480700001)(7696005)(107886003)(26005)(186003)(426003)(1076003)(2616005)(86362001)(82310400005)(47076005)(316002)(336012)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2022 10:31:37.9048 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46ccf39b-0cbb-4be8-23fa-08dac886e896 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: AM7EUR03FT020.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8954 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Luis Machado via Gdb-patches From: Luis Machado Reply-To: Luis Machado Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" There were no comments in some instances (gdb/defs.h, gdb/core.c and gdb/linux-tdep.c), so address that by adding comments where those are missing. --- gdb/defs.h | 8 ++++++-- gdb/gcore.c | 12 ++++++++++-- gdb/linux-tdep.c | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index 0d9a39a59d0..f51ab9e5c0c 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -340,8 +340,12 @@ extern const char *pc_prefix (CORE_ADDR); /* * Process memory area starting at ADDR with length SIZE. Area is readable iff READ is non-zero, writable if WRITE is non-zero, executable if EXEC is non-zero. Area is possibly changed against - its original file based copy if MODIFIED is non-zero. DATA is - passed without changes from a caller. */ + its original file based copy if MODIFIED is non-zero. + + MEMORY_TAGGED is true if the memory region contains memory tags, false + otherwise. + + DATA is passed without changes from a caller. */ typedef int (*find_memory_region_ftype) (CORE_ADDR addr, unsigned long size, int read, int write, int exec, diff --git a/gdb/gcore.c b/gdb/gcore.c index ede78534bd8..672bdf78736 100644 --- a/gdb/gcore.c +++ b/gdb/gcore.c @@ -372,8 +372,12 @@ make_output_phdrs (bfd *obfd, asection *osec) bfd_record_phdr (obfd, p_type, 1, p_flags, 0, 0, 0, 0, 1, &osec); } -/* find_memory_region_ftype implementation. DATA is 'bfd *' for the core file - GDB is creating. */ +/* find_memory_region_ftype implementation. + + MEMORY_TAGGED is true if the memory region contains memory tags, false + otherwise. + + DATA is 'bfd *' for the core file GDB is creating. */ static int gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, @@ -462,6 +466,10 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size, int read, } /* gdbarch_find_memory_region callback for creating a memory tag section. + + MEMORY_TAGGED is true if the memory region contains memory tags, false + otherwise. + DATA is 'bfd *' for the core file GDB is creating. */ static int diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 0a2fced7804..c30d9fb13f8 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -1695,7 +1695,10 @@ struct linux_make_mappings_data static linux_find_memory_region_ftype linux_make_mappings_callback; /* A callback for linux_find_memory_regions_full that updates the - mappings data for linux_make_mappings_corefile_notes. */ + mappings data for linux_make_mappings_corefile_notes. + + MEMORY_TAGGED is true if the memory region contains memory tags, false + otherwise. */ static int linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size,