From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2138.outbound.protection.outlook.com [40.107.20.138]) by sourceware.org (Postfix) with ESMTPS id C59F83858CDA for ; Wed, 31 Aug 2022 10:11:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C59F83858CDA 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=EZPD3n6s7TC03uLkl1cQyqx1bwSbYY+bR8RUWnpJ8hfQ21mBiQWyGA2ORlN+LDtW+DzZKu0jhNcv5xH1HTDzsRD0lK/XBRx1ueeqAoXPqrMVIAyaZLtICPJK31ZP/tnfIdq0mAtEQAePgHLdh0PN+nljFuNKXmUKzLLA3HEp3Mzv54k72pSRRB5qycJO7VdC/IWPNQcusaS3z8fL45sblnD9vfJwzssVbxAAyv9JWOnKUM3Qi1+H2qSzAZRNGZwBuMTSPZs7X+4qFVk2k4zDeFpHeHJ7EgkmG2qvt/vepLm6f/Fz8s9Qlklp14tVQz6qZKc3X1bsxZVO+/TAiKSWbg== 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=ZZeHjP1d256UGjvChVyiBve1pW4vNHO1S0Hs0A186Vs=; b=oSpVHDIzNK3CAEiGh3fVixXjAC7LkqYa1RUfe12rEnx9zyq0jtCw0rSfQcfksxsr2w/jYbSsneBPXilW/FxoLgoEoN1GzaLUX0MhiD8J0JlEZva2gkypksAktYpZsyduREBwJYOhv6m7QtNP5uO4aBqfLmYOJKM2wgJ66Zs7wL7H6LN3/zzqyQnm6jZatgsKgWD45gTzPXD50Uu+6WiiQEAWzXD6ISLDOhmbv6tpLdLlpFb16NDBykXlgxgmYASmNBopwftp75ZWeYaD93yijDf8zmAYRCY5NMlMYPtG2kwz8yla/XCSJ870at1/89WVUelM61IQrmp5Hyr/uuhNVA== 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=ZZeHjP1d256UGjvChVyiBve1pW4vNHO1S0Hs0A186Vs=; b=cBjhJJ5uMo6azf3q5S6CcEB1velDyZiYf5fiyBQAO+hYxCcSABOf3sP+rHT2PhbADuSwdCbNZCbk/BpMo2WMuJfoGF6yndNi6QCZtbNzhKHOx9VIGFsXbLdxY3vBZRnv2M1OGlkA53/cG8VQflm5ZVPdrS6qIS6DaxXRqIVMd4Y= Received: from DB9PR09MB4988.eurprd09.prod.outlook.com (2603:10a6:10:26d::11) by PR3PR09MB4411.eurprd09.prod.outlook.com (2603:10a6:102:31::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Wed, 31 Aug 2022 10:11:19 +0000 Received: from DB9PR09MB4988.eurprd09.prod.outlook.com ([fe80::dde7:9630:6493:7174]) by DB9PR09MB4988.eurprd09.prod.outlook.com ([fe80::dde7:9630:6493:7174%5]) with mapi id 15.20.5566.021; Wed, 31 Aug 2022 10:11:19 +0000 From: Ciaran Woodward To: "gdb-patches@sourceware.org" Subject: [PING 3][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Topic: [PING 3][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Index: AQHYoELE6TsD4VW2AEq8KrJPBohV2K3JA4BA Date: Wed, 31 Aug 2022 10:11:18 +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: 64e42519-18d0-41c9-a605-4b26c29b34b7 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: 988e57cb-7ad6-41b1-b22a-08da8b3925d7 x-ms-traffictypediagnostic: PR3PR09MB4411:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gtTHZbhhm/oOF6jR3Lw8nkagZbxdAiGkYfS/1oYUIsSnEvQwyGTUh4l5LbWu50DAvve9V8i5sf9nkr54z4kL4VoDSAw0pfPWjf1qWGNgVyxia5HzjOEt1n9NDmRGFiJIv3PbGkbWIbfVePPI3aI/REJGAwr+dFkdC3nERRAmFL3GV55x99bpxEGZ0nAxn+763xfbtICrwsLZfYQpRsx8rVlaTAzroH1T8ouHxzsGtWRI6wIZlyN6crlv5dcD92mVh3W8HA6Q6Nba6/BruHNudJwf2E8ctMm6Q6j5yxX1uQbuQJE30Nl4DnHO/JdXmp1d98Xsk7gZU08JJMicuIJtpK5dw7Uuob4WruCI3ps4MY++4CbWuFAK1GzqZ5V1x0nrq6dkM4oZOytHaomYJyKdC7kdjl+AsbFyycNDwVE+JomiD0iRpBZ4Hb1u8HooiTMUahL2wJytcf3NdjOsurU/J7zAhWwFX62d1RqsvO1UrhInz9yMIE2K5GlCICFLCXo+6Yb4cW7dZmPsjwsTRy0RKVDEIkz+NdUfDtz2NX9zpsJZIkVZ2zucAZ+l7d/+ev9Kja+8HcAWTGqPQmVktFdjHFcaH/XYvZzGIDRLM7KCTnueYbeSPWCl8HRAtsRIuTmrvgYOwwklN/R00AKpGEkjjy7/lDR5nrFLzcK4AEj5WhIciq8LReSo+bKeXF3c2M12uggPFEe8fQy3vtBR695lGGo1UBP73xwrCUJg9SDV9JVzc2QAxZdJISjoKM0Iha8a0zv8HwPxIEUIX+fIis3gRj8KTzTEPzvi7rJXsOiQTzw= 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)(346002)(39840400004)(376002)(83380400001)(8676002)(66476007)(966005)(186003)(86362001)(66946007)(66556008)(64756008)(66446008)(6506007)(38070700005)(76116006)(5660300002)(71200400001)(9686003)(316002)(55016003)(38100700002)(33656002)(6916009)(8936002)(53546011)(52536014)(122000001)(26005)(2906002)(478600001)(41300700001)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xU2w+PIcIAVxHuoIpWlN8maU9TXx3OqnyU5PxeS/Ymh8BKOWr7y6IbriEV/P?= =?us-ascii?Q?0PrLEstkd9UTR0qUY9CKB87L/dNoNR5A8JCcufVdJTtyldP3ACB0tyWn2LYK?= =?us-ascii?Q?C38u9fhW1C3HakpIe3bttlynli0pLWDhvv1TkHYq1vgwvsgtD01wL/gP6ZEN?= =?us-ascii?Q?u9uT6qYtidquHbexJbD33hXt6RZecG2oPxIv7SYUMNNw2XyZ6Qnh2U73F0ee?= =?us-ascii?Q?SViwY1sklIHvOxO1L7eeeBnVIc8Rw/CXOxuCXWLdeV2p+/XmLwLTNAmz/Dqm?= =?us-ascii?Q?7qzbyKYXFgYLs/8SZ/ZTwQtN3iKmu6bg6P6nzBt58UjW1c5Qio+6Z4MoKMc8?= =?us-ascii?Q?t0X9oFIfdMpqnc//tI5N0cfg+8/BFuHlFPkCs9k9op3I1en/uJ1/cK83pmvi?= =?us-ascii?Q?Iq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?us-ascii?Q?7pOBrXA7HhiGAAH+xakGA/KklyCUNNc7Dtz775DshdZyWxZkMshzp9X+QV6F?= =?us-ascii?Q?0L2A24O9HpkFEm0D9MI6UrlJkmzkwmnGdvVZQls6XPlqupT8l5jeASUuZ+4z?= =?us-ascii?Q?Lx/UgXBX7uTWTlya9gWRmtYemOnxcWxDSEijoZWTQPXFaUK+js+DGywphn05?= =?us-ascii?Q?FC3xiiAggEdIRYZYdYOr3SxX9QEJ8WImT/krov7o+yAlDVIl2mGx9c0T5eON?= =?us-ascii?Q?JRTwhDWLitw5E1b5rcRvYQz1E9N6DsmllRhJgY+k?= 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: 988e57cb-7ad6-41b1-b22a-08da8b3925d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Aug 2022 10:11:19.0323 (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: 8hPhS15/EYL2zSs+GCqprooa6Y89fgrMTVTloZ8yB46/AEKDvzTB7JclyCjx5umR/tRBuXn5ApAWklAAEC73Vw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR09MB4411 X-Spam-Status: No, score=-12.1 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: Wed, 31 Aug 2022 10:11:24 -0000 Hi, Ping 3 - 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 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