From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-obe.outbound.protection.outlook.com (unknown [52.101.56.14]) by sourceware.org (Postfix) with ESMTPS id 31CC33858C52 for ; Fri, 9 Sep 2022 20:04:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 31CC33858C52 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=microsoft.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=microsoft.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFYLHb9QJbeHKmTGvKBA9XbUl67BZqNVYaPguUcP8ErQ0cQ8YZomShrHfV92QKUOEzUHMtfB7l+ytpoBZRx/M7HiajBtX+ymScQ0AHD+5IcR5Z9hV8GlDmAPFs4yWeHSSoVfQSQinEfvpCth5hao2V1nGuYIBhv2Mvd45d/Ml23R6sB8/1yCzhNCIzqe7ZLq4sI1FvB0mu8tgvlyV82K9s8T0CuWUuIUJrtgGd8HPeVCc5m/aSnd12rc584gGKheiNJFaGlJm/PbHbUpWOHROeVDXxcgapWVGcA6BnhqbcaQxDaNMmE1FvSV5iP38TECSYMbXhWNTzpBbNPzvwi31A== 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=R1fuaLhbz4yjiXJDpLXKqDSvsRbhxGLp+Q3YjjzMf/w=; b=MWVRa6+GPVPiqmQHUvvmU5Lsttixf59VWK9m2DwB8pOWkN5Qmcq5THHgm1/19Smig4+uwXaQiS0DIKfXXsj9VXbSwoxFzkPEhLmw2JoSbu+u8dCIf5jbPwVWi1Quyf6yW4qn+N+5Wqk1xW2qXRQUlaKZZ0UYt4qxY/bBniJyVd7tUBd7obwQ9iqgM/m9x1cbkBr0xYnK/3OuDIt0sqqf8ym8eiZYKKyijQ/KlIIxkJ7Jz0cHGDGlmeBA3CtZY/zJPE1+s/aHrqN6k/sATAhXzGf2N1WEEKutc0jYbDjl8BvnD4UMnrKDuCK1DFsdfIqInMEsIj+KNgnztU9eCBIPPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R1fuaLhbz4yjiXJDpLXKqDSvsRbhxGLp+Q3YjjzMf/w=; b=gS6bMUg4MM+bas3rq/vngSA6yVggvzhKAvQ63q59gKL6vO1IFBWH6OmZJ63gpN6t3OusK76NKqkCUipJCx9++gnn9MZ8mZmRruBCDeAGq8kFvWQ3bQ1sGcZIRcmljdFDnkayIr63520H3zxluhqyQSK7Eaqul+homRxVPEwdenk= Received: from MN2PR21MB1439.namprd21.prod.outlook.com (2603:10b6:208:20a::15) by SA0PR21MB1980.namprd21.prod.outlook.com (2603:10b6:806:e2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.10; Fri, 9 Sep 2022 20:04:40 +0000 Received: from MN2PR21MB1439.namprd21.prod.outlook.com ([fe80::4b3e:c8bb:b5b8:842c]) by MN2PR21MB1439.namprd21.prod.outlook.com ([fe80::4b3e:c8bb:b5b8:842c%9]) with mapi id 15.20.5632.006; Fri, 9 Sep 2022 20:04:40 +0000 From: Bill Messmer To: "gdb@sourceware.org" Subject: Issues With Thread Events In User Mode GDBServer Thread-Topic: Issues With Thread Events In User Mode GDBServer Thread-Index: AdjEhp9G/nFU1LmjTkSOuj12IeJY0w== Date: Fri, 9 Sep 2022 20:04:39 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=ecbba6cb-8301-4226-b3e1-72a55cf299e3;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2022-09-09T19:38:28Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR21MB1439:EE_|SA0PR21MB1980:EE_ x-ms-office365-filtering-correlation-id: ce1b64c2-963f-449d-43f8-08da929e8758 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sfpxnMwIeE5KdmCSo368wlEq6F1mDdXV9I70ypDF9+7laAb3rUOhrMKngr3UQYr9rH1RvIs8mZNOmcYA7XD5ZxiL3Ku5oh+n5gi4GApk74TBToQig11/cKJ5jw8pLnHIYBXN2AAxUg+GH35VEEtda7GuoAEqXqfXZlvXGT/i+CpNBpoTvpsMO/5vyqjhgaoRWocS0rWTvP+AlZDHa0mqCWZPrhsxfNrqFRQ4CdQT/EIiKwKnUWNkBua3wuCPI3dK7mNIExz4Am4VH+VN0vG9SMWZV8VVctPflOTQPWoVdX+McuWGIYMZePpg6dzqPZuckM1YqaeI/AsMC2xacgk/JaSE9r3FYeO/mdy/OJSUY4Zg/EofEB3pM2Kd8l9Vv2qsR64mA1Rm9FDx0lXPZMwjLtj7qR4rVhURaZdq2IqN61j/c4sUvcUyNSuISHt+NtVnTcFsw+ps5k9HS4MXJneQh4ftt7Cgryj26ns7Iws/mojx/dFPFLI5+G5WnpQ+8kp/QmnX6uX8CUMZchp/6UkcnbQCosV/vqK1tUhto7mRbaz33QqBc5T9BBjXfsKKbHtUnZZdfML/GPvV9XDv5X2JHquz8dfgVN4572sDRLw6atpHxMgVcc8NrCZ1iMnJ/05j4QSuzpUOg4oQha1zyqWTR86USNk5JeAsgL8ktu9gh6n2vbzXFRJeZyPEpx9rWS9KGkTnBpW0NLrcnWn5SnqZ7MEMTQAb6geBpaAGKWvKtv17PhfjagDs2+WAwecknsLMQJVvU4nKyNOIf993BaQYnTNYkxEFV9AO4wM6dzG/FMIIc1Y1h7OfdGVE1MgdM4axVpGl77+uzeaLsDDcAZsl2g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR21MB1439.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(39860400002)(396003)(376002)(346002)(366004)(451199009)(83380400001)(82960400001)(10290500003)(82950400001)(38070700005)(186003)(8990500004)(316002)(66446008)(66476007)(66556008)(6916009)(64756008)(66946007)(76116006)(966005)(6506007)(26005)(86362001)(9686003)(41300700001)(71200400001)(7696005)(2906002)(52536014)(33656002)(5660300002)(478600001)(8676002)(122000001)(55016003)(8936002)(21615005)(166002)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7CPwdnj+POqg6lJ1aG1OvCuLdacdfJ49EWoB4D9YoT++xLMO/M4UnlSAGsmX?= =?us-ascii?Q?sho0bvWLGri/tcGhvZwP/FKq4pnJIUNgOrxH/cvj+DpW+FjVrZC4oJ+L5Lj0?= =?us-ascii?Q?AuUCHgBHdtFHq4TAL6av16Us8obXYuITiqxGxSxYdURXdKszfdifjStSQHSR?= =?us-ascii?Q?pox50eIlZlmmRGIxmzCIG///wZFz0Ch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R0d/?= =?us-ascii?Q?lRY+p6aVpJHuAx+MED4TxWzcRyevzByAoB2nlTtzjQmdX50Mj1dEGF3Wlu6+?= =?us-ascii?Q?F80w7myPuzfJWvnmaJdf+VzvIBoIKEk2mQ0oF1CnjwlYqtQ07R3cQCvcPYkE?= =?us-ascii?Q?v4SrcImxEEg4KbPJETkL8PWmXhlINhCs/AvDwMC6Yh3cfirTChMTHwic1XV7?= =?us-ascii?Q?C5QVuTWkVC1nkfjJsRjR/guVyDkdHkLDsGsUygVbYMU6ndS6x5x5wVBTbNpR?= =?us-ascii?Q?TlH+Br4LU8ysWN9HiTHk8eoMW2RhFGyOcGMrT1Xr3T/hbEPG2bdXqybXaJnI?= =?us-ascii?Q?Agn0y/r0MznOGcoYdaUUiRERAJKRL0SExOcrB/Q/OEf6ofyUROk3N/q5Xun9?= =?us-ascii?Q?fEuxTfLfp0LQH3k3buAuy1KZYyaeGSKLcTWQ4zFI+a3SA8MfXF0xqyDjNSMx?= =?us-ascii?Q?IovPFgEcpus046TfWbetLMIg4sM8Ocz04WUIxhlVA1Y6nGSWK2LRBnY8f/rf?= =?us-ascii?Q?7YshzBOnVX4V+y0sMCRmysQtxexXXsUyS7/UViNn?= Content-Type: multipart/alternative; boundary="_000_MN2PR21MB14398C0638256C6DD545FA7CC4439MN2PR21MB1439namp_" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR21MB1980 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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_MN2PR21MB14398C0638256C6DD545FA7CC4439MN2PR21MB1439namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Folks, Apologies if this is the wrong mailing list to ask a question regarding GDB= Server / RSP and a potential bug. I have been working on new extensibility API surfaces for the Windows platf= orm debuggers that allow folks to write plug-ins that can connect those deb= ugging tools to a variety of new targets including ones that are not Window= s based. We've had the ability to do this for post-mortem targets for some= time and are, of late, working to expand that API surface to various forms= of live targets. As proof of concept for the API surface, I've been experimenting with writi= ng such a plug-in to connect to the standard user mode GDBServer for Linux.= A few things I'll note: 1. When thread events are enabled on the server via a QThreadEvents:1, G= DBServer immediately crashes on any thread exit in "resume" on a NULL deref= of current_thread. 1. I tried a quick patch here (adding "cs.last_status.kind() !=3D TARGET= _WAITKIND_THREAD_EXITED") to the set of conditions that won't set "current_= thread->last_status" and the wXXX thread exit packets get sent; however, re= gardless of whether the target is in non-stop mode or not, the process is S= TILL RUNNING at the time the server sends the "wXXX" packet. Am I missing something with GDBServer and thread events or is this just not= well supported...? The process seems to be stopped at the point that a th= read creation event gets sent... but not for a thread exit... I assume th= at's a bug somewhere in GDBServer...? Or am I misreading the docs at https= ://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html...? Is the= re some alternate means by which thread create/exit notifications come...? Sincerely, Bill Messmer wmessmer@microsoft.com --_000_MN2PR21MB14398C0638256C6DD545FA7CC4439MN2PR21MB1439namp_--