From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80128.outbound.protection.outlook.com [40.107.8.128]) by sourceware.org (Postfix) with ESMTPS id C284A3858D3C for ; Tue, 23 Aug 2022 16:30:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C284A3858D3C 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=WD76o9OUPlvsqdgaCtBjNWuK1VrlYRMpeZ3xGca6QYC4SXj3V2pMZ/gZNosBvGxZsmyBaBPNmKNrylyBg1WmEDhq8E5nw+GWWb7PhGliVDT5AOyfPzckb0uBi0RFsMhPXTStwnPQACD8tSBAgawdssD0Z6uBXfxEOlgU/y/Sf31iTz5+0M+VJj0VD9x5iv5MOSkKI0u8s7mxQB7SetKlv+bZ1riUEjAyx5LmzfCowm8qY9HG+19CHavCT6EDoPOuQhwZBOsDMeXL8xKWJ3HhuLFuKchLiW8qAg+yQWfVFGB/M8A/tBTE2NvnOwIeQapeLRzJ4v78UP+fX1l34RD/Iw== 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=qTvlCoH9yoQU1lITdBvCpnk9zlidG6BpJfrBL0QqaK8=; b=f+KTWMBxC2y33uRE4jwZnf4bIKi1rSXPtvaclTT3bmsiEe2JhKQvTqgaTkGsLh9jgZDS95DfnW9jyfm5B6aNeU79TQpGwAP6a375IAgJHdQKz8uBsIcOayOt+3nmpxWx4/8RjGUoMNm2ytgKjFVh9PVVC45Iw3187j+6EVUyTFD6wYGwr/uwC1KmmRH1jO8HrIv76JsNTn8Fi8p3KMMsbqIKpsT7ClfwWPjrgoRtrfN2TUijH/da3KsB5ruxw/yRnvJ+2nhjkUza9696hKQ42Qbzsr1F/cQxbOjVnsY4jvWEkZfGJiJtlRX1CPcDl9/ZC+6U+S/4i10b3blQdqFKAg== 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=qTvlCoH9yoQU1lITdBvCpnk9zlidG6BpJfrBL0QqaK8=; b=Yph+G4+b1m4nV5QbV/eW5wXoVmoN0Zi0Qam93hTTVpToleaA2Zy2Edpv2fuAkj0tLc2zTEfdbd3FItrLZ6hpxWBiesGlK7RcKmSWBVaKUNI9MNw2Dq8/HzvcTWEOILphyNoaw8C5pwqGyXmgt1sM0QI5nnFqHLERWBfioB4CC34= Received: from DB9PR09MB4988.eurprd09.prod.outlook.com (2603:10a6:10:26d::11) by PR3PR09MB5473.eurprd09.prod.outlook.com (2603:10a6:102:17c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Tue, 23 Aug 2022 16:30:34 +0000 Received: from DB9PR09MB4988.eurprd09.prod.outlook.com ([fe80::71f7:e3b2:6c17:c209]) by DB9PR09MB4988.eurprd09.prod.outlook.com ([fe80::71f7:e3b2:6c17:c209%8]) with mapi id 15.20.5546.024; Tue, 23 Aug 2022 16:30:33 +0000 From: Ciaran Woodward To: "gdb-patches@sourceware.org" Subject: [PING 2][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Topic: [PING 2][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Index: AQHYoELE6TsD4VW2AEq8KrJPBohV2K282s9Q Date: Tue, 23 Aug 2022 16:30:33 +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: 56833336-06ca-462a-9465-f8670dbe9ff5 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=xmos.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff0b2de1-5b52-4447-f5b2-08da8524cd62 x-ms-traffictypediagnostic: PR3PR09MB5473:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GMpmGUUtjOC9sHrzW8GPLsKTdS9RptXPo9DDa8VK+FzbOG4GvQ6wrKR1VpAyLxI9/PJwWSK7mGAB0t+jn6Dn0/KG8VjIofcNlMNrAjoH1fHt5J+dAQOBP92TUq8xZZEyKwHKbdpRsZOC83gcJR3FHmaFDfPpyGjxugM0O8M1NIR8iUb/GLGHxrNmAvtzvgGd4xsZoZZUEcq0ixcoi58QG53YV3TRT93QLJbpo9NB2YcRbCywWVJ/sFQdSNansqyaEYv0W4BFtVTCNnrPbNds4WnWdny0RD0ZA3iTbd9FZETyIOA9IHPv6+XgXDj3SuhIE2oQ4dwG8foojyTfzTyk9qzz1lZURxVrhS9ZtblSg00G1W7/gy0mfmVEd/Tcu9zWxi6CVQEqY8BBsGzGHSDAYTAgstsV66nFTUKnatW3Rd/ewn7dzMgru+yAn6sTsrCtyTSUW9o27Xdq/3ObFy4BY7+IkYth93aOuaQtYFM8mpdS8XMX73YvvkN2jnEBOF470IQ+EvuOBrK51TMNL7OAeIJFgL1MJg/FjQ3qTofyN5esXYCY8JWz90h9J3W2UwdLhRa0imAgdW8kHzuA1qDKJfXonEyVlaH2xkmKvwnyA2ScaCDJcAjx1JsXawRcD8DKBbc/YHCTWU72ljulCyBX9Fc8UkAwID3HK2f7iEstvrL9j0swVWNCSROcve72RhRtsINilf3qgsLhHpKpwP6Guh+HmW2ZGAs7HBTnGLCfoO5J11AsAv1lCw5TTomIrYKtW8+hF86PNtgAMKlzGrYOZP5j614wg2jJd7iHjGt4ekA= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR09MB4988.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(396003)(136003)(376002)(346002)(39840400004)(41300700001)(5660300002)(8936002)(33656002)(122000001)(76116006)(52536014)(478600001)(66946007)(71200400001)(64756008)(66446008)(966005)(8676002)(66556008)(66476007)(316002)(6916009)(26005)(7696005)(6506007)(186003)(53546011)(55236004)(9686003)(2906002)(83380400001)(55016003)(38070700005)(86362001)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?BNSoXJMNpYxVomTMAcYJCD6JGl9giuGL/StFQ/FFmYnoxt286H4lw7X0sQNT?= =?us-ascii?Q?Sj0fchT2BYdEODSdKfPNBMvkBkBsKbyqVP7DtCFxjNzRCO2ycm+AAW8tmmQ6?= =?us-ascii?Q?LGsf7kVXuPhM3qyr6IF/H1ESGLK+2xpCdxczA8eFN1LMdI+yq963XWon+lDU?= =?us-ascii?Q?dXKCTEVZWWG4rpPeOD7H1b6DsA5rUovUVlsx7Gr0MiIQd77oCi3k475wDp0N?= =?us-ascii?Q?Eluvu/COhcn5eM3yFPMHxm/8tUcv5U8rYmzLaeCAEejeEB4yP4q4uaDJcCcl?= =?us-ascii?Q?gxPbCL9U/Y0jErFIirmm3MBtr7fpwXAponG7MilQ99PeEN7aX81AeEcGwjSt?= =?us-ascii?Q?o0cDkoEzvJu8Zq6Ou54KODKq4pjoI6I0PonVx7HZDehShyY9zwrtWS+sdUcF?= =?us-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pikXe0z1+pfXlGHfrjI?= =?us-ascii?Q?JfVv7w8+zIAWexISYTopuxXc5f6+5IqdXyyF/inwV+HhLPgZxaAJFJg/9h8y?= =?us-ascii?Q?5KqrIuGRkeD4Kj3uOd2sClPIkqmg9t21e11ByC9a/7QdyislIjEZAFTSltSI?= =?us-ascii?Q?tlGTnBy3BpAYy5a1XfVKlXoscNAWP0pzvjdJwvPHs010eIwO1J9gUys4yzcR?= =?us-ascii?Q?SsaWjQL7bEbiXR6ZyxsLQ4z1PwyjzF1FsDS+45nPl9REMUINj+ofOywFeGqK?= =?us-ascii?Q?nneAjjHFlyaYfhLDye+5ssaIcI7dFknhovfZPZAo?= 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: DB9PR09MB4988.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff0b2de1-5b52-4447-f5b2-08da8524cd62 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2022 16:30:33.7321 (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: ISZwsFSiB0Zuh3MAuYLEcBt0vt28aIbCDhlnEpsOfeuqBoxohu7IRwuwf7jnirTH1zuR7p6gMWqNbV29MphF1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR09MB5473 X-Spam-Status: No, score=-11.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, T_SCC_BODY_TEXT_LINE 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: Tue, 23 Aug 2022 16:30:39 -0000 Hi, Quick ping - this (or something similar) is required for working with multi= ple inferiors on a remote if you connect to the remote while the inferiors = are already running. There is a reproduction description here: https://sour= ceware.org/pipermail/gdb-patches/2022-July/191092.html 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