From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 7628A3858C52 for ; Thu, 19 Jan 2023 09:54:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7628A3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674122091; x=1705658091; h=from:to:subject:date:message-id:references:in-reply-to: mime-version:content-transfer-encoding; bh=nibe+MH7cDnQWOw8EbcZ802aqpL/oQlosWiLXhbOBfc=; b=jyXVdUMqU9spj2otU5eYlFkxQ0h3wsX2uFYQOdgFDqmUyauvm3oeIevg L6hHRRPfxaM4yZhoNR+//slyXa/ou4oa+7x2CRs8CBknk0cigqprDJYFM 2jUPmHo5udY4c8YIvps0U68VOWaqzwZDWhovJ93bJvMODztwLuptk3JfO ipMbYDcpcku+EwY6SBMhWJGahAgag/faNnrS6LTWPv/seHBGZ6oPxS7YK YORyssY/ECSXhFa3su3PssVpnKHBHcdnQiD1RmsBYRMx7DMbrdh0wMYBM +Q614KQO5j9/gGZ/6DGGa2/zC+nIRO/V+zkKI31ejjNZyYTjVnyBSez7D Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="323931296" X-IronPort-AV: E=Sophos;i="5.97,228,1669104000"; d="scan'208";a="323931296" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 01:54:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="768156251" X-IronPort-AV: E=Sophos;i="5.97,228,1669104000"; d="scan'208";a="768156251" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 19 Jan 2023 01:54:49 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 01:54:49 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 19 Jan 2023 01:54:49 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 19 Jan 2023 01:54:49 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 19 Jan 2023 01:54:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJlyw16GzrvFrj3P3XRqjNG11wDF4BtcXEhvcPsnlWML54riv4aOTt+0iy3qf7PVvoj+24br8IQSu5E15tli+Ly4EhnGagsNacdTgLlN9+E/tBybiHzKoE0hmBs1tfg1+WO48l7V9f8uY9hTUJA5tckUDH0i0jl2lZRV8gWVAaDDDfkr7jW8OflnpnHsEMCPJNLKEDoWuNAaM98YYQbZmJLOx0rveu4GRLFsIaSuF0nxyuLlrBuDBNW2hoSssJQubMu5ZKLNYwMOQO3Fh62GCmbLS486ciatuHjWi2dRhWnR3sqevO6AWw2ExhOEIHRymt8K6frbhMHyncWuwqyGag== 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=pbVZI/53l3mkuY/pOdN9nVzHJh85Ww3EwwOagcLB090=; b=BA/gSORlD1Wbd+2nbVcqeuwH+j3m1kGS8rT+wlkh6rhuUkEXhmghXHeQo2UE71HJaHVFcdrzIh23eiF9JF8V0M8hZptv05SEn9jBpNTuCYaZ+yUF/NG+WmB7RkW1o5zKChRSBd9ipSvWQ3AdkrDGDYrcW8SdXcFI+XtE1Q9kXXIiyWUVF+r5sxB3do15HOE6dz9GzBi0N+RO2L3heNuoIXPrkO1jD7YuTokzn8nf+jhyiULA+3h3kxZIoxuDc10RK1cVHRPO66Dx6651BaAi8bvIpWU/1kmxfDKekcaLXRmOcxJzBGcKs/4K30WnLqNuS6iMntkmzwe3N9eGZyaMDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB7303.namprd11.prod.outlook.com (2603:10b6:8:108::21) by CH3PR11MB7370.namprd11.prod.outlook.com (2603:10b6:610:14e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Thu, 19 Jan 2023 09:54:41 +0000 Received: from DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::d2a1:8dd2:854f:d5df]) by DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::d2a1:8dd2:854f:d5df%8]) with mapi id 15.20.5986.023; Thu, 19 Jan 2023 09:54:41 +0000 From: "Aktemur, Tankut Baris" To: Andrew Burgess , "gdb-patches@sourceware.org" Subject: RE: [PATCHv2 03/13] gdb: include breakpoint number in testing condition error message Thread-Topic: [PATCHv2 03/13] gdb: include breakpoint number in testing condition error message Thread-Index: AQHZK1iuNzBnlNNnqUe67ady9/nWE66leJ8g Date: Thu, 19 Jan 2023 09:54:41 +0000 Message-ID: References: <478a1e660361f1290c2dd8e9ad999d59d0ad3dcb.1674058359.git.aburgess@redhat.com> In-Reply-To: <478a1e660361f1290c2dd8e9ad999d59d0ad3dcb.1674058359.git.aburgess@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB7303:EE_|CH3PR11MB7370:EE_ x-ms-office365-filtering-correlation-id: 745893c0-8afd-400c-ffc1-08dafa032f7b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j56XdqirKFlcViNcPm8VGfvtMpc/7KylLCDO27SJL786wJUT8paXKrkWX0/l3zNAeu4gccfyc3Di/zJkJR8aEcxYJ+qN1fifFKFl/Hw39gyevEEKnbWtbqNUns0XbYhFte2sxF/lL4OJzHplYHRQB3I4MBZU3tcL/VsRELsS8nPbj0TWEKr81FcfKQe5EYeLhvKVsz3/3uCrXEEioijN09KfkkjCjUU2YMILAfA1zeyN3K8v1r1bxjIxU7rCLlEnuuYgEjKUnbCgrMQlRa3TZejZsWnuSbh5YnHt775gSUujBOvdD2dzoddvfCc2m6JwFibksAd7FSIQ3+hEGx8cL7XhAxH/FFJuc+UVQwvVENpMwJ2hY4zVAjGx4YsWqVl0oHjXzlHngZTt4wB1DjJ1YGo3FWc6m+uH6qaw4KLXdJsLOAllmdOQOzzQhB/hkTB/yGrb1HC0PQ3nnV1pj2A7zBk7YFIiA3HjLccpKE7IlVqGS1iAhVBfNXlVJMWFtbodKH8nsdDRVEco4t9m5GQ3DiVjIbiekk3CFy/wRIv4mpoDKMCDIdR108Bk6tNxra6CRHbRZ2SbBocRRV910wsaCesl69+UmqETp8ra2B+HpurGmSnII9txT7BYvhlhkJEKqBdmTQMx652o5tY5MvYSgZFra4OOjinORRNtBsy4gWTDDHunHx275p6THWL9ecr6lstZWj8bSU/Jce4estcTLsjzlZO5/R6oPnasiuOFHJhWE9noe4uqbEj/etgQq4SW x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB7303.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(376002)(136003)(346002)(366004)(396003)(451199015)(38070700005)(6506007)(33656002)(86362001)(76116006)(52536014)(66556008)(15650500001)(55016003)(5660300002)(8936002)(2906002)(66476007)(82960400001)(38100700002)(122000001)(66946007)(316002)(64756008)(110136005)(7696005)(71200400001)(53546011)(478600001)(41300700001)(8676002)(66446008)(186003)(83380400001)(26005)(9686003)(2004002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?K2m6L+ChZojSmPO0A4Z8/05SbvtsJQfdvXZBsvMB+dsA5XRKJYZyD8ZegOLP?= =?us-ascii?Q?IqMT1FA3iFxoKlnsUzRSTKOQfeo89JdDrVv1aFKx6U2B9ePIlubkQy5mNuRS?= =?us-ascii?Q?Jjmsvc0ewsbZEdR7oUHjfz6sp3LceNB+uXC7T3fbUHOe3HLzJO0I+/4sAbIs?= =?us-ascii?Q?xzE0Vgfr5TRfaw2w6cOYm9Ai0mXBccvP/1njX3lgiV61/LRmtCqXUJoaDg3W?= =?us-ascii?Q?OXEjeYRb3YxR+bP1vlx1xnRjxr7eYpGlhHYJWlcCAd6y6mIbSawWS1lvoZae?= =?us-ascii?Q?+cGymqecGpgHwWqWtbHGtxU+71aQpizCgUpA6bz4zqvaF25jLkj+7ZUyFEDt?= =?us-ascii?Q?cQeNp8NKVCP5DCAwSbcvYZiJTBoQsDNIRdMpbpy3c4HbhisuNLfSjYiEvOQX?= =?us-ascii?Q?8n7Pd2kZBuEMrG5DzEAwSf3uURb8NgJ5Cr4d3dWlB6WlBunJH96kN1ZCc2Ph?= =?us-ascii?Q?dejBEo7hnfPaRjiU7uWzc5vr6hX50jrEPRT2GkPRbSfpt+S05CBIfIZwz2Hh?= =?us-ascii?Q?IZL/EYqjBnaLWVlQhqG3DR3vbJ8hb2CepIKFp0yOzkP6RvcpugGRF3ONBvcq?= =?us-ascii?Q?UTgbSfsdkMRoCoU81MQXkKRhr9L8RFOoisGUgkreFhG7GvV2j6nm92DmWU1W?= =?us-ascii?Q?t92zmLnh9c6sgSGcxX/ZI50cu4zizUa1bQXgp4nJ7VlOC+LraukPD4Zjl3MC?= =?us-ascii?Q?A8m2JUexCphBJj7xtO+rKvoxlYYZ9AH9n1RScpI6cmVi77dRiVW0ViD8jMGy?= =?us-ascii?Q?VjTqbUTcnxCa7B3KXbDPgI6qGXiXcA/TCuBQALnXHaHptn9wrp7kuqK4n48g?= =?us-ascii?Q?c+h2sO9nPN7YtkEW0Yt1RsWzV4dXqnK4RvOyRRSrZGdsjKBfBqYTFDTAAinZ?= =?us-ascii?Q?rfBuXPJO7/sesQ1krNR6ch5ODns79OczhfHNLe/xZvZr/GOkk/JIIUhLf7Ns?= =?us-ascii?Q?f990FTEMg0gumpNDYotzkz//bk/Oh5W2+lLNGMa+82H6MklNPUItDoykd3HM?= =?us-ascii?Q?P8rHY/1Y0zU1ED25yEH2sphupBijweZLrm5Z27AxJ5owlfjY7pW4yWvm7Ftt?= =?us-ascii?Q?r3FRwykZOMnWOJ9hlo8nK9xy4M4mAR8pJzxALKzEyrnnVNP20oySiw+BqEbr?= =?us-ascii?Q?NzEeJ8rpNezV5smFSPlZkNnsmGZRqrqxiqvehihKp5ghnea2xkccJqyG8LzJ?= =?us-ascii?Q?UTmemzGEq8sNFZlJzsL2a76vspvFdfzLjvc2NfVYH0IPe8L776ozIrvcJKFA?= =?us-ascii?Q?DAbqI6CYP+WgvWVBIII5VNCQD6cwtpv8lJrPziUFz4pFg9xEVyG2X69A+equ?= =?us-ascii?Q?Xu+tVegZe1uW7hDwHYUi20yOUI803m/gg3TSk6qdMf6oEY3yAr4DUqbnWWWV?= =?us-ascii?Q?burxCEIgcarwhAO/QZyQIzAnA4ZFk0Zth9J1ADD9AqJG+9OHi4Q746Uu8BnU?= =?us-ascii?Q?jIDcA+EAoZiG0h81qQoWDfN7pFi/z93Gq1fham5x8hGvbJYvSA2mwqcvvCR1?= =?us-ascii?Q?XaH6wwnCY5drrFosnRRV6WEBSzUMKiMissl7OlIWQJFBL+8O7O3ItlTVEP8i?= =?us-ascii?Q?UmaU/B1uKvzTqC22/APQOy8Mz1HJs29f+ktvO7+5EWUU6t6VWYYKwnDoRYwX?= =?us-ascii?Q?lA=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB7303.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 745893c0-8afd-400c-ffc1-08dafa032f7b X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jan 2023 09:54:41.4691 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: auf38LHGGbUB86olmXfrQTwwI0rWRLPBkwpmsqeYCxpH+4wNWvjjGhByHJ4aGWhOvz5D8texygXGE68xWcJGr4TQr1lSR/EompAMiE/aZq4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR11MB7370 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,TXREP 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 Wednesday, January 18, 2023 5:18 PM, Andrew Burgess wrote: > When GDB fails to test the condition of a conditional breakpoint, for > whatever reason, the error message looks like this: > = > (gdb) break foo if (*(int *) 0) =3D=3D 1 > Breakpoint 1 at 0x40111e: file bpcond.c, line 11. > (gdb) r > Starting program: /tmp/bpcond > Error in testing breakpoint condition: > Cannot access memory at address 0x0 > = > Breakpoint 1, foo () at bpcond.c:11 > 11 int a =3D 32; > (gdb) > = > The line I'm interested in for this commit is this one: > = > Error in testing breakpoint condition: > = > In the case above we can figure out that the problematic breakpoint > was #1 because in the final line of the message GDB reports the stop a > breakpoint #1. ... > diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.c b/gdb/testsuite/gdb= .base/bp-cond- > failure.c > new file mode 100644 > index 00000000000..be9d1fdcf2d > --- /dev/null > +++ b/gdb/testsuite/gdb.base/bp-cond-failure.c > @@ -0,0 +1,30 @@ > +/* Copyright 2022 Free Software Foundation, Inc. The year now has to be 2022-2023, I believe. There is one more case below. ... > diff --git a/gdb/testsuite/gdb.base/bp-cond-failure.exp b/gdb/testsuite/g= db.base/bp-cond- > failure.exp > new file mode 100644 > index 00000000000..6f89771d187 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/bp-cond-failure.exp > @@ -0,0 +1,83 @@ > +# Copyright 2022 Free Software Foundation, Inc. > + > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# Check the format of the error message given when a breakpoint > +# condition fails. > +# > +# In this case the breakpoint condition does not make use of inferior > +# function calls, instead, the expression used for the breakpoint > +# condition will throw an error when evaluated. > +# > +# We check that the correct breakpoint number appears in the error > +# message, and that the error is reported at the correct source > +# location. > + > +standard_testfile > + > +if { [prepare_for_testing "failed to prepare" ${binfile} "${srcfile}" \ > + {debug}] =3D=3D -1 } { > + return > +} > + > +# This test relies on reading address zero triggering a SIGSEGV. > +if { [is_address_zero_readable] } { > + return > +} > + > +# Where the breakpoint will be placed. > +set bp_line [gdb_get_line_number "Breakpoint here"] > + > +proc run_test { cond_eval } { > + clean_restart ${::binfile} > + > + if {![runto_main]} { The other if-statements in this file put spaces around the condition. > + fail "run to main" > + return -1 > + } > + > + if { $cond_eval !=3D "auto" } { AFAIK, for string comparison, `eq` and `ne` are the recommended operators t= o use. > + gdb_test_no_output "set breakpoint condition-evaluation ${cond_eval}" > + } > + > + # Setup the conditional breakpoint and record its number. > + gdb_breakpoint "${::srcfile}:${::bp_line} if (*(int *) 0) =3D=3D 0" > + set bp_num [get_integer_valueof "\$bpnum" "*UNKNOWN*"] > + > + gdb_test "continue" \ > + [multi_line \ > + "Continuing\\." \ > + "Error in testing condition for breakpoint ${bp_num}:" \ > + "Cannot access memory at address 0x0" \ > + "" \ > + "Breakpoint ${bp_num}, foo \\(\\) at \[^\r\n\]+:${::bp_line}" \ > + "${::decimal}\\s+\[^\r\n\]+Breakpoint here\[^\r\n\]+"] > +} > + > +# If we're using a remote target then conditions could be evaulated > +# locally on the host, or on the remote target. Otherwise, conditions > +# are always evaluated locally (which is what auto will select). > +# > +# NOTE: 'target' is not included here for remote targets as a > +# gdbserver bug prevents the test from passing. This will be fixed in > +# the next commit, and this test updated. > +if { [gdb_is_remote_or_extended_remote_target] } { > + set cond_eval_modes { "host" } > +} else { > + set cond_eval_modes { "auto" } > +} > + > +foreach_with_prefix cond_eval $cond_eval_modes { > + run_test $cond_eval > +} > diff --git a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp > b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp > index 182b2f25faa..f400fc03b28 100644 > --- a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp > +++ b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp > @@ -18,7 +18,7 @@ > # > # (gdb) continue > # Continuing. > -# Error in testing breakpoint condition: > +# Error in testing condition for breakpoint NUM: > # Selected thread is running. > # > # Catchpoint 3 (signal SIGUSR1), 0x0000003615e35877 in __GI_raise (sig= =3D10) at raise.c:56 > diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.bas= e/gnu-ifunc.exp > index 0a435806409..22462bea233 100644 > --- a/gdb/testsuite/gdb.base/gnu-ifunc.exp > +++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp > @@ -281,7 +281,7 @@ proc misc_tests {resolver_attr resolver_debug final_d= ebug} { > = > # Also test a former patch regression: > # Continuing. > - # Error in testing breakpoint condition: > + # Error in testing condition for breakpoint NUM: > # Attempt to take address of value not located in memory. > # > # Breakpoint 2, main () at ./gdb.base/gnu-ifunc.c:33 > diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp > b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp > index b6bd7a63c8f..e5a46874afd 100644 > --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp > +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp > @@ -188,7 +188,7 @@ with_test_prefix "finish in normal frame" { > gdb_test "python TestBreakpoint()" "TestBreakpoint init" "set BP in = condition" > = > gdb_test "continue" \ > - "test don't stop: 1.*test don't stop: 2.*test stop.*Error in testing br= eakpoint > condition.*The program being debugged stopped while in a function called = from GDB.*" \ > + "test don't stop: 1.*test don't stop: 2.*test stop.*Error in testing co= ndition for > breakpoint ${::decimal}.*The program being debugged stopped while in a fu= nction called from > GDB.*" \ > "stop in condition function" > = > gdb_test "continue" "Continuing.*" "finish condition evaluation" > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 68337bd235c..f51332b0177 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -9332,5 +9332,13 @@ proc has_dependency { file dep } { > return [regexp $dep $output] > } > = > +# Return true if we are currently testing the 'remote' or > +# 'extended-remote' targets. > +proc gdb_is_remote_or_extended_remote_target {} { > + return [target_info exists gdb_protocol] > + && ([target_info gdb_protocol] =3D=3D "remote" > + || [target_info gdb_protocol] =3D=3D "extended-remote") Here, the same comment about `eq` and `ne` for string comparison. > +} > + > # Always load compatibility stuff. > load_lib future.exp > -- > 2.25.4 Regards -Baris Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928