From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MJRQGJXgtmMJ8A8AWB0awg (envelope-from ) for ; Thu, 05 Jan 2023 09:37:09 -0500 Received: by simark.ca (Postfix, from userid 112) id 5F9CA1E222; Thu, 5 Jan 2023 09:37:09 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=HtFuavfC; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RDNS_DYNAMIC,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E67CB1E112 for ; Thu, 5 Jan 2023 09:37:08 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6EFCE3858C39 for ; Thu, 5 Jan 2023 14:37:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6EFCE3858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672929428; bh=G5tFFyAZ0HwGhLPxy4v/LPDc7yoGlxgFqRV+rYnty0Q=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HtFuavfC4zO+xaNzh1vC5RzaPV5FOLGi5Q16mixZp8PkyhT3Hlr5I03dcYtbDqMiG YRVpUNp7nI+N2WAmDzQvY16/7O4JluO1Etp/T+qqYKXO74IzHjFiR0AkqRqcg2vhXe Oz8RAIhpxiA28sk3zDT+85AvL5RVGEsAHfGC/A0E= Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) by sourceware.org (Postfix) with ESMTPS id 847823858D28 for ; Thu, 5 Jan 2023 14:36:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 847823858D28 Received: from AM6PR08CA0003.eurprd08.prod.outlook.com (2603:10a6:20b:b2::15) by GV1PR08MB9938.eurprd08.prod.outlook.com (2603:10a6:150:87::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.9; Thu, 5 Jan 2023 14:36:36 +0000 Received: from VI1EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::48) by AM6PR08CA0003.outlook.office365.com (2603:10a6:20b:b2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.14 via Frontend Transport; Thu, 5 Jan 2023 14:36:35 +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 VI1EUR03FT030.mail.protection.outlook.com (100.127.144.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.17 via Frontend Transport; Thu, 5 Jan 2023 14:36:34 +0000 Received: ("Tessian outbound 3ad958cd7492:v132"); Thu, 05 Jan 2023 14:36:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 295330df6545314f X-CR-MTA-TID: 64aa7808 Received: from 2831c7529177.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 505C40DA-1D9B-49FE-9A29-0F2E47139EFE.1; Thu, 05 Jan 2023 14:36:27 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2831c7529177.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Jan 2023 14:36:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mp3BOpvNbb/tG0Y0AVyDlsXdUbeMa97zjyc3sSwb1vgNZ36g6zn39TL+PssAuSwKgNzpb24Dg8MvtY6/lyLtLOAafHE7IlqOq5NcFTSeIJJchLiyB2GecRjvBQ1A4ckD4oZeb2RPAAxyfy0xBRzz9KkGD/Octxo7gcHtRE+Ov+zCoiK+04VgWDTfuXXScf0Tbt6DOlQEtBDI4JGJIjDHXXPAsXtdKy5idnglB67yjYtq0vDw7N9jTlg3PWSH2dY4W4s5E9aatpfUCw3fGq0NxH83ib+JCItZg7ncwOPeTaCmigKHtAJR00U69yugNFtA9kQcLnErBnBxmCRiB83DBA== 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=G5tFFyAZ0HwGhLPxy4v/LPDc7yoGlxgFqRV+rYnty0Q=; b=LIDZOKrpYZD6L8aGCkI35g9fi1vl84S0JK/p/ZfmpqBktFferp0nJfcuEqKotrm11xr31WzNHJT9Kn/Hyg3Co/9rXf4tUYQr/SW6p6WbyJPhxAfWW8XQns/kACyUE+tnkRl4iIGCeSO1hUvt+yoxXdX1vCsRJ5qebDU0n4SdYf5RRwz/RRryurK5Oo2EAqLEC+SmDwD9qfFCde+0FfJQxBYkpjUTCAU4BLtMhODr/q6KSShUA/f8respBNDmeNEZai9LuJ2k5E7BdgGYyhl/EUqKqSWPnCrpAhmVxzit+vuHz2P/U0jjX2JpX4EphpIg5DASKD7UfvX9dFv4o63VRQ== 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 PAVPR08MB9794.eurprd08.prod.outlook.com (2603:10a6:102:31e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.9; Thu, 5 Jan 2023 14:36:23 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::eed7:25a3:e4ea:187a%6]) with mapi id 15.20.5986.007; Thu, 5 Jan 2023 14:36:23 +0000 Message-ID: Date: Thu, 5 Jan 2023 14:36:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: AArch64 and fixed return address register (x30) Content-Language: en-US To: Sylwester Garncarek , gdb@sourceware.org References: <130c9bae-22d9-2d74-45ec-4e4b7ee59c00@gmail.com> In-Reply-To: <130c9bae-22d9-2d74-45ec-4e4b7ee59c00@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0173.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18a::16) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|PAVPR08MB9794:EE_|VI1EUR03FT030:EE_|GV1PR08MB9938:EE_ X-MS-Office365-Filtering-Correlation-Id: 20f07011-4deb-468e-d304-08daef2a3efe 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: Vf3pu9/3kqxBbSiZyr1ERLtaNx4qJCbzZ0Wc9MQBds5xoB5jw+OdTnoqlY0/VWGDWpyDnldclhHF6NPe8utUzYsNioWflqydSjUgLuMH7eCqTnzg6Ful8cXnrDHX4Yslr88o3NcNvXiO8kzIwancgL+JZdxoYhch/JFYArqqQwCTe101Uj1XIlLvGUcl4GeyBa3kEfq2/0T5WLln2pWrS0jt+i9smUzFfhM1p4DbMXIZKVwI+cjybYwv0Id9RDik7kPNrNR55cs6XHr11WuA3cmtlUBp/MoPXH4eWtzNPPhKUTLpAoNChPalScsLf5iIW+QurxyCftGnun74UD9CbZAoJROEq57ORrFMkzumIscsxawya7iIQwHu3KrLj/NfnTAkzqh5SphBTl69+8J+qFwCuclpyBmDxD+4MKq9ssCDAVg8Vo4khc/DkVu/b9EXFfOzzoenwvaj/haLdBb4UKQUOlHrV9yXFfwltsKw9x5ogO2df6wqFbKcHEwFQOiPxHSVnE+rsxAFXWT7VkC3vf0vE9scEPIoFHjEiJpRyIrTZNeH65wtfXQ7X81c8zg0B5XTada2wlTToTqCZUKfpS19btydkBxyDr5sBcyrlE5bdsC4c+u0gx1MsNpmcY3mn78fGGYrO8hJFpfRAFqDI2qNgNhYB0/8nVu/YLp9aF3R5jkhtzBteFcrQdK2oSa0ZyJumYiGq4sLPoOFvLXw6IYqNXlSYqzLc3Zn6XVBSUjd1OQRCKme7WyLcocjUwZTe8GoX5cbv1/6n8KyvbTNqQ== 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:(13230022)(4636009)(39860400002)(366004)(396003)(136003)(376002)(346002)(451199015)(36756003)(31686004)(38100700002)(86362001)(83380400001)(6506007)(53546011)(8936002)(186003)(26005)(41300700001)(8676002)(66946007)(31696002)(66476007)(66556008)(6486002)(2616005)(5660300002)(966005)(6512007)(316002)(478600001)(44832011)(2906002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9794 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: VI1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3f49639e-2b40-42d2-851a-08daef2a379f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SD88DVS5YBMVwDd5+FlSoie1w6S98kKtWkmoWxfongkT/61O3+bCq5qpTXVJGC9hboG0lH0AY+aPxl6PnT9SPVwJOHmBTtobccTujvpTQ1ZtWrcXZjLoEBUkdxCX+7p0tyGc5xKyLSGqIdiXPsKKSRxK+L7WoV3fCYWzI7bp01o3APgNzhiBVhzwPsCwNp2qIeHF5NF8Drg5koZtu/Pxf6O/GbvhXJZIyFIr+OpuzOGwAkistRBsrGUfJQK9S1Kyi/6TJlgbEzcPnExM6/GOX7lBZgHh3twv4EaY4uSz//AAh+pckfHJgbmCnBvinJDudPu0V1vA60STMVduQGe/46CV/FRjEOf/JiCvxxBumysl6CdACTqFLkpT1YfCOlBoH7EqeOypEXr6zQANFNQnLSKbpf8xbNTKqGRZ4Iijg3w/EePepoede6mRAFkf9hCqMGoqP4hBH5U4CsjviSqsT+lNo+iaMxIsodopu/5H2Mg3Cgt6XxEmyq/zFulxdgMjtb8+XcPBrSYYCYdLQ/rnr9dgnbCeZiJMdhmzWWV7JQocSDdXuWtijC/pjao7Xt+kQLuTwHNdW8bYA18ZkrD/lVvrc4nhWszOY42Smmp7q1eioUwPS+c5WenxXZM9w5NIgZbuqq3fQIz5xYt56+a7Aoo7glllXxYpURMxZ6tfhPqYP3Q6sDfkLRyE4p9JS4P1D52StWH3pCLBBD/St7bFxePi2BzD3MWa2BxXPja+52+MlIvJPGfSL7STcqAaoj6CCelUz1yGD+eueT94gpuC4Q== 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)(39860400002)(346002)(396003)(376002)(136003)(451199015)(46966006)(36840700001)(40470700004)(81166007)(82740400003)(36860700001)(41300700001)(356005)(6506007)(70586007)(31696002)(8676002)(70206006)(40480700001)(2906002)(316002)(2616005)(44832011)(336012)(5660300002)(8936002)(83380400001)(82310400005)(47076005)(53546011)(966005)(26005)(186003)(40460700003)(86362001)(6486002)(478600001)(6512007)(31686004)(36756003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2023 14:36:34.9805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 20f07011-4deb-468e-d304-08daef2a3efe 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: VI1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9938 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb Reply-To: Luis Machado Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Hi, On 1/3/23 00:50, Sylwester Garncarek via Gdb wrote: > Hi All, > > I've been working on adding CFI directives to assembler sources (GNU Asm) of an RTOS and I noticed that GDB seems to ignore .cfi_return_column directive. I checked GDB sources and indeed for AArch64 architecture the return address is fixed to x30 register. Normally this is not a problem, but for exception/interrupt the return address is in ELR_mode register. Because GDB is fixed to x30, there is no way to get a valid call stack. Are there any plans to make the return address register adjustable according to the info provided in DWARF data? It used to be the case that gdb only restored the PC from x30. A recent (ish) patch (1fe8486103e482bcd6cd74fdbf79a7d2ab9b111f) adjusted gdb so the PC can be explicitly set. You can check how the test does it, and replicate the CFI (gdb.arch/aarch64-unwind-pc.S). From what I recall, gdb was taught about the existence of a formal PC column, which is documented in the aadwarf64 spec [1]. Hopefully that will be useful for your use case. [1] https://github.com/ARM-software/abi-aa/blob/2022Q1/aadwarf64/aadwarf64.rst#dwarf-register-names > > Thanks, > Sylwester