From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2052.outbound.protection.outlook.com [40.107.14.52]) by sourceware.org (Postfix) with ESMTPS id A23563858D33 for ; Mon, 23 Jan 2023 10:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A23563858D33 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=7MLbEFSUtnK8TFgyrgciPRtIG09a2u4weT/eDP8pLoU=; b=1O9TIasS1w6Zv/Ikr21s7tBAIFpIDLa8a+UwdbOlnOFCV5D9xwjJV5HtyuL1dqBwgVFUqYSgmLAvSug4iLczezHtumgcqxcJ1ygLe/+guUuIC2+8zNCBr2vn+Yg/d7C0PpEOVTcOc6rE5PNSVS2HU7jtCxiyglLKp/Xhi2vVdBs= Received: from DUZPR01CA0247.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::17) by DBBPR08MB5913.eurprd08.prod.outlook.com (2603:10a6:10:20b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Mon, 23 Jan 2023 10:18:43 +0000 Received: from DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b5:cafe::1c) by DUZPR01CA0247.outlook.office365.com (2603:10a6:10:4b5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33 via Frontend Transport; Mon, 23 Jan 2023 10:18:43 +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 DBAEUR03FT032.mail.protection.outlook.com (100.127.142.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.16 via Frontend Transport; Mon, 23 Jan 2023 10:18:43 +0000 Received: ("Tessian outbound 6e565e48ed4a:v132"); Mon, 23 Jan 2023 10:18:43 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6d628a258afb91a0 X-CR-MTA-TID: 64aa7808 Received: from e799359046ba.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8F62561D-7EF9-412E-B428-E2E7ADB02506.1; Mon, 23 Jan 2023 10:18:37 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e799359046ba.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 23 Jan 2023 10:18:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M5WyWWZVnnCA/9OAzE+bQ0ZS4iJREfZMAk6W4t29ND5RULrmWtnecGgw79DhBenzcWkXpIb0cSUop188lY3v6ZPAMwH0ghIZ26LV+EyayLpu1MmWrgtgk42BmUgnm4TnMVCTQakRzkxKcFSP6tqGeomkV3xz4kzIJtq4Rvbvuidxc86FjMiP/20lSyUdCvt2Rv2FxJpd0K9hMqGpSu5LHJqLpoBcwJrNyn7OUs6y5bfZZhc+aokLA0hRWrc5FH90AhW6GnhKbeYhLhFxU/n+5wqK1uMPUmC+fKG4RT1TbhTEvRlO9/QMHZZhdANO+zLKPMdSx5G2SkRBkpxIuQRjsw== 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=7MLbEFSUtnK8TFgyrgciPRtIG09a2u4weT/eDP8pLoU=; b=WXy2Vs6waU9qJn/WGP7QiZS7JcMS0EzhQH0zDYqs0HpBYPqNpW/74f/wwrydlupf1GixN/lsjCR1kLNV50DKsToDwioCL499aXScP1yWj4lm4HTlMDxx/gMy654uS3ox36SFMTuBJZaBe4gB70QDdIA013C3uVWJY2gRKfe/UtUYmalXv5j2337hHUr/2/RkiDWsKL2SLd8Umm7Il4pxpmvROnmZ8/A5cssomfYZ1TPVhP+uoTDtyNfQT78qjEuz/2yIomw6D4DbM2KKaeuy41lQm7SQTntcxIsCGVADyBaYYRmiIcnlAgAhkxoTUMuyD/kJhkF7BP6lyfgAVVeKXA== 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=7MLbEFSUtnK8TFgyrgciPRtIG09a2u4weT/eDP8pLoU=; b=1O9TIasS1w6Zv/Ikr21s7tBAIFpIDLa8a+UwdbOlnOFCV5D9xwjJV5HtyuL1dqBwgVFUqYSgmLAvSug4iLczezHtumgcqxcJ1ygLe/+guUuIC2+8zNCBr2vn+Yg/d7C0PpEOVTcOc6rE5PNSVS2HU7jtCxiyglLKp/Xhi2vVdBs= 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 VI1PR08MB5520.eurprd08.prod.outlook.com (2603:10a6:803:135::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Mon, 23 Jan 2023 10:18:35 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::bced:32a3:b77e:90a6%6]) with mapi id 15.20.6002.033; Mon, 23 Jan 2023 10:18:35 +0000 Message-ID: Date: Mon, 23 Jan 2023 10:18:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 4/4] [gdb/testsuite] Analyze non-leaf fn in gdb.base/unwind-on-each-insn.exp Content-Language: en-US To: Tom de Vries , gdb-patches@sourceware.org Cc: Bruno Larsen , Andrew Burgess References: <20230119104618.15503-1-tdevries@suse.de> <20230119104618.15503-5-tdevries@suse.de> From: Luis Machado In-Reply-To: <20230119104618.15503-5-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0076.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2bd::11) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|VI1PR08MB5520:EE_|DBAEUR03FT032:EE_|DBBPR08MB5913:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f657a60-44d9-4e6b-73df-08dafd2b34ca 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: 04SqG8P7UBh89d19UqP4MEvJQuBhR331GXvt0ul9how8N2LuVpPZMsq/VJ76ssOaFRcB9y04O0vPjy3XU4fU9/ckSCDo99+RYBu2DhRti7Pzi8M6Ed8vsJX+Lr4UECSiVWO5vwDGG/JaKBHgUaB0nwpNUPZ7Yrf3G9lGvhtNWp3yiw4p0MyKvIU0DolpDXqu2/3u0KHHWixe1cgIYY0ADQ74pMJpW3I1TvPvL9NK0Cpm5M+3bcEXa5VHWdj0OcCZPQTaLxllhK/AUYjITD5tPa2w2wp/K6W5TrlcZUtaHtOTcGxcCKNqI5hP8L5pUDGWrxy+/4tjxHkIl6pAEfTeh2vWp6yFtxlH1HfyBGoFwkQojP3Sb5LJe7Ou+bttAo3gLZSnTY04RuVNTleBc8PC5+I0gbAP/E5igcfP/X4iKBsQti7WsP6uTmb6z3m9N+vgVHUyO7gVzjnCkvNa/l/oKnBwIKURZ7RZOcgvO2iUetAfGdJvPEaWhDO6qqg6EwS46fzZihyGCU7A5DaZT1Xa8A7PQEIsZInr6Vfdw7/jD2bmdW4yEizVA+oEZ4yIW3L4mVgasWtw/qxmMyz+FET3SxM+9YLh7SMeOTHah+or4t2pJu2eRYPpjJxSuPcs/2r25/vSmvna6NqmensMHmS1dHoQrFSH1rNvnPvv0NB/YdIywnW/WKUoMHrXO5xvkU//k2lkWe/vbf+TMf9VQNPGz6PATgq1ewgyLWbgwWnblRGI5UcjyBHmmDsoKohTWH3JMSo603s4gAZ/uz0Ue4rawnLhhvXAav4TmwLGE3ubITw= 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)(366004)(39850400004)(136003)(376002)(346002)(451199015)(31686004)(36756003)(84970400001)(26005)(6486002)(6512007)(316002)(186003)(8936002)(478600001)(6506007)(53546011)(2616005)(31696002)(86362001)(66556008)(66476007)(8676002)(5660300002)(83380400001)(4326008)(54906003)(2906002)(66946007)(44832011)(38100700002)(41300700001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5520 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9af7fc0b-b439-4c95-7ab2-08dafd2b2f7e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xW6BoyV2cR3CpX/IlaSVktpUyoeOnNepHeBV8LmJzNtZbQsLLr78hqNBwQHEDkAEk3F/pGwPhodrz+3nmuJoj9nYm1weOI52u5yjHFhpZOAP48Rpu81lUcvaHiGfhhVzZC0WDL2dMutnB4yyfPX6MafMqJnOWVbaY1d+aBIsDR/kp4BGyxQdMCWyq1KKnHkTYn/x3ZM8eVq5IvOlgUZjQQqIL1SnqLR+UtrD8l7/IYtY5tqvZve5RviatMaoCNNap8icwsXUivt4oHRs5zgc72Uh8hdoaoIYuT60vuStm7aJyvc8WqGpSVJgJY3r60zXzOs07JiygAaAI3Jm0yUSSSFjayW0j5BfMKi6AcYaKFkmOJIi4sADGkJQvTh51Td3VhFMgpLd7CAyKLeT16zjv/sJKmWUb86iRzx9pQyGQk9VZMOFowr7BnPk9m9QCsi3r0n4021PcikoWaz16ihJKsHNGBs+uPUFEEV5HYjxaNBaj1F46urjLhIZrpVV91luftJR/b0XoW5D1MpuQYo7T0NtrbIdv68guVuyPrwjDOvxv/fhASFS9PS7+t3wFx1sAnXYuY+TBGHKYqtqL50mD0fKEqDMRc54B/rT/5zX3CGPsBt+pWW1UG/3cw0VQZe0iqKIpg74wQuupyfO9/b4gjZENXIACKvcGmTz1rpkvidrYujxJVuaTJsDwO7S3TQOQEsmMjISgTD0n1cVgIpVg6PfaYCxvjnf/tREIz/2QxdxDO1yzOP2j96z34MlJ+d+Fy5bg9v0WtDgPOp2bNtapqNYhTGfDu0CrYlH2aGAP9HoVcDXGJ/9RbQGEBmpNkiW 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)(136003)(396003)(39860400002)(376002)(346002)(451199015)(40470700004)(36840700001)(46966006)(82740400003)(81166007)(40460700003)(36756003)(40480700001)(356005)(31696002)(82310400005)(86362001)(478600001)(316002)(336012)(54906003)(6486002)(8676002)(70586007)(4326008)(70206006)(2616005)(47076005)(31686004)(36860700001)(53546011)(6506007)(2906002)(5660300002)(84970400001)(26005)(107886003)(83380400001)(41300700001)(186003)(6512007)(44832011)(8936002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2023 10:18:43.7450 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9f657a60-44d9-4e6b-73df-08dafd2b34ca 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5913 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,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: On 1/19/23 10:46, Tom de Vries wrote: > In test-case gdb.base/unwind-on-each-insn.exp, we stepi through function foo > to check various invariants at each insn, in particular hoping to excercise > insns that modify stack and frame pointers. > > Function foo is a leaf function, so add a non-leaf function bar, and step > through it as well (using nexti instead of stepi). > > On aarch64-linux, we run into PR tdep/30010: > ... > FAIL: unwind-on-each-insn.exp: bar: insn 8: $fba_value == $fn_fba > FAIL: unwind-on-each-insn.exp: bar: insn 8: check frame-id matches > FAIL: unwind-on-each-insn.exp: bar: insn 8: bt 2 > FAIL: unwind-on-each-insn.exp: bar: insn 8: up > FAIL: unwind-on-each-insn.exp: bar: insn 8: $sp_value == $::main_sp > FAIL: unwind-on-each-insn.exp: bar: insn 8: $fba_value == $::main_fba > FAIL: unwind-on-each-insn.exp: bar: insn 8: [string equal $fid $::main_fid] > ... > > Tested on: > - x86_64-linux (-m64 and -m32) > - s390x-linux (-m64 and -m31) > - aarch64-linux > --- > .../gdb.base/unwind-on-each-insn-foo.c | 6 + > gdb/testsuite/gdb.base/unwind-on-each-insn.c | 2 + > .../gdb.base/unwind-on-each-insn.exp | 132 ++++++++++-------- > 3 files changed, 81 insertions(+), 59 deletions(-) > > diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c b/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c > index 635aa44135e..4a3b2946a3b 100644 > --- a/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c > +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn-foo.c > @@ -20,3 +20,9 @@ foo (const char *s) > { > /* Nothing. */ > } > + > +void > +bar (const char *s) > +{ > + foo (s); > +} > diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.c b/gdb/testsuite/gdb.base/unwind-on-each-insn.c > index 821df375115..4aabc651c7b 100644 > --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.c > +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.c > @@ -16,10 +16,12 @@ > along with this program. If not, see . */ > > extern void foo (const char *); > +extern void bar (const char *); > > int > main () > { > foo ("foo"); > + bar ("bar"); > return 0; > } > diff --git a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp > index c61ffe5d174..c8e3f95e63a 100644 > --- a/gdb/testsuite/gdb.base/unwind-on-each-insn.exp > +++ b/gdb/testsuite/gdb.base/unwind-on-each-insn.exp > @@ -69,72 +69,86 @@ proc get_fid { } { > lassign [get_sp_and_fba "in main"] main_sp main_fba > set main_fid [get_fid] > > -# Now enter the foo function. > -gdb_breakpoint "*foo" > -gdb_continue_to_breakpoint "enter foo" > +proc do_test { function step_cmd } { > + # Now enter the function. > + gdb_breakpoint "*$function" > + gdb_continue_to_breakpoint "enter $function" > + delete_breakpoints > + > + # Record the current stack-pointer, and the frame base address. > + lassign [get_sp_and_fba "in $function"] fn_sp fn_fba > + set fn_fid [get_fid] > + > + for { set i_count 1 } { true } { incr i_count } { > + with_test_prefix "instruction ${i_count}" { > + > + # The current stack-pointer value can legitimately change > + # throughout the lifetime of a function, so we don't check the > + # current stack-pointer value. But the frame base address > + # should not change, so we do check for that. > + lassign [get_sp_and_fba "for fn"] sp_value fba_value > + gdb_assert { $fba_value == $fn_fba } > + > + # The frame-id should never change within a function, so check > + # that now. > + set fid [get_fid] > + gdb_assert { [string equal $fid $fn_fid] } \ > + "check frame-id matches" > + > + # Check that the previous frame is 'main'. > + gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" > + > + # Move up the stack (to main). > + gdb_test "up" \ > + "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" > + > + # Check we can unwind the stack-pointer and the frame base > + # address correctly. > + lassign [get_sp_and_fba "for main"] sp_value fba_value > + if { $i_count == 1 } { > + # The stack-pointer may have changed while running to *$function. > + set ::main_sp $sp_value > + } else { > + gdb_assert { $sp_value == $::main_sp } > + } > + gdb_assert { $fba_value == $::main_fba } > > -# Record the current stack-pointer, and the frame base address. > -lassign [get_sp_and_fba "in foo"] foo_sp foo_fba > -set foo_fid [get_fid] > - > -for { set i_count 1 } { true } { incr i_count } { > - with_test_prefix "instruction ${i_count}" { > - > - # The current stack-pointer value can legitimately change > - # throughout the lifetime of a function, so we don't check the > - # current stack-pointer value. But the frame base address > - # should not change, so we do check for that. > - lassign [get_sp_and_fba "for foo"] sp_value fba_value > - gdb_assert { $fba_value == $foo_fba } > - > - # The frame-id should never change within a function, so check > - # that now. > - set fid [get_fid] > - gdb_assert { [string equal $fid $foo_fid] } \ > - "check frame-id matches" > - > - # Check that the previous frame is 'main'. > - gdb_test "bt 2" "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" > - > - # Move up the stack (to main). > - gdb_test "up" \ > - "\r\n#1\\s+\[^\r\n\]+ in main \\(\\) .*" > - > - # Check we can unwind the stack-pointer and the frame base > - # address correctly. > - lassign [get_sp_and_fba "for main"] sp_value fba_value > - if { $i_count == 1 } { > - # The stack-pointer may have changed while running to *foo. > - set main_sp $sp_value > - } else { > - gdb_assert { $sp_value == $main_sp } > - } > - gdb_assert { $fba_value == $main_fba } > + # Check we have a consistent value for main's frame-id. > + set fid [get_fid] > + gdb_assert { [string equal $fid $::main_fid] } > > - # Check we have a consistent value for main's frame-id. > - set fid [get_fid] > - gdb_assert { [string equal $fid $main_fid] } > + # Move back to the inner most frame. > + gdb_test "frame 0" ".*" > > - # Move back to the inner most frame. > - gdb_test "frame 0" ".*" > + if { $i_count > 100 } { > + # We expect a handful of instructions, if we reach 100, > + # something is going wrong. Avoid an infinite loop. > + fail "exceeded max number of instructions" > + break > + } > > - if { $i_count > 100 } { > - # We expect a handful of instructions, if we reach 100, > - # something is going wrong. Avoid an infinite loop. > - fail "exceeded max number of instructions" > - break > - } > + set in_fn 0 > + gdb_test_multiple $step_cmd "" { > + -re -wrap "$::hex in $function \\(\\)" { > + set in_fn 1 > + } > + -re -wrap "" {} > + } > > - set in_foo 0 > - gdb_test_multiple "stepi" "" { > - -re -wrap "$hex in foo \\(\\)" { > - set in_foo 1 > + if { ! $in_fn } { > + break > } > - -re -wrap "" {} > } > + } > +} > > - if { ! $in_foo } { > - break > - } > +foreach { > + function step_cmd > +} { > + foo stepi > + bar nexti > +} { > + with_test_prefix $function { > + do_test $function $step_cmd > } > } This LGTM from aarch64's side. I see more PASSes and not FAIL's. I see more FAIL's for arm-linux, but that is possibly broken in similar ways to what aarch64-linux was.