From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2106.outbound.protection.outlook.com [40.107.241.106]) by sourceware.org (Postfix) with ESMTPS id B30B43858C56 for ; Fri, 17 May 2024 15:18:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B30B43858C56 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=xmos.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xmos.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B30B43858C56 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.241.106 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1715959098; cv=pass; b=T6L4sB9vFgg0X+/uXKu+Ka1kGlUXkAM90F+OfkPd8+nSseN5KEStFASuEPfFo0uKkrI9gauMoE+lmkp7ZFYR6N7MwPlLGL6c9HZV8myGehTXum0VKv1UKPhEX1uxpZHTjP/2PHCKVKBjlHDzmT7yET2HNt2rLhq0/q4ZwJ+f7ms= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1715959098; c=relaxed/simple; bh=DadHx78+8MjmbCg6Vh1stHPJ9agD8vui+PI//MnzZqI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L5SZ2aUgfro9yOXg9BxGooVoO+1EYHIfH4Nqa5IPOE5urMq5o/rvC0Fk0i2MJY78GucBOi98Hx4VBNNDuqVF/4bRu4XhMarlR2t76g92QrSJE40oHQ6G5Ok05BybshsqzEdt2YrSL0fQH1vVXO4Rw1/i8DgsN8mWCRlQSNHhca4= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U/kD4p0oghjjMwI08H4GLNQ8/KaYjjpDBp7YmruZLjTOSWdRCGBbgeslpqrm/d7N0mJestRWTDY8d61+sVpuWcSBZP8HYCqSiD/RmvPAJfdR79d3+IvbnYMY1yUDJFBjcxIrujAkBbEB4wbfO2Dq1QgUPQmy84byhBOgv60T518YkOtkPkPwHCUweZzcvHe6GCr+6vRtNDQRtwZRZkbOT9rpOT7POeOTPL84qGnw0tkrPFtOGvkoq88y9YobgtQorcLuIdRBPYBHwBX3u/V85o3bjxKSh3sOuqfpYbs/GtrVWAwYjcPLQ0/JwJORxNS96z9aVTd65lid0eBBH2+SSA== 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=Nz1EqXZiLgLeoQsZO4qUDdlsiLLsBe+ivmkF2yMu740=; b=CkO5jbBTE3IEWqZtey/9PSLMMYLP14GzX9CpfNAY4u/d5CMSrXIMtDmERNdzbzhX2HoawgSXt6OklORC3314eiuprisXNaM9VqdZjv0hmaihd7e8uSbFspzVxGN35qb9RX7wf/nOEdgVVtk8/CULnWP+nep9hrlQGR+yMfFjvwRgqGyhQPfZmfkx5bUCxILY6FZT+LlMf+QTB3n3sHQAYQKPFpSJ/26BWwi+4HqvzbOcIJFNDFtyq4r9jDEGsLOyi5jXCM3n4lYI5kve4LijiJGHSnjF0EM9rnsyMv4h/kOBkx2EeHJOuF8RAdtH8XLQNvySgDUj/xpJrH0KuVlXvg== 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=Nz1EqXZiLgLeoQsZO4qUDdlsiLLsBe+ivmkF2yMu740=; b=KQBVfjL9CSOgAQdhYLOmoa7G87trIb3kS3Xm6I+jZUBmARimaSZSBKMxiu+7ZDXhROJJyvKEWe/esOzVm31qcpdmRD9Pfn7sh0fJ/2ndh28fbte+5+BHsXhESpBPoOzGv/+jH+tizd7jC2uQHdm/H5aaHjcP4S3A8dXrCUlStiY= Received: from DU0PR09MB5569.eurprd09.prod.outlook.com (2603:10a6:10:345::8) by AS8PR09MB4648.eurprd09.prod.outlook.com (2603:10a6:20b:296::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.30; Fri, 17 May 2024 15:18:13 +0000 Received: from DU0PR09MB5569.eurprd09.prod.outlook.com ([fe80::b6c9:1180:d2e7:4ed1]) by DU0PR09MB5569.eurprd09.prod.outlook.com ([fe80::b6c9:1180:d2e7:4ed1%6]) with mapi id 15.20.7587.028; Fri, 17 May 2024 15:18:13 +0000 From: Ciaran Woodward To: "gdb-patches@sourceware.org" Subject: [PING 5][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Topic: [PING 5][PATCH] gdb: Fix missing first breakpoint in schedule-multiple mode Thread-Index: AQHYoELE6TsD4VW2AEq8KrJPBohV2LGfmlcg Date: Fri, 17 May 2024 15:18:13 +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: 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: DU0PR09MB5569:EE_|AS8PR09MB4648:EE_ x-ms-office365-filtering-correlation-id: e4e0b974-9385-4843-983a-08dc768491cb x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230031|1800799015|376005|366007|38070700009; x-microsoft-antispam-message-info: =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hq2pncF/TFZSkQs9Z92CB4U4?= =?us-ascii?Q?6FlIX9aypJwEo8L2sBBDqe11zKfk2yGES13MwyZErwTOTW8hVv8n2nhPF+f8?= =?us-ascii?Q?l2G8NmORRQtYLrLTJbAq4BHnADOGKPVrKp16iiQY+VVQ1ONFUv8UJMqeu0zp?= =?us-ascii?Q?K1rPt6Uym6edL84AvCRs14ccZjuZZACk6Ku6OLowu3CxvzaBk6Sr8xpAPgCx?= =?us-ascii?Q?HMAWlj+13EakACFxUqe4TPkA7fqFz57Ad5BtNua3SglZIdj0zTK8ogNboViE?= =?us-ascii?Q?UBdST5cH0joMzp07t+otdMuFPncxiPOyGzSEgkYvlOU2Jzxadd4ZVapaAW5v?= =?us-ascii?Q?nAWRLX9yfXkW3R9MB4ZvpAEcts/jLW3Gm/qz+XIvTla+uHdGx6WO1YIQvotq?= =?us-ascii?Q?kUd1avUzoJy88EtaDGHgjrUUTzL39I08XCz044CC8Q=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR09MB5569.eurprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(366007)(38070700009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?JIej6jh/8E7rYIVv4wbV2wHdN3abytZZTaHymrbgsd02SW3MMAzc1MpBjYun?= =?us-ascii?Q?g7CEa1j4CvoBv7SbvwGroR0ayQlCUyWCm2Yx3v/PK776jz+FZjHaL8wrBQpg?= =?us-ascii?Q?acrnT7sRBeVfJ+lxichRca2WWx9zb7j4nkHRvI6md3+gIURyz11EHhGXRQAt?= =?us-ascii?Q?/H1fdDs3vzQuNjU9i+NKs6Nq27teHxokoSqFbZUHSD1eKW7tJyQo1SEvVb6h?= =?us-ascii?Q?2Y/YuO60HwZQ05NwYq9NlK5Ziwmw3BarWDVk898mjz3gPB7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PcxcAhVhOFLnMG/CrXhOhH7jLDlUDE5Jqj+mKSl?= =?us-ascii?Q?/UWOLygN/zYQ3g4YjibMFGmqO20K/JlHYG7njFGpbtay8lS1N1nTps65voEQ?= =?us-ascii?Q?0rtpYk51xUJGzzdfxaK4gWFvrFoiSFY3rAg7VqEJTObzEwXKeKoUkGVWNVIr?= =?us-ascii?Q?21Hd2Dw2UbrA7KJscZG8yoHN2GoiLyEXxu8Y4GQypj5y31xR7mLct6vjIPAT?= =?us-ascii?Q?TKbnU1gB43ZUxR33KI0fiYCbrmIZVmIN01+IMbvLKThessgrgRz27fqucy9X?= =?us-ascii?Q?yMV1FLFUdiC2fNb1YaAF5qodti0AFa8k4O0NkYMwpajBhJ9zf+atX8YgfgAn?= =?us-ascii?Q?TDjlblbX3P2E+oBtO4b7sz8JFrx/H59ThBqhtRuBzeVr2gt8rWaW/jP+/Sn5?= =?us-ascii?Q?AnfawLISLbcuD2RPhbcSYtyLfSOSfRVS6J2DSOL/?= 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: DU0PR09MB5569.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4e0b974-9385-4843-983a-08dc768491cb X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2024 15:18:13.3208 (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: MA5nguwcIONgHUALCfXk6yQzHnr0olYiZvrTwLkpUvxg4vBH1j6Sq6pDIgtUIRnPTRV3BZMEBk/ddKuC1AdXDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR09MB4648 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,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 List-Id: Ping again - 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://sourceware.org/pipermail/= gdb-patches/2022-July/191092.html I was reminded of this from some discussion in IRC (I include the original message below since it is such an old patch) Would it be helpful for me to write a test for this? I have a reproduction = example in the linked archive, but it requires running gdbserver twice and I'm not at all familiar with th= e test system. Is it feasible? > -----Original Message----- > From: Ciaran Woodward > Sent: Monday, July 25, 2022 5:23 PM > 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