From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60126.outbound.protection.outlook.com [40.107.6.126]) by sourceware.org (Postfix) with ESMTPS id 767B53858400 for ; Thu, 22 Sep 2022 13:22:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 767B53858400 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=xmos.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xmos.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z9YBgREbTkLkfsMTWBgYRSV5pYlRQTyZR4XBuVb0l8UzM/9zzk19cb1usSqjJm7Gd0crK0yOOL/1vKERWDOqfSYRvXKSYR/Bg5RKwUNssndK/VY2fDU6VENjghhbWAHktuv7Uey/VRKM27Oumz8gLEOqy+Th3Vi1qhQSbXtkX+yntDfmnRPr682DaF/LhnHCwcVDSx1TIamHaup/v0u+lpJdhHZ0YO52i+/GwwA+xTvuK9nqxgqfpMWy7kSNCpKJypuknNNxAUJ7phSGQy/uFilx7fy8D6v/eqwDsTBuladkV3KkhVdZxkInUraH9iUmP+U3Bm9MH4BoRhSGSKnq8w== 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=jn5wOcR/K7YmDanhHYLZdndm7Mfv79D27bLJC1doios=; b=HeyP7ir6+8tnfP7TQaMTY6ch9Es1veSODcb58YAUZ0mNrgeiF1T0CQserT5ZQUhupPuuEZ+qTakkLkKBmwUXJqVqTCNyoN1cFW4IjALNG0NZg7sauwJ2cR7Pg6BeuAnRNLwbDmUp5pagLt20LjQO0u/7LuPGHGRTvxzuqRrc9wgqKRxy2c0/XyvWyCiShZq2DOIG/gYlPKz2FVYnUAibieNCPOM0I4v7nHaJrC2P8F7rzVKu/ce+iHv9Zt0EwCridWlv4SVgRvCSToMPss6sL7z+RP3dxJe516GtwF23cUTewNfbdU2480XIg+iCBRtZOKRML5bAswFqqwiarXkbpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xmos.com; dmarc=pass action=none header.from=xmos.com; dkim=pass header.d=xmos.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xmos1.onmicrosoft.com; s=selector2-xmos1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jn5wOcR/K7YmDanhHYLZdndm7Mfv79D27bLJC1doios=; b=SInCmBQSjYHPCgh8LKBcN6cWZOTZSywJAMSc2W5Houaf1Qzf+ZPW25qJfvtfWToJjnoQnJ/45YWA0G13NhDg2N2VHzCpmtcY0fGSWCYB4AC1XVRlj7Uc5rCnLQ642x1+WN2OWTAFhl5ctWblDXqW+dMcHu7ZyprMEp0M6hmti2w= Received: from DU0PR09MB6046.eurprd09.prod.outlook.com (2603:10a6:10:409::11) by AM7PR09MB3816.eurprd09.prod.outlook.com (2603:10a6:20b:105::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17; Thu, 22 Sep 2022 13:22:56 +0000 Received: from DU0PR09MB6046.eurprd09.prod.outlook.com ([fe80::e4a6:102a:6b54:529b]) by DU0PR09MB6046.eurprd09.prod.outlook.com ([fe80::e4a6:102a:6b54:529b%2]) with mapi id 15.20.5632.019; Thu, 22 Sep 2022 13:22:56 +0000 From: Ciaran Woodward To: "gdb-patches@sourceware.org" Subject: [PING 4][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Topic: [PING 4][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Index: AQHYoELE6TsD4VW2AEq8KrJPBohV2K3rzFSQ Date: Thu, 22 Sep 2022 13:22:56 +0000 Message-ID: References: <20220725162231.4473-1-ciaranwoodward@xmos.com> In-Reply-To: <20220725162231.4473-1-ciaranwoodward@xmos.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-bromium-msgid: 6cf9a436-b133-4444-af11-86dec3e265b8 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=xmos.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU0PR09MB6046:EE_|AM7PR09MB3816:EE_ x-ms-office365-filtering-correlation-id: 3b7dbf5f-5a27-43a7-304a-08da9c9d8fd5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aD962SIS4Jg+cSGMyF1JHBy05801FnGDETqW1H6mp46X7p2k1kvYL5BP51d7sJaG1oAXO8qdSChT/3zePi07JIPicgMqIj87Cqb+/mr2JDXk3WFYyMRHo3yJMdVle14yVVSkbSwfo0iCu0jglllMIFejLrKAPM8YwvdPHpZRYLSIb928/Ys+v8EMI/C9UNic5BiZClz1ev72b9yafmdDe2oF8XLk+MkGA7jJ3Ix0A/MVUtqBgHXF/W5v98Co4Ko9oW/xerKKRCpHtGAjjClcEHZa5pI6L5WiZXFXCxhAvuQH9Ry6cTOUsV7x8KPMaJvDcC6Ce0ZFixdVw2NmSJTF4sbB+PtN8LzyeeIIYha/FjcuSYLHg+ymwoTJ9AOBBWbChKJH4B4sf+Wtr8yXOB86yuewLA350tcxeVUFTaaNLQ5eK2v0E0Grv3uRqxvoNXZTYPMdcXgJrdiJOmUMG6oiqwotDTIqe4pXNLcNKFcBIS22EGwffgTDli1EBPaY7Z/2F2vbGWQNrc9bkCiQu2BrB5akEkYV8Dq8qD1fKBpJbkxLuHlgOtWYQm8+1Hw0OGOJ9pFFCXglYKWwgDkFxf/Dq1loX+uV1/fDHrqRF5KWkbymbFXJ3ICDNWseaWq6PsphYDp8eA3UuKcDWp/u4ZtkfRy0J6s2lxjhdlATMsvWv2QQM6FavniqimiShXZpvywGPw/dapxIotQ0fpsFs2sJzm/rK37icczW1/nxEhqsenZpag7mhhbdaswE4SOYSb2QPPNpkJAAUjLV0FP6bOTj2aLn5O/DibQ9z8Fml/K7HKk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR09MB6046.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(366004)(396003)(136003)(39830400003)(346002)(451199015)(478600001)(71200400001)(6506007)(6916009)(26005)(9686003)(316002)(53546011)(186003)(8676002)(7696005)(38100700002)(5660300002)(86362001)(66476007)(64756008)(2906002)(38070700005)(122000001)(76116006)(66556008)(55016003)(83380400001)(66446008)(66946007)(966005)(41300700001)(8936002)(52536014)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/pobNHJi1tNK6wo8eu3zTordLRdQmKdwxhCSvgbGPlOCTALwkFklcVhq5Rij?= =?us-ascii?Q?w1bka73bw9UOFbEtobhlt33bJMtHUKpOJsSkWx3mV+cBUk7scK6q1NlPIYVA?= =?us-ascii?Q?L4arKQPCQ63EyThJ1971mrLngrxlBvC8DQlkSRodQhAwp699LYUNkPxumr5H?= =?us-ascii?Q?EnnxyNJqxmZCylJ7DKkBBZyrIqn8ZOFxpe/MJtO7A5RULLpxF4Am5MNpz5vS?= =?us-ascii?Q?Wc67Wbng/0noRPO5FGclIeVN4kTKiv+Ibxj35zIwLpGLtSnHZQJkWO76RgKp?= =?us-ascii?Q?xkMIVfmMB6g4bVfZqqRj1yQIyhMUHt5KoIJorVNM7rdQWIfmJYPU3QKyPvyP?= =?us-ascii?Q?STucZdkqPEVUaXa9pRDzqwbAnUfvY7qGxP70Ch0mIGRa2hfKw5mMxEcx3QAJ?= =?us-ascii?Q?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R48IR414A7eS8go2Ur?= =?us-ascii?Q?mRC1ZwJUXxrD7ZDyidadmyqHBX4jSRlzRAZnxhNnjTXKuaqW+O9jTDljlJDt?= =?us-ascii?Q?vjB03A/7gwn4JfXK/rNB+4sxSCiAY5OVrJQhfPwJ0qaNJfN271kbBtQnMhrF?= =?us-ascii?Q?nDPPZ7Dnw2wdekgVw+jLSklpWVwbTMqHoMPzmoz7/Utg3b6iRqlTJ/8BZT9N?= =?us-ascii?Q?zfGc64aTYTRU3WjotTlsELW2mKJPrhjaMDdIMZRJ5NcBbN3HLR7DtGOKvni0?= =?us-ascii?Q?zdEAjF0wfxj2EC1a3p354JclMNzO4L6klynM6gzc?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: xmos.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU0PR09MB6046.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b7dbf5f-5a27-43a7-304a-08da9c9d8fd5 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2022 13:22:56.2789 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 975ecfb1-4080-42d2-a01d-4a4d0707a539 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cwGBd6NgUa5Nq0lMCSE9fdZd7oZbCo9+Jy7X29exgZOptReOVbPKoAR8UV7hrrESTK8eV3ccARa6uo1P2LQZaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR09MB3816 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2022 13:23:00 -0000 Hi, Ping 4 - this (or something similar) is required for working with multiple = inferiors on a remote if you connect to the remote while the inferiors are = already running. There is a reproduction description here: https://sourcewa= re.org/pipermail/gdb-patches/2022-July/191092.html Please let me know if there is anything else I should do to help move this = along. Cheers, Ciaran > -----Original Message----- > From: Ciaran Woodward > Sent: 25 July 2022 17:23 > To: gdb-patches@sourceware.org > Cc: Ciaran Woodward > Subject: [PATCH] gdb: Fix missing first breakpoint in schedule-multiple > mode >=20 > Rationale/background: > When using schedule-multiple (sched_multi) in gdb, all inferiors > are set to continue when the c command is used. However, before > this patch, only the 'current' inferior would have its > control->stop_soon field cleared. This field causes certain stops > to be ignored, and is only intended for initial attach. >=20 > By not clearing this field before continue, continuing with inferior 2 > in focus and with inferior 1 hitting the next breakpoint, would cause > gdb to ignore the breakpoint and any attempt to stop the target with > Ctrl-C following that - even though the target was already stopped. > The only fix was to quit GDB and restart. >=20 > Solution: > With this patch, all inferiors being resumed have their > control->stop_soon fields cleared, so gdb does not ignore the > breakpoints of any inferior inadvertently. > --- > gdb/infrun.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/gdb/infrun.c b/gdb/infrun.c > index 543cccc5311..894157ed1d1 100644 > --- a/gdb/infrun.c > +++ b/gdb/infrun.c > @@ -2808,18 +2808,18 @@ clear_proceed_status (int step) > we're about to resume, implicitly and explicitly. */ > for (thread_info *tp : all_non_exited_threads (resume_target, > resume_ptid)) > clear_proceed_status_thread (tp); > + > + for(struct inferior* inferior : > all_non_exited_inferiors(resume_target)) > + inferior->control.stop_soon =3D NO_STOP_QUIETLY; > } >=20 > - if (inferior_ptid !=3D null_ptid) > + if (non_stop && inferior_ptid !=3D null_ptid) > { > struct inferior *inferior; >=20 > - if (non_stop) > - { > - /* If in non-stop mode, only delete the per-thread status of > - the current thread. */ > - clear_proceed_status_thread (inferior_thread ()); > - } > + /* If in non-stop mode, only delete the per-thread status of > + the current thread. */ > + clear_proceed_status_thread (inferior_thread ()); >=20 > inferior =3D current_inferior (); > inferior->control.stop_soon =3D NO_STOP_QUIETLY; > -- > 2.25.1