From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) by sourceware.org (Postfix) with ESMTPS id 2B1B93858D32 for ; Mon, 8 May 2023 01:24:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B1B93858D32 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=windriver.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=windriver.com Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3481OYXi028842 for ; Sun, 7 May 2023 18:24:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=PPS06212021; bh=3Pfvqm03e4e/ENpnDi8VMDIJYakP4MkYpKCQUrzJQPg=; b=Zhnd+y3XpwImst7PbrxshztlPkrH5Sh6O8YjCHexHMXKi14bQju5ohlpwMQmDHnydbf7 codV7vSDVeuyt/2IP0IOY3nOu23yrkyko/4M1UEBwB+zuyBNgF5BAwx5Vb0nN0hHmvkO vEbAjPOhJo2kAWZWf3cAUTxKlo5qct/MYiRSSinZZ2r8EtBaW/h4ZugQtthgx6XspoO5 pYFTTcO+LKhOGQqVpJOFvPfFLYozvdC9oh8P37R633H1uHie3j7BsOKpHOohFJ0g2qxk d30IzVkxJhOFV++N0FRbGGMd/8NOc6Pt/g3jG5wNFTviqYptHSmxA9RahMor4oK4cQM8 BA== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2176.outbound.protection.outlook.com [104.47.55.176]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 3qdpdn108q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 07 May 2023 18:24:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FiaY5LvcJsdgS6Fg5ASdrSKZYxHfzAeDra0l2WLudwE4yTz4T6IFvXEQrrQ2OW91c5yzJqfAI7G1kKrIj0xgxKXOGfT6uhLeM+FWm3HvTPaGZXrIr0XuC5xy9TRXhS3cWYn/fPXWL+3/zWbasOe1MDSAPk/4j3UrmSdl3kEboADIzhsjFMYwwVwJQmqv0DINgRdTXMN45remfaAN4JiE1IMZES33SOSk8J//i6+mMD8xME8jwQBLeiqRNozpfPxkafJwkvLjTVzZrZiWKPM++pTLeXdTLWMe4FZunDK7X4x71rWUKkAFh588SjyZ1YcB4h9dlpDfO3lrCgEzqY+OGA== 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=3Pfvqm03e4e/ENpnDi8VMDIJYakP4MkYpKCQUrzJQPg=; b=bVo1XGwhJ09g9j7YEKVq6AXm52IjnhYjRUKxNRwhviOSsNKtRz32COI77XpDDnqoOLmdpNMYgElZBUZ31QoXxtEHVHkWPbykUXHnFZwyfayfia59cWTtzGBcGfegrexXJI/a2c81Y/pxqJxtw9f6TCYXOn1KZ5OOKPLjjp77mlkQoa3iuQv5vnvx2mpcbKP7qnpGGY6TlTnDhxK8M0s8WObZQR69T2UyRD/9P7YfniOh4YhW8zZy7Nq5XtRF+X1DUyOOtp8sQ+V5XsqjN/h+2CnBkyvjOhBtsuqTg5cAPgrPyWXYuhPGEK/iaZVjVU6yVJMFwPF0uAEAyTTNA+TjYA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from DS0SPRMB0001.namprd11.prod.outlook.com (2603:10b6:8:cf::8) by IA1PR11MB7197.namprd11.prod.outlook.com (2603:10b6:208:41a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.32; Mon, 8 May 2023 01:24:29 +0000 Received: from DS0SPRMB0001.namprd11.prod.outlook.com ([fe80::f337:4983:b1c1:3604]) by DS0SPRMB0001.namprd11.prod.outlook.com ([fe80::f337:4983:b1c1:3604%5]) with mapi id 15.20.6363.029; Mon, 8 May 2023 01:24:28 +0000 From: "Yan, Zhiyong" To: "gdb-patches@sourceware.org" Subject: RE: The patch for bugzilla 30387 Thread-Topic: The patch for bugzilla 30387 Thread-Index: Adl+9zF96VQJ7CpZTw6bDcpyH+ShYQCVF7kA Date: Mon, 8 May 2023 01:24:28 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0SPRMB0001:EE_|IA1PR11MB7197:EE_ x-ms-office365-filtering-correlation-id: 8c4f7c52-0bbb-4f57-0a5b-08db4f62f7c8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: m0yrU+ydSYdagqCnX/Olo/lor3pRcamKDTrc84oQTQ1RyIBQhSsH6bF00n9g2Txk/+Bq1pqeDCpyHoS2t0YNaMzkrKJ88VAQFdAiAfxhyzeuPlTslBqYM08SRNS3XWdVgtGneGgR/ApBXnQNmJhJ3zng0yVZWLlsbpokmOWcnuZJwqKRS6YcWbvFR/YyDEe7UGfK2ZpMmgOqccGFrP0UPIGl1+1yP06AwvgzoSLQ+rZfSNR5s8PdV5Y3QmalQOHGY9MGLbkwxEvqPprrg2S5l/XzHHvPfis149OxUYMWNzkZZLB4X7nWdu6W96wYUyjOveRcauCUpjcvyi1R4MH5Fj+SMq6jmFyCr+G1kcY3dbzA4bS7DGsl2ird1iXX+uTatCts4/JO4hrV04qKHAErh4H8TI4yLeXFSZRCv4RUEQqQvf53iqyQaPwoO5vqu12jyFkjANxiQmJJ5hprqsi9wytA1CwFbpahul0UHUrdYXSNEbb3QIzhY9d9PxM0qJAxZF4c/lfSTsH4vbsYxJqF73qCAPFbS6cIVZ+xxq/LAWxbLKg74zGSzBqvzOA6tkTpDX5dzD9lEXkBXRlhFSve8/mDY1xUdgzx1WwgbwKAGBY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0SPRMB0001.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(376002)(39840400004)(136003)(396003)(451199021)(7696005)(6506007)(9686003)(53546011)(26005)(966005)(55016003)(33656002)(122000001)(38100700002)(166002)(86362001)(38070700005)(186003)(2906002)(316002)(8676002)(8936002)(9326002)(41300700001)(52536014)(76116006)(6916009)(5660300002)(66946007)(66556008)(66446008)(64756008)(66476007)(478600001)(71200400001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?327L6tUvJOqFRWUvEr9KaAuBpgX0CKZAxu61ayMsDnz2M7UBcYfegEOn3u/W?= =?us-ascii?Q?8Fs00/sUx28ImX3jlL99cwXortd4YGNZQni3r2JtcQ5qcyZfEu65ovAtG1ns?= =?us-ascii?Q?d08uzC6952OraJLEEBnwlPxym8RMxdgr7UHVKsQDER/Ypr5Cchw9Y/XOIY1E?= =?us-ascii?Q?Vj/WvNjUopZ+2mtgGP7oBwXRQ/l0mPLwrAUwwXCZmfm0TCqyGnbN6UprxrBH?= =?us-ascii?Q?1jD8Lw5RzADwECOasRcAcpWquaGpGlPEMZEYPASdf5exfWWhajUxdt9lw8fn?= =?us-ascii?Q?4mSXSHmPbTP2439eP8+9PNhjvwzL1k5KJBdSKiJTG2o5g7SUE+asXz0kK5C1?= =?us-ascii?Q?sAbthu591dxMMsJ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us-ascii?Q?TzlZFLk9yx8yRYhDYNwYV4VeF/HoBj4KvPmpIOK3RLDsbsXIZaMBCngXxD1x?= =?us-ascii?Q?DjRCRWwKIna107bRdEixBwilp4Cs/TKcCIoIP64hwVs3oPMSn7IEQ+WSCKvs?= =?us-ascii?Q?q9+BocFGkoax6bsCT2NPVHUM3l+JwBdo1DSCjcMb4lKzsZXYnOniUb8R1dwL?= =?us-ascii?Q?8JJ79ORMJPKEoATEC6jPrYRK/xAFisMwtHy88cL2PpIFvf488J6y6RpsdyGH?= =?us-ascii?Q?r+37j68auviwwB3eppqE4j27n3mJxyOzeWLtkAp2xf2sbWedMNxFKXUqz/qu?= =?us-ascii?Q?j995j26bi6U/YJXE2UTjfpXhhL/VGZ5UAK67Yd/f?= Content-Type: multipart/alternative; boundary="_000_DS0SPRMB000135CCA723713AA4680CB6E7719DS0SPRMB0001namprd_" MIME-Version: 1.0 X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0SPRMB0001.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c4f7c52-0bbb-4f57-0a5b-08db4f62f7c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2023 01:24:28.5521 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2Tjgb5rRq4p/teqQIMk24ZjiT2VqADYwFKFqLRo7QIROfAlgJ/lQtUa8cARyaxpuKEIlKN/rYXx605bZPbLuRL0lU/hW0QXeO5S0jU+70qw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7197 X-Proofpoint-ORIG-GUID: XEKQe7AZx8orNpIxxWavH6nj6xkDMtIE X-Proofpoint-GUID: XEKQe7AZx8orNpIxxWavH6nj6xkDMtIE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-07_10,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=645 mlxscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305080007 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 List-Id: --_000_DS0SPRMB000135CCA723713AA4680CB6E7719DS0SPRMB0001namprd_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, How is this patch going ? Best Regards Zhiyong From: Yan, Zhiyong Sent: Friday, May 5, 2023 10:14 AM To: gdb-patches@sourceware.org Subject: The patch for bugzilla 30387 Hi, There is a patch for https://sourceware.org/bugzilla/show_bug.cgi?id=3D3038= 7, in the attachment. Bugzilla 30387 has given the steps of producing this issue on arm platform. Attached step5-assert.txt is a debug log which contains several "gdb step n= ext" output. For example, at line 29, resume_one_thread() doesn't call process_one_lwp()= because thread LWP 316.316 is pending, as a result the software breaking = point is not installed. Later, if this pending thread makes "wait_1: Hit a = non-gdbserver trap event." happen, stop_all_lwps() -> "prepare_resume_reply= : Writing resume reply for" ->... In such case, "gdb N" can finish without assert error. But in step5-assert.txt, from line 14923 to 14943, we can see the pending t= hread make below happen, " wait_for_event_filtered: Got a pending child 316 362.994099 [threads] wait_for_event_filtered: Got an event from pending c= hild 316 (117f) 362.994379 [threads] wait_1: Ignored signal 17 for LWP 316 " In this case "resume_stopped_resumed_lwps" will resume every 'stopped-resum= ed' thread, but a thread (previously pending) has no software break point i= nstalled, then resume_stopped_resumed_lwps() asserts failed in maybe_hw_ste= p(). So, my points is: 1. Gdb should not assume pending threads always generate "a non-gdbserve= r trap event", a "Signal 17" event could happen. 2. Now that resume_stopped_resumed_lwps() -> may_hw_step() assumes that = the break point must already exist, resume_one_thread() should ensure the s= oftware breaking point is installed although the thread is pending. Best Regards. Zhiyong --_000_DS0SPRMB000135CCA723713AA4680CB6E7719DS0SPRMB0001namprd_--