From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60064.outbound.protection.outlook.com [40.107.6.64]) by sourceware.org (Postfix) with ESMTPS id E5E2C3857C5D for ; Fri, 22 Jul 2022 14:47:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5E2C3857C5D ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=MctIm0mf3UeBrCYILT8kbvBrgYnxbv5ydsUoams+2QeEt0B8XNZRSDiSoNTn/JvoLhVJ9yTBfE7eU+7pj74H/UtZDbXHqMXmff09jD7NqQwpBwfxNEZyCL/37LfdrK+MsXRSP6fbTxsXLYkqBbBEplSq9G06GNXCkIQnYTI5pANwnkCvb4ELBbreZ3Njm2ufYF4BEusiqv8EdKBRDygc8e6avpJXOWNcHecEyJpU+MgD05qrNhRaEQGbtQuUCHXWQBRPffy7gJNk8b6wVM8Ua2cer1NtiF4vA+IRET7bpwk4NiXdh0XjCKJWtirPEM6tciMUDjjpOqIVuyT6/KvTOA== 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=OXfCBZSYcg2BceFdvFVg59wpfaElGwcj3EYOGDoztU0=; b=EBBhj39AR65NlvW5akpOsTFPAbokXkYfOVqKPFtv819NtwYUcyie6L4+Jk+cRLKCNtvnN5+W0t/ukytUd3xkvBzR6pdEQRyQnQLOdl5VrFsYfvyMcAjoQV7ZTjnNYwPSkVpsw71fC3Pq4o/wngPGlWyFzXCALVx7wlTlKGP6LNefv3kNfYAJK13j2etxUmprz8JbtD522mY7D0HPF/iEOLyMhS79KQUD8ddrbHLUKenEy2CWeyGSEm81489O4r5SmZE7AMVQJTkt5937kT078zDNmuVKQ30HdIllWUKZ89Ndhkhh17DpNs90r+Ia9VhB5OzCNZ78xMNDgFBa9oHWcw== 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]) Received: from DB3PR06CA0035.eurprd06.prod.outlook.com (2603:10a6:8:1::48) by HE1PR0801MB1737.eurprd08.prod.outlook.com (2603:10a6:3:81::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.20; Fri, 22 Jul 2022 14:47:14 +0000 Received: from DBAEUR03FT015.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::eb) by DB3PR06CA0035.outlook.office365.com (2603:10a6:8:1::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18 via Frontend Transport; Fri, 22 Jul 2022 14:47:14 +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 DBAEUR03FT015.mail.protection.outlook.com (100.127.142.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.17 via Frontend Transport; Fri, 22 Jul 2022 14:47:13 +0000 Received: ("Tessian outbound 63c09d5d38ac:v123"); Fri, 22 Jul 2022 14:47:13 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c487d0467aecfec1 X-CR-MTA-TID: 64aa7808 Received: from ac81615cf8ed.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BE3FF1DF-17C0-4F95-BAF2-22C1CAC6A87D.1; Fri, 22 Jul 2022 14:47:07 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ac81615cf8ed.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Jul 2022 14:47:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eLw6Nr6sw00FRIwR/F58gthEITtpFUPowr5jF3431owyqdhxtYU6Ose5EpM2fsVXl6UFRQ2Is1ZcIWBlIcfyYNWs+VfwunujBCUuBetnXolKZskweRxgR0aQn/um7kerkjBjGV/MUoBeJmit5ZPuC8ekWmLDB3+Iccp0zKjtU7PT0tCLSmgF3SV4vf/acjptFRL5eUdHbrNNqv25Y7jVyyMB/xgo2s83o9u8DwFk8nspBxgFMO4OIurK2e+uytWufXA8y8n5s9xUkFTdIIo2eBeSsRy4vLO27l3L9G3H0riR6oiPQq1TpbU02agwrjA6F1wyPkRLhQvvKH10sI46pA== 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=OXfCBZSYcg2BceFdvFVg59wpfaElGwcj3EYOGDoztU0=; b=gBEvyCVNz9BxlHIdG5lSOorpzBdVOzcOZcDwoI4HPkHI1j5lbzNjq0+koL1yH1TOgzQIVqpb0nDOWzWw8AbMLfwE/KCL428zA92GeERC4saOmhDW2u6ZhjBFtSikzJT095D1HCBEdkjdhsJKKplhBGYJ7AdiLzOZacoeT+oIA3dSpauZS6xuJD6iOfgF4+Kr9RSy6rgGYVuNgfFwPao4oxGUCAZ5zneO7mf4SWyDfHWKOw2TmVsNyfbSHRmM0bWH7Lwry5C4JrWUo4UKbVmWW+Xvx/LdyTrN8hV6+Jzco7+1YiU/pPW2NQSN7lOpDe0emSqOnk9BTk56S2quQKMPYA== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) by AM8PR08MB5619.eurprd08.prod.outlook.com (2603:10a6:20b:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Fri, 22 Jul 2022 14:47:05 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e866:af0e:2168:5ca7]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::e866:af0e:2168:5ca7%5]) with mapi id 15.20.5458.019; Fri, 22 Jul 2022 14:47:04 +0000 Message-ID: <22c54360-74e2-b4e3-27df-aef5cbfa559d@arm.com> Date: Fri, 22 Jul 2022 15:47:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] gdb/hurd: pass memory_tagged as false to find_memory_region_ftype Content-Language: en-US To: Enze Li , gdb-patches@sourceware.org Cc: enze.li@gmx.com, John Baldwin References: From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO6P123CA0049.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:310::9) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 8fa77204-4b2d-47a1-5e3e-08da6bf110c1 X-MS-TrafficTypeDiagnostic: AM8PR08MB5619:EE_|DBAEUR03FT015:EE_|HE1PR0801MB1737: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: 51wY+RZQr3O25m8HD9MDDhW9JucrQDaUEvj4dcCP85IXSq3K7rHJM8qlKTlUJoC+Ozqh0KLIijUNFpDnILCbea1Q1D/1xGKyoxaN7ub/jirxqWEdRLdAiDX6B+a1H5X9VAwGA2zmt329a9GQzSUeMoV/g8BszapTy7UaiJhFu2hBHdvjySdYNUT/GT3S6uGqkTNWokNnpM4jTXYV4D7gDTH8zUsf7Z5PL3eoaizVpnqab0ZHi6W8kfJsFJVSaJhKehQ3qz8sKWrtVO1WT485AhzislWdGPKX2CoeTzVhyF+xq8u+Tm+TVauLULVpGLqTikb4H0Auq2UtJHBZzB1MUQFlyOeXPx7GsXm9qChgtQjsE+2jHDKnde4AfbIGAaQ34gB5YCNXqas+L21ErZlNDgl+EP3+2nXxmp72hNdi2DonsRZ5TbcX4qzxWhxDH7fep+hsLe4r5cnWs1MoP/BVfHXUFj/7vnxORJPMjn3s+kX3H9CfQAZ70WWuQj3HdZYOV4AtILndRxxBcUc29ovqXfdnV6cT/fu2Oh7dpW6GZgrdhOPDp3+4hPr8Lq9cb8nNzVeWya779xoiI+qvy5sE30Z6yGBNFRVPOknrQ9YGJ//iKe024csSIzx/WhNxCQLDzNbctbggU23UhtmpP4So0ZyM7hMeiMnCslvTMQ5fgSw3pEMpMJYSrnCTzuqP8Lm0G8+kYBIidzNA4sizjL5EKV++E5yMF1AJ6DGcOThO8kr6nx6k9fhyuLb5At9zSskiTHIwY6/rjH/HNuZ39+KF+h/pycILowIDMvcmRxyRbD9Ttj4TrLIJT6P4t+eXQ+Sedd3krjkJEKKLnm7QQ8MhVK5qi82BvihML78bH/SpxTs= 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:(13230016)(4636009)(376002)(39860400002)(396003)(136003)(366004)(346002)(38100700002)(31696002)(31686004)(478600001)(6486002)(41300700001)(86362001)(6506007)(186003)(2616005)(26005)(6512007)(316002)(8936002)(5660300002)(53546011)(66946007)(36756003)(66556008)(4326008)(66476007)(8676002)(2906002)(44832011)(37363002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5619 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3b4a9900-37bf-4951-b180-08da6bf10b33 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tK0HxaCkulZz3zFVkAAQXgwLPOVZUvfP05eY+558xaP2RtfgCXa87u6jsJuD0J0DjLYcf42s07BsHGXlWBX49APJshwIZPy3F0cBuRwxE5QjLvw/QNEHzUDDP0VivqIkL38VIFPPCZY34eIPCrqhDKZsSgST6LDD+Nxv/Tb2vaAtPRL3e0nCKvIR9FWtWQJeIc3V7xO2/sgItBEjuEkxu0wd1YHBDSmD/3UR+SJaLU+bc0JUBPlMAq4Ee9mG446LzhDOYddI0CIOTVNnsr55IOzBxy+ZsH5bUs545QUmOt3Ayvp5sN7sjXSFRqm7hxfswYsBvmyZWvGts6Wtp3pp/F/VsW6ayovEOBHoF5B1dDMMpwZOIl0Ab64A6hy52kdHGASSaYXioEsEHNRdm+s3SwjTdsm069PfGms2fYnY7/JpTdCeDztoaqgrATCYZvSmCKvLYLfnXvciANNfeQnmX3NKSuWh82g2ZCpd6WMUTlpVga/ZO7YsvuPT2uAaeyjNksQj8EnHU1QUADm8icsUFzCtXkGCrVdeN73IlAL0ZYliZPPHvkqSQd3RMI+bt/4Y4Iyc7btyq+aVuBkZSJUypBUtQlqh9FKx//gBHESWLyKPO719B+6OgK6tbchEQHDNvHTTHCn3QeY6MrTvXHx//0vcymcKpTWqS00j4Ylt6DnvsTH04Qw3cOAVPodrDaTfyg40xVhAaeIJfa0+h87pj3W3+enGl/vOpf+UVp7Uf1J7yMBpHcw20JDmhdy1tTiboEsXmcDJq8wbRY3SZ6m/afllDdchJHzEg9zqFknbg9yjHPfM9qSmkVrKO/yZc4UpTu1CJwEubF0dnXKfNOKgaKXE8bPo/eLi3Pj2XAm7eHI= 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:(13230016)(4636009)(39860400002)(396003)(136003)(346002)(376002)(36840700001)(46966006)(40470700004)(41300700001)(31696002)(6506007)(107886003)(2616005)(86362001)(478600001)(186003)(70206006)(81166007)(53546011)(36860700001)(6512007)(336012)(47076005)(356005)(26005)(44832011)(8936002)(40480700001)(31686004)(36756003)(2906002)(8676002)(70586007)(82310400005)(40460700003)(5660300002)(316002)(4326008)(82740400003)(6486002)(37363002)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2022 14:47:13.8744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fa77204-4b2d-47a1-5e3e-08da6bf110c1 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: DBAEUR03FT015.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1737 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_DMARC_NONE, NICE_REPLY_A, 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-List-Received-Date: Fri, 22 Jul 2022 14:47:20 -0000 Hi, On 7/22/22 15:11, Enze Li via Gdb-patches wrote: > I tried building GDB on GNU/Hurd, and ran into this error: > > CXX gnu-nat.o > gnu-nat.c: In member function ‘virtual int gnu_nat_target::find_memory_regions(find_memory_region_ftype, void*)’: > gnu-nat.c:2620:21: error: too few arguments to function > 2620 | (*func) (last_region_address, > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ > 2621 | last_region_end - last_region_address, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2622 | last_protection & VM_PROT_READ, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2623 | last_protection & VM_PROT_WRITE, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2624 | last_protection & VM_PROT_EXECUTE, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2625 | 1, /* MODIFIED is unknown, pass it as true. */ > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2626 | data); > | ~~~~~ > gnu-nat.c:2635:13: error: too few arguments to function > 2635 | (*func) (last_region_address, last_region_end - last_region_address, > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2636 | last_protection & VM_PROT_READ, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2637 | last_protection & VM_PROT_WRITE, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2638 | last_protection & VM_PROT_EXECUTE, > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2639 | 1, /* MODIFIED is unknown, pass it as true. */ > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2640 | data); > | ~~~~~ > make[2]: *** [Makefile:1926: gnu-nat.o] Error 1 > > This is because in this commit: > > commit 68cffbbd4406b4efe1aa6e18460b1d7ca02549f1 > Date: Thu Mar 31 11:42:35 2022 +0100 > > [AArch64] MTE corefile support > > Added a new argument to find_memory_region_ftype, but did not pass it to > the function in gnu-nat.c. Fix this by passing memory_tagged as false. > > Tested by rebuilding on GNU/Hurd. > --- > gdb/gnu-nat.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c > index 72314824278..5dd4d148c76 100644 > --- a/gdb/gnu-nat.c > +++ b/gdb/gnu-nat.c > @@ -2623,6 +2623,7 @@ gnu_nat_target::find_memory_regions (find_memory_region_ftype func, > last_protection & VM_PROT_WRITE, > last_protection & VM_PROT_EXECUTE, > 1, /* MODIFIED is unknown, pass it as true. */ > + false, /* No memory tags in the object file. */ > data); > last_region_address = region_address; > last_region_end = region_address += region_length; > @@ -2637,6 +2638,7 @@ gnu_nat_target::find_memory_regions (find_memory_region_ftype func, > last_protection & VM_PROT_WRITE, > last_protection & VM_PROT_EXECUTE, > 1, /* MODIFIED is unknown, pass it as true. */ > + false, /* No memory tags in the object file. */ > data); > > return 0; Sorry for the breakage. I should have spotted those invocations. fbsd-nat.c and netbsd-nat.c will require similar fixes I suppose. It would be nice to use this opportunity to add hurd/fbsd/netbsd builders to the sourceware buildbot so these issues show up earlier, potentially before a commit.