From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2072.outbound.protection.outlook.com [40.107.20.72]) by sourceware.org (Postfix) with ESMTPS id 9F2DE3858CD1 for ; Mon, 9 Oct 2023 12:18:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F2DE3858CD1 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=GfR+Zb/QQbJnpcFx3Qg4c24Dqc69kZptVjyvSeJSuQ0=; b=xnCHs5sq20g2+XOFStpR4a9ZNKH7wgLemkWlKuJZpBstyPIUYsTboJzW2O2ym1sa3/3HL0BNkpfJzKrxj30PxotIG1wVGzeG/CPAuhuWMn2aI8DyTZLnIOMrDXGRVL9mILqsWH10n+oAR8p0FTUsEYelMJFjNg8Hsc+IJ7qEFCA= Received: from DUZPR01CA0061.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c2::19) by AS2PR08MB9986.eurprd08.prod.outlook.com (2603:10a6:20b:649::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Mon, 9 Oct 2023 12:18:46 +0000 Received: from DBAEUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3c2:cafe::6f) by DUZPR01CA0061.outlook.office365.com (2603:10a6:10:3c2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.35 via Frontend Transport; Mon, 9 Oct 2023 12:18:46 +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 DBAEUR03FT027.mail.protection.outlook.com (100.127.142.237) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.20 via Frontend Transport; Mon, 9 Oct 2023 12:18:45 +0000 Received: ("Tessian outbound 6d14f3380669:v211"); Mon, 09 Oct 2023 12:18:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a0127b207f584d9f X-CR-MTA-TID: 64aa7808 Received: from b90fa9e31e84.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 656634B9-A3AA-4EB1-A9DE-49DA3571EF0C.1; Mon, 09 Oct 2023 12:18:39 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b90fa9e31e84.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 09 Oct 2023 12:18:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d/XHEf42gnVszVzfb19bBsrLQ/9Hfi5PTXY9CApeiS6jyvdNWNP0rLB0Zh/JAu7K05XUILdDKxP3Y6Sx19XU9FJhvumDJuJPtCSW2iLBoaUdUzFIEr6pjuWhHWP7D2/aJxUgvMjWtb2Ug2VfA1e53lEFpS0YJsXciornlSH5p3QfMqRGwyOCBWfz76DqKT1xlMkKoCXCgXRQBnSiPXsD/ZDCx1QL8kgc3praAOSfrCSURWph08K2JYmgIXzx1/NTpdE67iA68XS7W+fKvjtcJWZohDhxqEqlSQEcvyKZlujMVg+b9SAptApc5gd4rBrk8SoPDzhtYlY+gYb2QPcgSQ== 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=GfR+Zb/QQbJnpcFx3Qg4c24Dqc69kZptVjyvSeJSuQ0=; b=QPF3ebF3iWkDXUNnJUNilVtEppoYULCQRJtD/DMjdGrji5XIbSVoy28LTIyr2kx0925w9cC7x6/oRjaom8OWUbQqdeAogRSdqeY2W+hdOtelPh2PB0Cc3HRgvQGK+5hZUpZHQQY/w4abAfhOn+kUKiow3QqI7lY80eHKN24em5dAcgsoUTF8IaaOqmIWn2+Tjg6UPWugusMl6Krz+VfVmVp6n68zr7v/aa6W0na+n7hUKtacqazJDgyURObt0pgd2ijB82aOzlUDSmc+dkI2U1Qhx4X+wAEkkj70FzlXN3AHgn8gyWOcordEcJ7cyidFusXKw124c4ECHzmx2rBg4Q== 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=GfR+Zb/QQbJnpcFx3Qg4c24Dqc69kZptVjyvSeJSuQ0=; b=xnCHs5sq20g2+XOFStpR4a9ZNKH7wgLemkWlKuJZpBstyPIUYsTboJzW2O2ym1sa3/3HL0BNkpfJzKrxj30PxotIG1wVGzeG/CPAuhuWMn2aI8DyTZLnIOMrDXGRVL9mILqsWH10n+oAR8p0FTUsEYelMJFjNg8Hsc+IJ7qEFCA= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3911.eurprd08.prod.outlook.com (2603:10a6:20b:80::27) by AS2PR08MB9045.eurprd08.prod.outlook.com (2603:10a6:20b:5fd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.35; Mon, 9 Oct 2023 12:18:36 +0000 Received: from AM6PR08MB3911.eurprd08.prod.outlook.com ([fe80::146d:342:e715:2475]) by AM6PR08MB3911.eurprd08.prod.outlook.com ([fe80::146d:342:e715:2475%7]) with mapi id 15.20.6838.040; Mon, 9 Oct 2023 12:18:36 +0000 Message-ID: Date: Mon, 9 Oct 2023 13:18:31 +0100 User-Agent: Mozilla Thunderbird Subject: Re: warning: Target-supplied registers are not supported by the current architecture Content-Language: en-US To: William Tambe Cc: "Aktemur, Tankut Baris" , "gdb@sourceware.org" References: From: Luis Machado In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0414.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a0::18) To AM6PR08MB3911.eurprd08.prod.outlook.com (2603:10a6:20b:80::27) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM6PR08MB3911:EE_|AS2PR08MB9045:EE_|DBAEUR03FT027:EE_|AS2PR08MB9986:EE_ X-MS-Office365-Filtering-Correlation-Id: 83f43188-ebc0-4766-5f9d-08dbc8c1e295 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: oA//E4k6m92V83zdDsEE5VClK5xQ+FLcclNPL3gjUt6hRAqHPtFYvPBMgKDhsth1Vl3UjsDy5F2KmCTpd1mgVAMptWMdnwju2a27BRoKxIlJxhyccR5Lea4bVUKODUXUEM80cupf9sdcR+++KWz4YLcR8THfbezyPnTjl0rSWwnJjErpIMeYsQALzAr4EH2nTm+GmN/GvFHRmO1dz2sdgDIKqxxxHEs45U1gAi6hg8cA2FsQDbgGAf8PEC9eai9szY/DB2bBYoKs3lTloO+vJrxA6qCHeu45EQ6uXmPZdMZA8NBt5nm8y9HdKymdFnWgnhg6qfTwxKBLxkfLKTB9CqJyCuZf3/hvCEYPNANYsx7vgife2QxSQiH7nkzA+9C8Y4GMrViHSpd94AqHBTsq/Ak2yP6Z+P4hPbBns/D7/oXH+iifKhXUFn/AHkHvkTD90wv1Jpm9zLf+7zz9vzOYAP/Gq6mEScw0cbgszV2Wf9n/TwlKkoQzP6dtptIhdkc9/Z4HAMVfTAdfPGJuGoNVwqrAwXbtT0RPRMfUaVW40W0s8HtUkJ6rPQL95thCPPQ/MmNlBcQVuW272w0ZnwiZyW017gwwvnUs2PZzuh4NAuTj60rn7f6SuQy3r8mW8lNAI75agHdx4UHfCbtm3EZD6OryNlsM4H56spR7+Nvn9ek/EliNfj5PotNts+8OzjkB X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR08MB3911.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(39860400002)(396003)(346002)(366004)(230922051799003)(64100799003)(1800799009)(186009)(451199024)(38100700002)(966005)(6666004)(478600001)(21490400003)(31686004)(83380400001)(26005)(86362001)(6512007)(6486002)(6506007)(53546011)(8936002)(2906002)(5660300002)(44832011)(4326008)(31696002)(8676002)(36756003)(66556008)(41300700001)(66946007)(66476007)(6916009)(54906003)(316002)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9045 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: DBAEUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5ac80020-25e6-4735-afa1-08dbc8c1dcfc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dNp8mY/E7IYCTW1d/79Y0gi5031eBhMGnk2+NLXGodjJpafd+veg5/mvjWWLvYj8AyGdNEEWLsFUaEad+Coro6cB8TjW7TeXTbLz/l218SmYgJ4uJUohbWH08heOqEzkqbZKUC3xknRo09qgVdwx5nPbrQTaBT0Xnqu80Ya+foy2eoQ0xitrOn04s5Oym3uBSHEe9V1kooU/YUV1vCzDyrwXL1Sp/9NqIoVUMTqf7LNUP95xouL+IwoNE6UNeDX8ecGBiQEuMAO7waTvAxk/rlfY44xROYQaSWhJZx5aEdEQYyC3+uZCk3V5mHKbSBcEwMHZTveJ1hv08oDaU3wAtpVL7sPcmcJpFuoM1M8xGcrK9cXzeHvEeCS9cXtjtUG2GGmIQu6ZJ/19Lfm1Q9RTQ/ysDcSt3a9j1ub3HtL5UsTQnFxoH9vxcsbeO8YxmP9hVGu7e9Wg9iFQSMlx6WTj89CYujNV7h3RN4p9gyOFTCZoqbCR8ERjEN63uem+zY3EISsVSVtZy/2/bnqp7Tkd/LtZC7aaBB1dFgagMsBnZ1wdAGBu6iHnhO+rLaUs/0DcSfs0CiCLP3sh8J1qgJsoIuuGCHJR/10jbOi4dhmXxBPkvk1xsCLK7hkAWWiiUgmdGR3KsrxGCciZC7jfNheeHh1U0R3yP9+jb5IJVOQkPSL5J1tbmwWIXoMud1n9YITGWHHxDfkbQXd3uc7E/7yZ9R4Aej2cXPWebacrhk23Dq6zbDUNawTATCOz6byWlWbgO9GHTUydg+Gv23A9C8IU3I+j0ghrFyg/RCCmOMS4Urc= 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)(39850400004)(136003)(346002)(396003)(376002)(230922051799003)(64100799003)(1800799009)(186009)(82310400011)(451199024)(46966006)(36840700001)(40470700004)(40460700003)(31686004)(40480700001)(53546011)(6666004)(6506007)(6512007)(6486002)(966005)(478600001)(36860700001)(86362001)(31696002)(82740400003)(36756003)(81166007)(356005)(2906002)(47076005)(83380400001)(21490400003)(336012)(26005)(2616005)(70206006)(70586007)(54906003)(316002)(5660300002)(8676002)(41300700001)(8936002)(6862004)(44832011)(4326008)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 12:18:45.8428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83f43188-ebc0-4766-5f9d-08dbc8c1e295 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: DBAEUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9986 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/9/23 13:09, William Tambe wrote: > On Mon, Oct 9, 2023 at 6:23 AM Luis Machado wrote: >> >> On 10/9/23 11:46, William Tambe via Gdb wrote: >>> On Mon, Oct 9, 2023 at 1:45 AM Aktemur, Tankut Baris >>> wrote: >>>> >>>> On Monday, October 9, 2023 1:14 AM, William Tambe wrote: >>>>> I am working on gdbserver support. >>>>> >>>>> I am able to remotely execute the executable and set breakpoints, >>>>> however right after issuing the `target remote` command, I am getting >>>>> following warning: >>>>> >>>>> (gdb) target remote 192.168.1.164:2000 >>>>> Remote debugging using 192.168.1.164:2000 >>>>> warning: Target-supplied registers are not supported by the current architecture >>>>> >>>>> Error message is coming from gdb/target-descriptions.c at line 576, >>>>> due to data->arch_regs.empty () return true. >>>>> >>>>> Any idea what I might have missed causing data->arch_regs.empty () to >>>>> return true ? >>>> >>>> When gdbserver is started with the --remote-debug flag, it prints the >>>> received and sent RSP packages. There, the target description XML would >>>> be seen. I'd suggest starting with inspecting if the contents of that XML >>>> look right. >>> >>> Below snippet of the prints when using --remote-debug shows the target >>> description XML. >>> I see a star in front of blocks; any idea whether >>> that could be the issue ? >>> In the source code, I am not using an actual XML file, instead, I am >>> manually building the target description XML through calls to >>> tdesc_create_reg: >>> https://github.com/fontamsoc/binutils-gdb/blob/main/gdbserver/linux-pu32-low.cc#L63 >>> >>> [remote] getpkt: getpkt ("qXfer:features:read:target.xml:0,1000"); >>> [no ack sent] >>> [remote] putpkt_binary_1: putpkt ("$l >>> >>> >>> pu32 >>> GNU/Linux >>> >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> * >>> >>> >>> #ae"); [noack mode] >>> [remote] getpkt: getpkt ("qXfer:auxv:read::0,1000"); [no ack sent] >>> >>> >>> Any ideas on what I am doing wrong ? >> >> What architecture is this out of curiosity? Are you enabling a new architecture called pu32? > > Correct, I am enabling a new architecture called pu32; more detail at > https://github.com/fontamsoc . > >> Is gdb patched to recognize the org.gnu.gdb.pu32.core feature and add those registers through tdesc_find_feature/tdesc_numbered_register etc? This is usually part of _gdbarch_init. See, for instance, aarch64_gdbarch_init. If gdb doesn't try to acknowledge any of the registers/features gdbserver is sending back, arch_regs will likely be empty (IIRC). Or we may have registers, but they will all be registers gdb doesn't really care about (like system registers), as opposed to required registers that gdb needs to be aware of.