From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2053.outbound.protection.outlook.com [40.107.20.53]) by sourceware.org (Postfix) with ESMTPS id 57EFE3858C50 for ; Thu, 27 Oct 2022 10:31:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 57EFE3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eS7cTxyN3AO1jQHErKlB6FRs6wUwnLGwMmvVVf02ZaKtq87u3o2QmjK/LmykvDGwr0mHA9CDSDrdDaXyeym6CVjJZgo/EIL7+wg04SqUUqAP3TYBoKXEDA3FIzGQrNgUaIkytLJVSikPgBfohrm7Ni4t8rQXsZ1o2L+oqFEVxloxKvVUfl5/ZWy0efEV6pqanDPej/ERpfsv5zLfkCFnl4A3cF3vKmO48eNb3FakslOdPWjmwWrfixAcMQ4U6K+SdJqeVucKnyjMD9psHNBDEFcc/my5IpScdkymkdmbi7cJF0oHvhugwtHDfdN+kCv7NTjtjdX0w4rlIAwlwCohZg== 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=X8Xg18+i2wbBMgY6C3O2QOGS9Rx3Vouaq3vqIuLgSFk=; b=EOPpATUDRTpAVrEwdIh6EwaY6u2C6QVyHYVjhpEbxNQ7VlW1uelkfQMTnydic+jd/CnFivqT0W5n2iP1qkDdMF2SHAwXeAiruwXE3BCktizDRVYFusUdRq5pmZWZSdUrWR/JMli9S820D0qF9WI+JNtKHUY8FNV6gTN094VT24wJGZ2FTqVKEvU69UiUql4Hzgvq2tVPetDuNraKTZu5+tLKFxFXhZbsZb2wJL6LutWiru55WwdWlr/Vip5p58d3mYbdW3QiIvNo+N6mklJ7pznnbcsSmlYXbVHYO7nQH0F8ybcaQhUoXKk7g9Y1ek0t7PiAorfXadtKg2vevSvd5g== 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]) 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=X8Xg18+i2wbBMgY6C3O2QOGS9Rx3Vouaq3vqIuLgSFk=; b=GmyHRaRGWNs3IvWZbw93VE4Yt2xot6qL+FU+H8HZ0MiYgaRqZD9yLcRlxhg+w2cMt7j0e5+D6yZ7iO/3OhEgdbJneDXDrOkuSP4xjDD4t4qZxyFiGnoZnKh7jwsGYPn2tiJU4Bo/7oWlJ0C6vdg+mxJP/TdPONqdXdDCuRzNbS4= Received: from DU2PR04CA0270.eurprd04.prod.outlook.com (2603:10a6:10:28e::35) by GV1PR08MB7729.eurprd08.prod.outlook.com (2603:10a6:150:50::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 10:31:28 +0000 Received: from DBAEUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::2e) by DU2PR04CA0270.outlook.office365.com (2603:10a6:10:28e::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.15 via Frontend Transport; Thu, 27 Oct 2022 10:31:28 +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 DBAEUR03FT040.mail.protection.outlook.com (100.127.142.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5769.14 via Frontend Transport; Thu, 27 Oct 2022 10:31:28 +0000 Received: ("Tessian outbound 0800d254cb3b:v130"); Thu, 27 Oct 2022 10:31:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 67d8832bc2355819 X-CR-MTA-TID: 64aa7808 Received: from d7ff2ddd069e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D6C304A0-B6BC-492B-906F-1A9E100BE5E9.1; Thu, 27 Oct 2022 10:31:21 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d7ff2ddd069e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 27 Oct 2022 10:31:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SbfH4TXn9xSELOaCZj8ene7L2hx4G9iMA14QeMoT4YWqZckx411he4iWKbA2HulgsHiDep97UUgkNAy+ojuRnZqNNJXqso2T8KCZcQ/W3esoetKQdkrvoa2hupjKoCgM68Q1DTOzbAzACooEOvjtO7uMGUiYMIrZzWC10oE3N6U/AkLXYp+rkNhk3SUrdSitKzpI/jfBIvtORQGqHpP05zi635QQ4iTbmWHS6yB7BSlxvXtHgl/4l4dAuqR8IMSSndiXmJluluOtHyluBIqKX0Ss84jEkiXc2duT99rgUXvqMFl7zGtZ1J4uhq69BmJhwNDDNeBrFuF8Dg+c3DdU1w== 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=X8Xg18+i2wbBMgY6C3O2QOGS9Rx3Vouaq3vqIuLgSFk=; b=MdJekwGMFrGVXZ6UYGMqii6H2xV6+adEeGA32hxqZgusn13rXI396sxa82WndbR9emAOZKZY12bxW+4IwDVHGkbwlmwyXiiuYWk0iw2MpzgETHpzX/lh6aKkBM+vu5BV6tUHPZ35I14rulrjunDJKp2mTrhtyKv7Nv69wETo87zytn0r8g0QwhrMz+bpOIydwvMY/YHHGPnT5JSmWs/ui3nCX3lUldPkOW4x76Arp7TFFr75bxuPfBy7HPookWeBRxKBKT0KnwghYmmkeNzUD1Oi6yEZiTfdQoyk70BSJz/dymi4hlJuN7E2vVRZ+G7FwbuoEim1S9ErNJgZ0WZqDg== 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=X8Xg18+i2wbBMgY6C3O2QOGS9Rx3Vouaq3vqIuLgSFk=; b=GmyHRaRGWNs3IvWZbw93VE4Yt2xot6qL+FU+H8HZ0MiYgaRqZD9yLcRlxhg+w2cMt7j0e5+D6yZ7iO/3OhEgdbJneDXDrOkuSP4xjDD4t4qZxyFiGnoZnKh7jwsGYPn2tiJU4Bo/7oWlJ0C6vdg+mxJP/TdPONqdXdDCuRzNbS4= 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 DU0PR08MB9726.eurprd08.prod.outlook.com (2603:10a6:10:446::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Thu, 27 Oct 2022 10:31:18 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7f57:1601:9b18:7529]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::7f57:1601:9b18:7529%7]) with mapi id 15.20.5746.028; Thu, 27 Oct 2022 10:31:18 +0000 Message-ID: <8c72008e-6151-846d-77dd-7da642b1489f@arm.com> Date: Thu, 27 Oct 2022 11:31:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2] gdb: Modify until_break_command to act correctly on SIGTRAMP_FRAME Content-Language: en-US To: Tomas Vanek , gdb-patches@sourceware.org References: <1666353538-15846-1-git-send-email-vanekt@fbl.cz> From: Luis Machado In-Reply-To: <1666353538-15846-1-git-send-email-vanekt@fbl.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0040.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::9) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DU0PR08MB9726:EE_|DBAEUR03FT040:EE_|GV1PR08MB7729:EE_ X-MS-Office365-Filtering-Correlation-Id: 93898a5d-133f-4989-79b5-08dab8066800 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: dV7xAcPrI7CNINmWnuaCqL8E/srzUhKvs9Dwx24iaiQXOVKfeDWEoee4/9OTqMtvE30fcS1bNn9AlwjPQgjMxPw7pr1x+sp5UZd9rwnInAS+BcSZ5ybtTkRY93lJBPMkQMUQlfAEDmzPjD/LDvJParqaTXnzXXcTqYS4MWCsub+rm21sWN4zQIsBNNzgLkxvE4KPdsyvgQiQBDISHpouYyOdCR8nGnRTDNPI2nRicalf2kjjcDCPpyrFuMMG22mbWjXg5ydYIcSdhokuqHJj6GOGu1DVKgfYIxhInDsTCrpHS4EqcxlnLyI4NgWQVPYD8m9ZeoxVvDVNZq+opGgqxzr4wYjj+df2JCGltziC/6SjoRIm/+N8l0s6VeYso1VffInAuP45Mu856MCkEq00Dfvrb1MRUhQYZhUhQ4DfE9MLHlrrUPXriGLwrWKF4xCsKukWRJ6W5vtyiu9vyaz9dgdCBygdJHrGhPcrXjHTl7gVYlSqNcdqFZU68L61dq0l9AxGFwnZqZxwgYbqpkhoJ7gi1PZ2TMgIT3KxrWuuQ/c4kRQtvXj97CeftXh/M/0yl1gfBcI9R84rauy2HzHX0PgwuFhHfdXlO8nnsVipQL/BjQMEaL9dTt2MYMAEDmIc/fdlrD7d7xmzAiTZZ85GiO/Q13CiKLezZ43Hymerb5s8n5kca7smBdxR5jzw0i7JHCzTRrSoxeC++qMoE8M08qr1uLJMt4nPNdpU7PQvQXsfDNdZg09EXqtv7HvcGvxpvgEWZNiRqJwBa/a90JPBJ4waG+J38UMPQsBuvUVcgW9ba/EbzsM0cfRzRKHkx0pJ 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)(396003)(136003)(39860400002)(376002)(366004)(346002)(451199015)(2616005)(31686004)(6506007)(66476007)(66556008)(66946007)(5660300002)(53546011)(186003)(83380400001)(44832011)(6666004)(6486002)(478600001)(36756003)(8676002)(86362001)(38100700002)(8936002)(31696002)(316002)(2906002)(966005)(6512007)(41300700001)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9726 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: DBAEUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 89c7fdcd-7b74-4105-1ceb-08dab80661ef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IcmkysAhnh2X4k8x8LX02+0TJjRBG+kx3SyN9aMipgk/WrZpr3QHU0068tmmjkVi7Kv8ZNbqq/YBBKX+WSepjZrMKxkTVp7s5kEWIPi2RPOpSv5E28Ai3xki1jdhsvTsAh1TjtW/tHOizu+IsPrtfnwWSH47mOr35riEJH5vIfz6c+AJ6c9Da6mWHb9TWyCh65alIyxf8gLF9tA2njWfYK+SXAxCxI7sIt1KkQOg50sJG8uGginXrKbQ7MJLT+KgK1ZY9AdPRznu1MYX5Ui4mabtBEbxzbdr5rGKe/tIBMZr79KhKYrwiPgG+sHihOAut5s24kapvY8ShZa3qD1i4aEWqHwoDE4UZ1qpb76sDxN4AOy7qeZFI8rMyQ8iYXw16bF3QBkn0RsDyTLovFxv18sTQ0zVQbnygCH3xv6FS+Mz9p5ZPTNhW7VgETZxuXS/XPqN+cdsgAJ4koV8V1E7/X+5A8/rMZuuW9+O8KvcaSAmtKa7OjTXNrHMf/9X6xGw09rNiD2i6DTFJ63CkoycZCDsV/wa+lBsKsglGGhGnggJqqX+koUhoO2Si9hBdMf86tnksNy6gcWa5/AZqqFh7w6OhXdowdaymbv5k/yOYFGZcb1IWbUUuvmTETHheGJIgLfvtn8UgfIrGef3bwAXUhxIVbL6hTPOBZuBk6ThlOhl71s+HYdBxNuj6uVnOq91FXD5ClYxwa7OJS4QJdntUGm3PNitORNXC1bZ6PBE89zEuh9b3Wvs8IOpNpT6uCmqVvaDtMkaWRNeuQMCA029VSzr+olx1I42S+FeCXleT1Zg0WMKmkpAKanFt7A8NHMgdFwOOp4Mm96EwBzekb4JsQ== 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)(346002)(39860400002)(376002)(396003)(136003)(451199015)(40470700004)(36840700001)(46966006)(86362001)(186003)(5660300002)(2616005)(47076005)(356005)(40460700003)(81166007)(336012)(36860700001)(2906002)(44832011)(31696002)(82740400003)(53546011)(82310400005)(478600001)(966005)(6666004)(26005)(6506007)(41300700001)(8676002)(40480700001)(83380400001)(316002)(8936002)(70206006)(70586007)(6486002)(6512007)(31686004)(36756003)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 10:31:28.0366 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93898a5d-133f-4989-79b5-08dab8066800 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: DBAEUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB7729 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,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 List-Id: Hi Tomas, On 10/21/22 12:58, Tomas Vanek wrote: > This patch partially depends on > gdb/arm: Terminate frame unwinding in M-profile lockup state > (without it lockup state is unwound as if it were a normal > stack frame). > > The commands 'advance' and 'until' try to set a breakpoint > on the bogus return address derived from Arm M-profile magic > address (actually EXC_RETURN or a PC value indicating lockup). > > The offending breakpoint should be set at the return address in > the caller. The magic value 0xffffffff in LR indicates > there is no caller (return to this address would lock up the CPU). > > Similar behaviour of 'advance' and 'until' is observed in > an exception handler routine. In this case LR contains e.g. > 0xfffffff1 (EXC_RETURN) and GDB tries to set a breakpoint at > 0xfffffff0. It should use a return value stacked by the exception > instead. > > Testbench setup: > STM32G474, a Cortex-M4 device. Any Cortex-M device can be used. > A test application (an ordinary blink) with a standard startup > is loaded to the device flash. > > Steps to reproduce the problem: > > start GDB server > $ openocd -f interface/cmsis-dap.cfg -f target/stm32g4x.cfg > > start GDB in second terminal > $ arm-none-eabi-gdb blink.elf > > (gdb) target extended-remote localhost:3333 > > Reset the device and halt it: > (gdb) monitor reset halt > target halted due to debug-request, current mode: Thread > xPSR: 0x01000000 pc: 0x08000e14 msp: 0x20020000 > > Step by one instruction to re-read GDB register cache: > (gdb) stepi > > Check registers, LR should be 0xffffffff after reset: > (gdb) info registers > ... > sp 0x20020000 0x20020000 > lr 0xffffffff -1 > pc 0x8000e16 0x8000e16 > xPSR 0x1000000 16777216 > ... > > (gdb) set debug remote > > Issue 'advance' command: > (gdb) advance main > [remote] Sending packet: $mfffffffe,2#fa > [remote] Packet received: 0000 > [remote] Sending packet: $mfffffffe,2#fa > [remote] Packet received: 0000 > [remote] Sending packet: $m8000526,2#30 > [remote] Packet received: 2046 > [remote] Sending packet: $Z1,8000526,2#7a > [remote] Packet received: OK > [remote] packet_ok: Packet Z1 (hardware-breakpoint) is supported > [remote] Sending packet: $Z0,fffffffe,2#43 > [remote] Packet received: E0E > [remote] packet_ok: Packet Z0 (software-breakpoint) is supported > Warning: > Cannot insert breakpoint 0. > Cannot access memory at address 0xfffffffe > > Command aborted. > (gdb) > > Relevant messages from OpenOCD: > Error: Failed to read memory at 0xfffff000 > Error: can't add breakpoint: unknown reason > > This patch adds skipping over frames that are not suitable for > guarding with a breakpoint inspired by 'finish' command. > If no suitable frame is found, a momentary breakpoint is not set. > > v2: Comment fixes, bug reference. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28683 > Signed-off-by: Tomas Vanek > --- > gdb/breakpoint.c | 22 +++++++++++++++++----- > 1 file changed, 17 insertions(+), 5 deletions(-) > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index f6591d4..bb85342 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -10467,6 +10467,7 @@ enum async_reply_reason > until_break_command (const char *arg, int from_tty, int anywhere) > { > frame_info_ptr frame; > + frame_info_ptr caller_frame; > struct gdbarch *frame_gdbarch; > struct frame_id stack_frame_id; > struct frame_id caller_frame_id; > @@ -10505,7 +10506,17 @@ enum async_reply_reason > frame = get_selected_frame (NULL); > frame_gdbarch = get_frame_arch (frame); > stack_frame_id = get_stack_frame_id (frame); > - caller_frame_id = frame_unwind_caller_id (frame); > + > + caller_frame = get_prev_frame_always (frame); > + > + while (caller_frame) > + { > + if (get_frame_type (caller_frame) != TAILCALL_FRAME > + && gdbarch_code_of_frame_writable (get_frame_arch (caller_frame), caller_frame)) > + break; > + > + caller_frame = get_prev_frame_always (caller_frame); > + } > > /* Keep within the current frame, or in frames called by the current > one. */ > @@ -10514,14 +10525,15 @@ enum async_reply_reason > > gdb::optional lj_deleter; > > - if (frame_id_p (caller_frame_id)) > + if (caller_frame) > { > struct symtab_and_line sal2; > struct gdbarch *caller_gdbarch; > > - sal2 = find_pc_line (frame_unwind_caller_pc (frame), 0); > - sal2.pc = frame_unwind_caller_pc (frame); > - caller_gdbarch = frame_unwind_caller_arch (frame); > + sal2 = find_pc_line (get_frame_pc (caller_frame), 0); > + sal2.pc = get_frame_pc (caller_frame); > + caller_gdbarch = get_frame_arch (caller_frame); > + caller_frame_id = get_frame_id (caller_frame); > > breakpoint_up caller_breakpoint > = set_momentary_breakpoint (caller_gdbarch, sal2, My understanding is that these changes are meant to prevent both commands (until/advance) from attempting to place a breakpoint in a caller that doesn't really exist, right? The finish command, as you mentioned, seems to have a similar treatment in "skip_finish_frames". Would it be possible to factor out that code into a common function that we can call to determine if we have a valid caller whose PC we can breakpoint?