From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2049.outbound.protection.outlook.com [40.107.8.49]) by sourceware.org (Postfix) with ESMTPS id 99DA33858D1E for ; Tue, 2 May 2023 11:35:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99DA33858D1E 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=38tha7A9Rw5czOAC2fQDoAznxuAnY0Pa2OixtuXdzU0=; b=xjkRTeOUU0DlQJFN6eP2NDyav2zO4vrTP7hxkf/A+3iee5Wv0HNI7S0ei9RaEJJOQHJv6pXAJAAAS3sAm5FnvrYuV9VLm/Eu9y2+PaqmSP48MqIOAUUJXKJA7coMOXt+5oknCdbwqL/RWIVwYQB84qNR5SLIOj/uFhb1hoQYWZc= Received: from AS9PR07CA0037.eurprd07.prod.outlook.com (2603:10a6:20b:46b::12) by DB9PR08MB9922.eurprd08.prod.outlook.com (2603:10a6:10:3d2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Tue, 2 May 2023 11:35:14 +0000 Received: from AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46b:cafe::cd) by AS9PR07CA0037.outlook.office365.com (2603:10a6:20b:46b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.20 via Frontend Transport; Tue, 2 May 2023 11:35:13 +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 AM7EUR03FT036.mail.protection.outlook.com (100.127.140.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.20 via Frontend Transport; Tue, 2 May 2023 11:35:13 +0000 Received: ("Tessian outbound 3570909035da:v136"); Tue, 02 May 2023 11:35:13 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bf5ed680a91b59eb X-CR-MTA-TID: 64aa7808 Received: from da802e3ed52f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8683ECC7-C15F-409C-9266-C5F085D50679.1; Tue, 02 May 2023 11:35:07 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id da802e3ed52f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 02 May 2023 11:35:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UBCNv9aq5Q1RnKqZ44+hs7pu6lkSqu+bAV5CEo+oAZiiDddMCC3JpKYlSxyPDSMRGf3NjL/8II1u5nppSKHvSA0I2ss8DeNr26J7oUA3MTTBnXuma7Ms+ilcW/vnFtNVS14feX5ITpeCHqHAnHd9l0OUCX1cvIlRTvVCbpTuYo6CwHKlFyMRWWCKKafd5dpH7ib9DWMXH+OK9G9r19+uXerVO2EIc+3ST184F8HwR5Od8fz0LFYDuliffvXUIeMt4LwXtL+I8DhowZ1AlRlV/dbSopNjL3X2aGOC01k4el4RhciZhPLX7VH0vVlsYAe9eUqJGv+LY6tm408fmnxoIg== 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=38tha7A9Rw5czOAC2fQDoAznxuAnY0Pa2OixtuXdzU0=; b=f5sczloEIb8towFlWKDYpJ4JeRNZP+0KL50izex0XOyEiRd8EOIxeZLmAx6BGClrA6/od87AEYewDaHv7IWPG/e2VbfMU8csSvv6OMdZ19iEhKBnSqB8F72GJCOQhrY/PMXdZ3+97DDPV/WKPG1JnCS9XCYjYTI78vduU0oyF9sycZjG4rB4zjDGo5eiKluUKsSMeasDJQ5BivCQXifMcxnz6Z6tK2YDWHXQE2Cfk2qssX0rszD5ZcAU+WXsRxW20uFIbKKVSW3N0RAhKpSkx6a0BFrFJnK/OB3/Z8KV8MouFj47Hi0SrhIUcEKcwuQ5V7S49aMKbqZLJAidRYc97A== 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=38tha7A9Rw5czOAC2fQDoAznxuAnY0Pa2OixtuXdzU0=; b=xjkRTeOUU0DlQJFN6eP2NDyav2zO4vrTP7hxkf/A+3iee5Wv0HNI7S0ei9RaEJJOQHJv6pXAJAAAS3sAm5FnvrYuV9VLm/Eu9y2+PaqmSP48MqIOAUUJXKJA7coMOXt+5oknCdbwqL/RWIVwYQB84qNR5SLIOj/uFhb1hoQYWZc= 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 DBAPR08MB5685.eurprd08.prod.outlook.com (2603:10a6:10:1ad::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.31; Tue, 2 May 2023 11:35:04 +0000 Received: from VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::61f2:6a3c:f256:8616]) by VI1PR08MB3919.eurprd08.prod.outlook.com ([fe80::61f2:6a3c:f256:8616%4]) with mapi id 15.20.6340.030; Tue, 2 May 2023 11:35:03 +0000 Message-ID: <291240a9-a10c-ea4e-daf8-72e3d64aa3ad@arm.com> Date: Tue, 2 May 2023 12:34:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2] gdb.base/watchpoint-unaligned.exp: Always initialize wpoffset_to_wpnum Content-Language: en-US To: =?UTF-8?Q?Alexandra_H=c3=a1jkov=c3=a1?= , gdb-patches@sourceware.org References: <20230412210846.127441-1-ahajkova@redhat.com> <20230425104732.126979-1-ahajkova@redhat.com> From: Luis Machado In-Reply-To: <20230425104732.126979-1-ahajkova@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0032.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ae::18) To VI1PR08MB3919.eurprd08.prod.outlook.com (2603:10a6:803:c4::31) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB3919:EE_|DBAPR08MB5685:EE_|AM7EUR03FT036:EE_|DB9PR08MB9922:EE_ X-MS-Office365-Filtering-Correlation-Id: 14b95a39-a1ed-46ca-7fe2-08db4b014b90 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: RR39FR9sMbh9LWvDGPrmmIX+245Sj1juaJ+Y/U0AN3+E1xKZxLJaIDmwPgWrvL+xSM6FlMRf7XruZkUZj4YmXMaBcyJSPhZzmA8ckToI1E0xmB0wgalsE1ODrwS8e07NDXa3TtG+owMOI9PeFd6/lnzHzQOFiG5R5mtTSZRBJHVydSjRnEWcJnmPxwqrFlv9D5MlCfWR8C8l5X1GCEgtBRRF0RQJWR2o/osZTWdZ/hKRJNIitYdlj0S8WA2zfcYIF6JSvpWoTqYnrhmgy0W6FqN0icayH9697E/LkXyxs067tpHN+clpDBCA+rLhGRJkUHetMHycubmTv4SN3GbxHW8lJKjzeI5NWXgvJaowgABHloM468UW5BP+sSQ8fEt7CG7qcpsGCYqIUCKcWNwRbf4I5V37ieU+d9QHxnXDXkX7KtsTd5Uh+1Do9Rxejhp6AZ0hcWtFFby11oFa1BeQ4lx+GAEt6PlS2IsFDFyXpP1M0OGmKT2YFmhF/N38DcKQpbTh1WdhMVYBfTxckIU0CDRGh4gO3zIjjDBwBT/3myYRbiJO+nvKSUDSJCMKH4kWg18n0SOr1/fHgtcLVxtGuVRDDdMKdar8D1C3xHS6wvpIluIQV6offJKUnCxMIwoY8lc1LtZGfamaOGBaK0+LDHzYyPdNqCkal/8+ZjtSjhBQWSFoQ2MsFowLW9UFHOBS 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:(13230028)(4636009)(396003)(136003)(376002)(346002)(39850400004)(366004)(451199021)(478600001)(316002)(44832011)(66476007)(66946007)(66556008)(38100700002)(8936002)(8676002)(41300700001)(36756003)(5660300002)(86362001)(31696002)(2906002)(6486002)(6512007)(6506007)(53546011)(26005)(6666004)(186003)(966005)(84970400001)(2616005)(31686004)(66574015)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5685 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: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ceb4946a-6357-4576-92ee-08db4b0144bc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4rgtJUVjTUf8rwaneiS68+ULomTX8B5fKnY8mcCPywmK9M1nNEgxDuAnrG8vcoS4b4q4vT8wKI/2cSKfipT4m236Fmfks6ecWYkMCSDqawGDFwOKgKSGBeXbmWp7l6Ma9NIjUsbuJxnMsNyZ26V7+kFXad8TgHR0pna1HlRKoGrvZinMaP9A+k0oPgMyFHXsTx31SdWgiQg0u8sO+1LLgcmlHQzM/MNOtxrM4b8yyqDucSuRvRhHlLQ11eKK811XX8B+ezPtaoluTG18oWUxH0FM4j3mb41Ho+/54ALAcEB1zz1/xzbL38u5LsFC7cJAPpj2+rnfcrGQi3PJClEAqQsKlFWk6vCGyAtMMKD003RwgpEKW6rwOwvMk56h0b4SZf2ZdkEj6aW5tSxf31GoSeEO8gOTSJpvUxgqd8whWTsMSf8ZgV/A0jt1B9lXnnp/J+hboHWDaiqlteTqkBWEOnMB1yQJD+9TwKJErw7u5knV7eZOGvERZECxMI4Ml2fdQfy8EKjQgqjGBv+dZXqcp5v9reXjto3fyx3t6Fdauq4ui3E3beOrX1HaG6Zp2G1f99C2v4cIUxwWXiRNmZlu43DnG+mcas8abF9cX/WG/yen+yzecV8SImhxtDBEEU44duIzvaupaxvKXtXGo8GOnfVCL5f7DmstVxOpHfKv8eqfSGovJNwAZhBDjG9+RV9gYJ822RXzxALsZZHqX5JsRunW2awWBh0iNhNQl/hVnVxeJk5d3WApMXVd53GFastWo1BvCuQlqgT8NPWUL8etESJRvLeNYx7KgVXxhV5eVV8= 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:(13230028)(4636009)(376002)(136003)(346002)(39860400002)(396003)(451199021)(40470700004)(46966006)(36840700001)(47076005)(36756003)(336012)(83380400001)(66574015)(70586007)(966005)(6486002)(34020700004)(478600001)(6666004)(2616005)(53546011)(6506007)(186003)(26005)(6512007)(82740400003)(44832011)(5660300002)(2906002)(36860700001)(40460700003)(356005)(81166007)(70206006)(8936002)(8676002)(82310400005)(41300700001)(316002)(31696002)(86362001)(40480700001)(31686004)(84970400001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2023 11:35:13.7243 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14b95a39-a1ed-46ca-7fe2-08db4b014b90 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: AM7EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9922 X-Spam-Status: No, score=-12.6 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,T_SCC_BODY_TEXT_LINE,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, On 4/25/23 11:47, Alexandra Hájková via Gdb-patches wrote: > to avoid TCL error which happens in some aarch64 types. > > ERROR: in testcase /root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp > ERROR: can't read "wpoffset_to_wpnum(1)": no such element in array > ERROR: tcl error code TCL READ VARNAME > ERROR: tcl error info: > can't read "wpoffset_to_wpnum(1)": no such element in array > while executing > > Fixes bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30340 > --- > The test uses gdb_test_multiple, and there are plenty of other reasons (see gdb_test_multiple in lib/gdb.exp) that a test using gdb_test_multiple might fail. We're never going to recreate each of those in the gdb.base/watchpoint-unaligned.exp script just so that we can ensure the variable is initialized. Instead we should just ensure the variable is always initialized. > > gdb/testsuite/gdb.base/watchpoint-unaligned.exp | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp > index ce5a1e5bf66..d31a9cdc2c8 100644 > --- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp > +++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp > @@ -103,6 +103,8 @@ foreach wpcount {4 7} { > for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} { > set test "$rwatch data.u.size1\[$wpoffset\]" > set wpnum "" > + # Initialize the result incase the test fails. > + set wpoffset_to_wpnum($wpoffset) 0 > gdb_test_multiple $test $test { > -re "$rwatch_exp (\[0-9\]+): .*\r\n$gdb_prompt $" { > set wpoffset_to_wpnum($wpoffset) $expect_out(1,string) > @@ -113,7 +115,6 @@ foreach wpcount {4 7} { > setup_xfail breakpoints/23131 "arm*-*-*" > } > fail $test > - set wpoffset_to_wpnum($wpoffset) 0 > } > } > } Thanks. I think this approach is a reasonable one. Reviewed-by: Luis Machado