From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by sourceware.org (Postfix) with ESMTPS id 06BAD3858C50 for ; Thu, 16 Feb 2023 10:47:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 06BAD3858C50 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=1676544428; x=1708080428; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=X+zsdehbYbdKKxwqEMpAF5XN8JMKmiur1XzxHesvZAs=; b=jSURMBxdWxtsaqObKLN6BMQ1Qc5PbJq7aFJM4OP3E0Rcdbd0DYLAuAnp t2iPWL/EZWQZeCz2kzCiX3w8iYpxX2bQ44S/jfTaemteXPzPPrMEoOkIh T6N8Xo51VaJ9+an7HEtoTRW4VoTIsR2v4TlQDjI6gNZ29mgW2V6L+6X4s TGgY+LdsmGGwTYGwsY5JE6aktyIHcEaGBMeigJPsqsX4Qkh70QVker9sD s8V0l0hrY+qZwWBIIfjBBKPztjCIdpOSlqf43mlKgNf7oWNSsSxIVOK4I H9Qs4OZzHaKMLbUAvPKwT2T2Y47hgOEcbmRLap4/O4Gp8nP5X6kwLkRM/ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="394111005" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="394111005" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 02:47:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="619949044" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="619949044" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2023 02:47:05 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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, 16 Feb 2023 02:47:05 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 16 Feb 2023 02:47:04 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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, 16 Feb 2023 02:47:04 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.48) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 16 Feb 2023 02:47:04 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CG4+syEaM416rAZh9nlWeTVsAlVwiT6AmahbYDc0eRg85k0QEIAzT9XfICSNc79/8bXJ8BCDNyM8Ut5CDx9a5o0hHCTdx6kP0cBhos1C+y7yA/K8q03Wuh+7DM7tvxL2q2PY6IGLvzAFhx8QXK5uyHXSzE0gNeYlNhvOTGv2VNUDyckIu3+5ASx9Y1M6ZaHEsrMb/hARtFW6Aq2k3l9xiG0ive4vNSJrJjHMiTHk40BOz7vC7BjEqnyjtsPSErhQJsChzfa67CPwWr/Z5/eeHJFAiBf39Zg/egvPYgXiEqlEeP9CUhztJBOMllVrGzp7hLuR5PbtD/WkGkqOJpWhHg== 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=DfxGyBYZ6TH+I70rSDUGmfpMtgiTYJoLkmBeMIAZ1eM=; b=Ej7840y6V16xm/e+ymkX0dGim3yCuJZpyWKgMLGPcTmte5iWR21K9PaRgMIfviAlfECDhLLlillrvyAeuBQkQgnQVOduR8rmYE5sHVffdFPrYRAueYrScNjFIIHYp4Xx1mufYGtvSWOLLce7uJdIbxrmSZs2BudMHfN2YX4VDcA9e7H39aQul69ZhVBHdNYMY7EvcXutC74al+PJQCasMXYo1Lu4mZpqTOajoWPfJFOqQ9jB/8Ptv9ilOztDy3NcmwoOW8k1zduI2IogXcLUrlUJpDTx3Yo2klDqwFX3p3XtRcKcI0G13GznCfiJWaDA1TPsGN8Yem3j8d37wUfO7Q== 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 PH8PR11MB6949.namprd11.prod.outlook.com (2603:10b6:510:227::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.23; Thu, 16 Feb 2023 10:47:02 +0000 Received: from DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::dec6:d57d:f767:c5f2]) by DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::dec6:d57d:f767:c5f2%4]) with mapi id 15.20.6111.013; Thu, 16 Feb 2023 10:47:02 +0000 From: "Aktemur, Tankut Baris" To: Andrew Burgess , "gdb-patches@sourceware.org" CC: "Saiapova, Natalia" Subject: RE: [PATCHv3 09/13] gdb: fix b/p conditions with infcalls in multi-threaded inferiors Thread-Topic: [PATCHv3 09/13] gdb: fix b/p conditions with infcalls in multi-threaded inferiors Thread-Index: AQHZNZljlfAnpZIs206PrpCE+veQZ67Remnw Date: Thu, 16 Feb 2023 10:47:01 +0000 Message-ID: References: In-Reply-To: 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_|PH8PR11MB6949:EE_ x-ms-office365-filtering-correlation-id: 29b1ba12-969b-4f2a-4c74-08db100b22fc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tVHsmfXVFw8VUJd9PjHitcbZsHvgx+xBknzVj5mSbSD7fyr2laBetl7JcjR9u6rJtvrLCmPUtVlwIfb8aqcGccbxzgsls6/b1beG/CqXQH5c1uYCoxmwyETcckmG2/Kr8pVSNqKefeYSQudMSwHcRoCxj51WtVLvkyo7d+29lSjx5D8yL6mpjvB82fFcpF0C6E9uyuYmyR4E0KQD8JrEqTxefv01no9zf1lw6LKZI39eCOmBv8z/QyfEpPoJaUjQW+QGWj7DuuAOpRi5rntHZVAt7UIvo8BQMyMigJleMaIw06LFZoYB0WIDOzEa+zh2pX6FW3mEK/wyfFTGCxoRPsM7xKea+ilpkNiX2ov93LoQM90AGiRmEQhGv/Y2/fgtZJHZkS0XRJ8BaRvafr2OjU++rJMHUN8EaaH9YpqyHyv2uYWlcMDuHiGshgATEmBZMa9Kvb1CZ84z+gEbtzjJDi9BZzP0uNzQtpW1frcYvXSbF2xCU0Vcf//l6XP70d4TP4x2DzoEcIgxKQ61QC3oADshBBUMwcB4tLsf1G7a+FsSbHGrVtOo2i46Z87SEtZnTgbo9JEx52X+45uIFkbwavCaRgqXf2YJA7JNGtqCJyt6Udscsdrmse/CYFSVzMFnfGUP3BQ4QEGAKs87uF5RWcHw8mTt0erbey/qB64ORl+R/KNCSK8AiL7Xt7aYvsO6RFC/yK+Cpk0xsH9UBpH83A== 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:(13230025)(39860400002)(136003)(346002)(366004)(376002)(396003)(451199018)(82960400001)(122000001)(7696005)(38100700002)(33656002)(86362001)(2906002)(26005)(110136005)(53546011)(6506007)(76116006)(9686003)(316002)(38070700005)(71200400001)(55016003)(41300700001)(64756008)(83380400001)(66446008)(66476007)(478600001)(4326008)(186003)(66946007)(107886003)(8676002)(5660300002)(8936002)(66556008)(52536014)(2004002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wOmagafND/8BoQ7+J0cKYJ1A32nG5Y5svsKh0whHO83MWCebuKCgzyDTU2b2?= =?us-ascii?Q?xlEi0qylh5HzCypMoYO6OtBzXfiSnqZfdWMaJ7ISCcWOIWMHSPq+DrO3Uddd?= =?us-ascii?Q?0avHoHtrsm+IzfQjM3h1/D5hwqeYhgV1apSfBWLf4XmXLD/AT8wQncD3FpFD?= =?us-ascii?Q?DK+Ve1rIJ4oYETlnTmKrhBhv11a2WFzNrsxVCqElYBfZTHDU93hVbau3mPRB?= =?us-ascii?Q?exV1YowKxDfrmj/AzR8UittQvVz9VdZg3otIEPgtbWvnycf5IEp74HzD9+fZ?= =?us-ascii?Q?vRUTjXJ6xUOS2XL3AQ34BAYf26QoSgynX+RAftBNGrhKiqGrFsSwtyKdrxFN?= =?us-ascii?Q?NraIsdC6ubiUQLdzduwR7nPp7jRR0VpP2mNV0IXMKPVJPgzHaxocSFLMZLdB?= =?us-ascii?Q?5lz8Xz0ZhbyurE0PEy8KXdLqql2657B0cTAUr9iye2xc94IhPNQNgav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VGylxemVvkpj+TxQLZsHdX2WJD38/SXr6ptIrlmVg?= =?us-ascii?Q?sxw+2EgSALBX7wT6smiRS8gxeYR3EMlNpzX2w1L3BytNFv2+x44WMrJjXw/d?= =?us-ascii?Q?K+XhP0UCaMASzM6Cp688tS74/EWqtzZLfJ5Gi0uaICLC87PU0LsNhDVxxwge?= =?us-ascii?Q?HN1z0vbKXlarnQ9vLUknZBSKTLYsVL+J6krnTC8lTuAasIqFrQrJzK+Zfx4R?= =?us-ascii?Q?yFUAOMJ0jZCbV3CU0TNxeCLfaP21gQ78ynN5UhuKd2rzFis675YXy4An/jtl?= =?us-ascii?Q?QA=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: 29b1ba12-969b-4f2a-4c74-08db100b22fc X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2023 10:47:02.0076 (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: qW/CaIYG2GL6N370GTvSn4rGqs7TbZpXg7a+S1KF3C2N6pW+AcJdbdoR9BpeNRPEVtTniAa6rBibUEH3DNMfIX9sCUGN7Z5qtyYtDX+xgdQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6949 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.7 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 Tuesday, January 31, 2023 6:27 PM, Andrew Burgess wrote: > This commit fixes bug PR 28942, that is, creating a conditional > breakpoint in a multi-threaded inferior, where the breakpoint > condition includes an inferior function call. ... > diff --git a/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-= event.exp > b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.exp > new file mode 100644 > index 00000000000..fe9aeea97f7 > --- /dev/null > +++ b/gdb/testsuite/gdb.threads/infcall-from-bp-cond-other-thread-event.e= xp > @@ -0,0 +1,175 @@ > +# Copyright 2022-2023 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 . > + > +# Test for conditional breakpoints where the breakpoint condition includ= es > +# an inferior function call. > +# > +# The tests in this script are testing what happens when an event arrive= s in > +# another thread while GDB is waiting for the inferior function call (in= the > +# breakpoint condition) to finish. > +# > +# The expectation is that GDB will queue events for other threads and wa= it > +# for the inferior function call to complete, if the condition is true, = then > +# the conditional breakpoint should be reported first. The other thread > +# event should of course, not get lost, and should be reported as soon as > +# the user tries to continue the inferior. > +# > +# If the conditional breakpoint ends up not being taken (the condition is > +# false), then the other thread event should be reported immediately. > +# > +# This script tests what happens when the other thread event is (a) the > +# other thread hitting a breakpoint, and (b) the other thread taking a > +# signal (SIGSEGV in this case). > + > +standard_testfile > + > +if { [build_executable "failed to prepare" ${binfile} "${srcfile}" \ > + {debug pthreads}] =3D=3D -1 } { > + return > +} > + > +set cond_bp_line [gdb_get_line_number "First thread breakpoint"] > +set other_bp_line [gdb_get_line_number "Other thread breakpoint"] > +set final_bp_line [gdb_get_line_number "Final breakpoint here"] > +set signal_line [gdb_get_line_number "Signal here"] > + > +# Start GDB based on TARGET_ASYNC and TARGET_NON_STOP, and then runto ma= in. > +proc start_gdb_and_runto_main { target_async target_non_stop } { > + save_vars { ::GDBFLAGS } { > + append ::GDBFLAGS \ > + " -ex \"maint set target-non-stop $target_non_stop\"" > + append ::GDBFLAGS \ > + " -ex \"maintenance set target-async ${target_async}\"" > + > + clean_restart ${::binfile} > + } > + > + if { ![runto_main] } { > + fail "run to main" The 'fail' can be removed. There are other instances in the rest of the pa= tch. 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