From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2086.outbound.protection.outlook.com [40.107.6.86]) by sourceware.org (Postfix) with ESMTPS id 5708038582A1 for ; Thu, 12 Oct 2023 11:30:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5708038582A1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=eMTdCNiQkcAU+Bu1BZ6zEVo4px0W4sWOE6toqlOG1A4=; b=VElmtOqSsGBBIFNzb12/AuNi14AVyhNtZvjB6Xpk6ljyXMFtQ+hWNnlvkZHY7flNzGQx2uZuzpe9+xUmqEeCngQhGysXXYdaZE8+vH33bMKa7Wof4Iigv8izkXfHri/pLCXbfFBj6k/DT+X5ZF0H8ydusiLyHfXjDwXz5JzaRn4= Received: from DUZPR01CA0171.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b3::17) by AM8PR08MB5748.eurprd08.prod.outlook.com (2603:10a6:20b:1df::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Thu, 12 Oct 2023 11:30:41 +0000 Received: from DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b3:cafe::2d) by DUZPR01CA0171.outlook.office365.com (2603:10a6:10:4b3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.30 via Frontend Transport; Thu, 12 Oct 2023 11:30:41 +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 DBAEUR03FT007.mail.protection.outlook.com (100.127.142.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.31 via Frontend Transport; Thu, 12 Oct 2023 11:30:41 +0000 Received: ("Tessian outbound ee9c7f88acf7:v211"); Thu, 12 Oct 2023 11:30:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 49815eeba670a5d6 X-CR-MTA-TID: 64aa7808 Received: from 354df5299807.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C46293E6-F97C-43EA-A564-38D0E142E463.1; Thu, 12 Oct 2023 11:30:35 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 354df5299807.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 12 Oct 2023 11:30:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7mqUSHo3R58qxHCzhoeQVW6OnFh5G5ikqvLKkaWnw1uhPE8eGmKNndGlfo39ZvV2jyYpiOVdlHiA0jT8bLsfafmXpVpClVg4Ov8HS41J3AeQ6oU8hFHDLp3TlAaNKsR9AMNcOn27DYn7y8RkypRUgCTzS4XmMw6cd5GVEGrkW3bnMoJKO/uzUEaZR5WRQm3YGQ26lqdA/1unOWwQLuTSYgXFkcaiibOYNpiVE4lcXyOWORbbfY6VYDdjylCNqw4r8OAPFT4tnJGmDHt0Ibb5cI/5IFU5rn6lW6INjsiZrTPbBTZtUrDIKa5738/bglX2aVMoCRI7ia5BkpIh3YbVw== 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=eMTdCNiQkcAU+Bu1BZ6zEVo4px0W4sWOE6toqlOG1A4=; b=AqOMjqdxkfa0/TLOmo+v7ip6DZkeBMYthQ158PRJT9GR3z8FuW9a7S2m+A/dSanXNx8Ywj+4Nj846inzmW4sTYBcFFYEDs3JVRg0cDvjpbcHSqDxe7e58Lb6aeOk5qC1346qtFLHHG+66xQz0k8grHrpjm16Kud7wZyzpucNr/4FFNHG4WE7SkGkrDMv45/cGqGagrVHWuckngsL07AJMGcXY/zpRltmz5hvuep5TN7gtw0gXnWKjVVci6bsPD0x4X513qpqzkBwDFRJ4FL7B6QqWr1m/+l64Oy7Chvs1009pjKoE5ZgAIataP6fiR/45g7lzuNRD+U/e2xa/U2wQg== 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=eMTdCNiQkcAU+Bu1BZ6zEVo4px0W4sWOE6toqlOG1A4=; b=VElmtOqSsGBBIFNzb12/AuNi14AVyhNtZvjB6Xpk6ljyXMFtQ+hWNnlvkZHY7flNzGQx2uZuzpe9+xUmqEeCngQhGysXXYdaZE8+vH33bMKa7Wof4Iigv8izkXfHri/pLCXbfFBj6k/DT+X5ZF0H8ydusiLyHfXjDwXz5JzaRn4= 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 AS8PR08MB6438.eurprd08.prod.outlook.com (2603:10a6:20b:33e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Thu, 12 Oct 2023 11:30:30 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::c126:1009:20a5:195]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::c126:1009:20a5:195%4]) with mapi id 15.20.6863.032; Thu, 12 Oct 2023 11:30:28 +0000 Message-ID: <29fefb89-9934-4e9d-9ea0-adf40789e921@arm.com> Date: Thu, 12 Oct 2023 12:30:26 +0100 User-Agent: Mozilla Thunderbird Subject: Re: Thread Specific Architectures And Python Unwinder API Content-Language: en-US From: Luis Machado To: Andrew Burgess Cc: gdb@sourceware.org References: <87bkd5czqr.fsf@redhat.com> <05568109-8df9-4a48-af04-9f784bf0e4d8@arm.com> In-Reply-To: <05568109-8df9-4a48-af04-9f784bf0e4d8@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0006.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::20) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|AS8PR08MB6438:EE_|DBAEUR03FT007:EE_|AM8PR08MB5748:EE_ X-MS-Office365-Filtering-Correlation-Id: cd27f3d0-619d-40b7-a559-08dbcb16aa5b 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: sZlqGhp2AWDJh971rFdxQUZQiOY8qlFVjuBjGudkF4NLzN8NMnTLa/k4lImzSoC+iAZwC+ISZldlHjGTenkvXgDp6GYbZTkwt2K18gcki7jNX/K57jPoRxSXxyN5yg3POWSkItJ2KU1m+B2UqSy6Ek4vRIBJEuZZrbFgdUBdxBsTsmurm3IVA8rkK8VC7G7gyTNT9TxK2gsNIZ4ntHIUbtC/URUFy1vrbzgVwsggmNHujkVaP4kUaUVSaGZsvGIzaOPCahAbXPQA1CNFVEIY0ftKF6Jx9IWfmPEgofQ/cXO4nyPkOATnuhatEssQMgrlUZaHQT413J7wHGD1FwR7b1/FgK9mI2UXShQqpugngNC0cOudXw3RVzS97XN6PFIDgBHNqrJeQLZcY4TL1aK/jdNhKBFLV/u6LJvDNiWsN+TFVOxE3tYjSDqrU9j5Vg/mILnLoxPHSW4VkWnESZrIl48WG985TiTW9IQjUyPnR4VD/q9dbQqZBKP1m3f3PKM2SMTOJr77egYZ6d1rmRci/P+tvwAQWEKWem1SQks6kS7Yru/AORXScE0Cnk6HXjG9cCFuHvjk9vArwmAku1vnhMyyUqImDHig4cwdd2GXXDjk/BMqHjRrnBwpfD6FB7pWMBK7s0ByqK9QcLy4+GU8bA== 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)(136003)(376002)(366004)(396003)(39860400002)(346002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(6506007)(53546011)(83380400001)(31686004)(26005)(38100700002)(6512007)(2906002)(31696002)(5660300002)(44832011)(6486002)(86362001)(8676002)(4326008)(8936002)(316002)(6916009)(66556008)(66946007)(41300700001)(36756003)(66476007)(2616005)(478600001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6438 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: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 19d02b09-0756-4634-1c15-08dbcb16a275 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fv7yq/V9TviYJl/k2u37XWR/5oExmHOJKARXGIwUPTV6gzojCgNZgPot+l7Abn/NCu4Gt7su7A/ZH7WTFurQKRhX6sOHvKr4f1n6XbM10ShZJ8DsylQgGYvYFU2BakqVS/ZX8wnUpJ8EFOVB3MldzG6+InN5ZAhraKGjc+eCU+HA7ud5NDuiukxA+KbWTAmKanJ/436arJk3n2DThmwq9xSscpTYQZvWI5v2CFCt4MNEU12kGmkbutyglM0TGFpKyZTBX/gu2ai20xXH4JfMsjUL1r/ApwDLAilyO//MTbq7VLG6AwWq56V0jKgATNydKGSX54pcQeT0494uhYLPg4u4YB2hCpRPd7jK+2rxGiYmA24U9keLPP9k5O4qES9nfUW+XbDgOrbodLGjq6h2pHvxXiLGxYEm7xREX+xU1s5FamRLuzpMJkMLipGoWCZjvt1FVhEpB1JiTrYRncMv4PJ96J5RNW/dODCFQczPGh7zn/YLhuuO3P8+iy1iTj/loKSnUxPtRTmmusWC6QsmCvTroA67qRRsgwZJbbFotw9chuJ1nOWo2lPy/AoHTkFvCJB/VbScyidLMmqxrvQKRItBS97NO3l/0erGgjbTpZLFHlWkX6OyHNnYPGj6jVvvXiDwvKTRmJxTxScSvKKN9kAkmRX3gCq/EO7j5sjE3niuQMn2esie+bJ/ZEYkGQOe+D+na+G/E7dOz1Q3mNuSMU12JfW9DroyjuGoYrij80CqMne40Ba01V3/H4sT1ggta/bxBunLsm7DcB8bAqViEA== 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)(4636009)(376002)(39860400002)(136003)(396003)(346002)(230922051799003)(1800799009)(82310400011)(451199024)(186009)(64100799003)(36840700001)(40470700004)(46966006)(31696002)(2906002)(6486002)(40460700003)(478600001)(41300700001)(4326008)(6862004)(8676002)(8936002)(5660300002)(40480700001)(44832011)(36756003)(70206006)(70586007)(316002)(83380400001)(47076005)(26005)(82740400003)(6506007)(336012)(31686004)(36860700001)(6512007)(2616005)(81166007)(53546011)(86362001)(356005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 11:30:41.0909 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd27f3d0-619d-40b7-a559-08dbcb16aa5b 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: DBAEUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5748 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 10/11/23 11:06, Luis Machado wrote: > Hi Andrew, > > On 10/11/23 09:47, Andrew Burgess wrote: >> >> Hi Luis, >> >> While working on something else I was looking at the Python Unwinder API >> code, and I suspect that the thread-specific architectures support might >> (currently) break the Python Unwinder support. >> >> If it is, then I think the fix is pretty simple, but before I posted it, >> I wondered if you could confirm that things are indeed, currently >> broken. >> >> Attached at the end of this email is a Python unwinder. You'll need to >> supply your own test program that makes use of sve/sme, and thus uses >> thread-specific architectures. >> >> What you'll need to do is: >> >> $ gdb -q test_file_that_uses_sve_sme >> Reading symbols from .... etc ... >> (gdb) source ./unwinder.py >> (gdb) break function_where_a_thread_specific_arch_will_be_in_use >> Breakpoint 1 at ... etc ... >> (gdb) run >> Starting program: ... etc ... >> >> Now at this point, when you stop, you should see at least one instance >> of the banner: >> >> *********************************** >> * Have executed the test unwinder * >> *********************************** >> >> being printed, probably more. As you step though the function you >> should see more instances of the banner being printed. >> >> To reveal the bug then it is important that when GDB stops in >> function_where_a_thread_specific_arch_will_be_in_use, the per-thread >> gdbarch that it creates _must_ be different from the inferior wide, >> top-level gdbarch. >> >> If you don't see the banner then my suspicion is correct, and the Python >> Unwinder API was broken when the thread-specific architecture support >> was added. I've confirmed I don't see the banner. So this seems to be broken. Is the fix to set the python unwinder hook elsewhere? Or maybe save that information when we're trying to pick a different gdbarch?