From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30078.outbound.protection.outlook.com [40.107.3.78]) by sourceware.org (Postfix) with ESMTPS id 7F8BC385E83E for ; Mon, 14 Mar 2022 13:41:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F8BC385E83E Received: from AM7PR02CA0008.eurprd02.prod.outlook.com (2603:10a6:20b:100::18) by DB6PR0801MB1848.eurprd08.prod.outlook.com (2603:10a6:4:38::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.26; Mon, 14 Mar 2022 13:41:23 +0000 Received: from AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::d4) by AM7PR02CA0008.outlook.office365.com (2603:10a6:20b:100::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.28 via Frontend Transport; Mon, 14 Mar 2022 13:41:23 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT039.mail.protection.outlook.com (10.152.17.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22 via Frontend Transport; Mon, 14 Mar 2022 13:41:23 +0000 Received: ("Tessian outbound 63bb5eb69ee8:v113"); Mon, 14 Mar 2022 13:41:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 90d7d31f1ba6bb45 X-CR-MTA-TID: 64aa7808 Received: from 97e9cf7cbf04.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6755CB5D-BDDE-430C-8B98-25D4652D1F55.1; Mon, 14 Mar 2022 13:41:16 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 97e9cf7cbf04.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 14 Mar 2022 13:41:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TY8tvsSNHQL439dH9fSurcKfk4KSh+6/+wzDI34nskQTXYix4waiz4l5q85HPe+X4FxpqWmulZqALkOk+GEP1HyByKAhBToN3jWUBEnvTYwPJBNbLJXT6x8NxpYIyFOYFK6qVf/dq0EU3ybNXuSk4YP6pAquiOjnVWO4pgArG6MWVhZ8n2k8WGpW7+f8XZDblxOwd8fRVnDym1+9xm8AZyf9sSbZAZ1vwI5jrwkSk2sOFlDQJphVwAoVapkDRmvxceQCmGufU0Ab+6RvNybsT0yFyBwYc3T1bOEmQa6GmYWip460zAIogqNFxJcu0Ost/wtU/qJ9mH95xYUHPWTU5A== 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=fXtxuju1x++RrNDxUyppH5oyAV1K1Z99mqGcNu44hME=; b=GAxCua1D57+7kco59pDKsbyI6noSYBGIDSCFLvApMmG2hmF+xyw0W6Sl2uy/LF9AIQ47N6UXYAxpeDU2umLe3YnnotpahX3mqndgMSuOiO/ceGMFvvX6145AZDoRntVDo/qmg0ehPqXCSPhV8fwCyg9NJzl2bH9vLaBoxTZKXsJw31QvpegAK+wMkIrAG1dR8+/4WQEoazYj/Gm2w7s88MnTUa5jGIP5rr+7CU41u1GTB5ptDiJ/faP99q54rbIlaIMlP08aCy/cJ66RQVvWVXBtkUbiDvNgvzb+RrMclh4TdKpitASRfoaKhaaZQsTZaLrFUQkgR8VgxcrBmrbPkQ== 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 DB8PR08MB5419.eurprd08.prod.outlook.com (2603:10a6:10:118::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.22; Mon, 14 Mar 2022 13:41:15 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::4d3d:c632:297e:1dcc]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::4d3d:c632:297e:1dcc%5]) with mapi id 15.20.5061.028; Mon, 14 Mar 2022 13:41:14 +0000 Message-ID: <60f230a4-77b7-0a97-2f80-a2caa7a6f4a1@arm.com> Date: Mon, 14 Mar 2022 13:41:08 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] Implement gdbarch_stack_frame_destroyed_p for aarch64 Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20220311163133.668809-1-tromey@adacore.com> <00c20109-0a0c-b70c-a962-5a64539cc43a@arm.com> <87ee34lla9.fsf@tromey.com> From: Luis Machado In-Reply-To: <87ee34lla9.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN2PR01CA0042.prod.exchangelabs.com (2603:10b6:804:2::52) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 926820a4-bb08-441b-b2d4-08da05c05440 X-MS-TrafficTypeDiagnostic: DB8PR08MB5419:EE_|AM5EUR03FT039:EE_|DB6PR0801MB1848:EE_ X-Microsoft-Antispam-PRVS: 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: 2JYg2lc6zI5PpNjrD6oSkqTfQXxeuovro9blEpMIZes4RVCbEixUiI5wnW01p7D/PzQ15vOUHTYUnBLjD0IisH0x6WXWRtGB/GgTt1wPdrvoEzSYclFUFWGtw/fJe3glBuqC86FpU40OhPSkmX9/jdFW+Nk6GAPgAPu+7vlio16ReJ7tBUzkPsBMki1n5LFUZ1SLPlpdIjGoLGzzlop4TBrvPfCsX2VdPrXV5MdvrxK5bgtdyZBm4i/3QE7YFn0KjKNTWPpIwrDFvCnXeZa45jktqIgnv3v3ExW7FA+WPHTGYZVU1IT+6EFKTwD5STTfFFZynNl2lh4UNPvCRnC0/4fE5Q8aOhnnIZUkF2ZoQfCXc3vMGhaTOf3AcIBp6tCwPcpKDjfiyx4ghTYkqNChqXVyBNPKzA21zBaS0AS+Y+1n7sfIHWv+nx3hysLst7ag2lldpPhseasp1D/d/22cB4TN5wF7dpTdltCpSUBUT+FR2C5noaFzaF34T2HLgN+Xaj1+5+n+qiLFMl3TLBYBSrP+de89n+yUWJ37sIZOs4bdlG91iPNMC6LOvfkdDZN/NA8Xir6zHmd30QejsDSOoDAf7X3MVFKZ7VXFA8t97O5RKK7xPnq1k5NVPJWTJ6Z8LfH1IDYhA6H0HTLTVxERntmYocSbFfKf27HiHB8iJfqnImdlrNsszeh4/aPcvB9loW7+Jk1NUr0eQYqUdhgWyluk2l2cZX3gazbwU9tmu8lZJ2aApnK4D4kG4x0bFWgu 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:(13230001)(4636009)(366004)(44832011)(8936002)(5660300002)(36756003)(2616005)(83380400001)(2906002)(186003)(26005)(6506007)(53546011)(38100700002)(4326008)(6916009)(6666004)(6512007)(316002)(86362001)(508600001)(31686004)(6486002)(31696002)(8676002)(66946007)(66556008)(66476007)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5419 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: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: be078b9a-9d91-4fa9-7fe2-08da05c04f0d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KSMvfmtd2f/XsRI2f2m+Lgr/TUpz0kA9VTLypp+AWTnBE5NS//XZbkUys+Ik45ZOuN4NTSnJp9/L+FPF1h25upq+yllui7cEEDJ4yyj08OVurLluFZZKPKUAxdHswA4ysaL/O/rZ/xYLAu8/paAc5RxVleLQPyk9AiDFCiCEn0qzrjBN96ue8VCa0Vef6F9x6poUzf4G/gfRyz+ZPsVaIeCPkpdNdVeLOokF93/DHkhjfiVDddzdASvCIFdWwTYGj3S7+34BFdNLIu/Rigvbivbzw8jdwH+Du5CDkINVk/NTUI3Z+h63Ry2pBLvy9+kh6qTVgCFz7rXlP7NSL4AY63LuMfYKwiLKtDvzf72VpRehWtYUs28ER2MU+Ha0KxfntqEgCZ+4yfFoHwdcmCo99OwFtNea4d4lBiEpE1uIJoAVUe9Bv9Xewv1WYk93cIMJM+5f/VtZoytPVzZGPm91JhGpNtcpjrHu4But8fmvRH+B3W8e6I+AO78JDLWzEzSAEpe0XmQd4zCBAVPwiSyecCFimIbn1TG0vmWCOy8AWcKdsoxWzNwx1H2IZiSpuMLR/IOid7GEXIwSxNzO2dQOm6Vp1YRPS6WNVSkcbMEplLBS5hvy+8F8UFIfgLC7oDiDm9M/q3C+TIdOLdsCX0Cn9k1cE/OAKgizihOrWTtWPoMSfN8dnWeB16cpziNf73f76T888btvGYhvHd3QKLxAseyC+nHAyTRCqVKYlHevzluEEFV/UDreYnLLwev8QxJh/q5estn1utjzX0u38eA/0g== 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:(13230001)(4636009)(46966006)(36840700001)(40470700004)(316002)(36860700001)(70206006)(70586007)(508600001)(82310400004)(36756003)(8936002)(44832011)(6486002)(5660300002)(2906002)(40460700003)(8676002)(6862004)(4326008)(31696002)(356005)(81166007)(86362001)(6666004)(26005)(31686004)(47076005)(2616005)(336012)(6512007)(6506007)(83380400001)(186003)(53546011)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2022 13:41:23.1263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 926820a4-bb08-441b-b2d4-08da05c05440 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: AM5EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1848 X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 14 Mar 2022 13:41:29 -0000 Hi, On 3/14/22 13:24, Tom Tromey wrote: > Luis> Are the passing/failing runs using different compiler versions? > > Nope. > > Luis> If the > Luis> variable no longer exists, then having a stale location like that > Luis> seems wrong. Can you pinpoint what is different from a passing test > Luis> and a failing one? GDB version, compiler version, different binary? > > I didn't dig quite this deep but I think it's different memory contents > in the caller's stack frame. The kind of which will change from run to run, not triggering the watchpoint in some cases? > > Luis> These hooks seem to take care of functions without debuginfo, so they > Luis> tend to walk instruction by instruction to figure things out. > > No, this is a case with full debuginfo. What's happening is that the > DWARF for the callee describes the location of a variable as relative to > the stack frame: > >> DW_AT_location : 2 byte block: 91 7c (DW_OP_fbreg: -4) > > However, at the end of the callee, there's an 'ldp' instruction -- which > resets the stack pointer. So now, that variable's location description > points to an offset relative to the caller's frame. However, this is > clearly incorrect, because the caller and the callee generally will not > agree on the relative location of anything in their frames. > > Basically, this is a kind of epilogue detection. It might be better if > the compiler told gdb about this (but it doesn't) or if variable > locations ended at the 'ldp' (but they don't). Yeah. Anyway, other backends rely on this hook as well. So the patch is fine to me. As I've said before, I didn't see any regressions. Thanks, Luis