From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RHz9K0/+H2cuwB0AWB0awg (envelope-from ) for ; Mon, 28 Oct 2024 17:12:47 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dyxyl.com header.i=@dyxyl.com header.a=rsa-sha256 header.s=default header.b=IZwwOu21; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 9B8371E56E; Mon, 28 Oct 2024 17:12:47 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.5 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,HK_RANDOM_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED,URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 31ECD1E37A for ; Mon, 28 Oct 2024 17:12:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A34343858C62 for ; Mon, 28 Oct 2024 21:12:45 +0000 (GMT) Received: from cp165172.hpdns.net (cp165172.hpdns.net [91.238.165.172]) by sourceware.org (Postfix) with ESMTPS id 2A2423858D26 for ; Mon, 28 Oct 2024 21:12:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A2423858D26 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dyxyl.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dyxyl.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2A2423858D26 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=91.238.165.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730149932; cv=none; b=I9H2JOXHtA8l+tFEtzgHx4lYbjL5b7DvvlkOK360Okpazf1mslFBqQyXA2FAHiBDxZksfvOaIY1/RZG7qDrMxOqgftbesC/zmulCS3ewPBL5mcWaBXYA8JX6+Lv//gduKaKLcIERzKfD+IyyLlyiCYIQ3OOUydeNM3Af56GRsM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730149932; c=relaxed/simple; bh=etmGIoVXkECnWPttMXRg9V+sLcyEfJ8aTHSQ1tQEliE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hKOk98v1+6NIeSayxE/Fa/ejmuYnsvC7HhQ/5RnXZWdOmwhy4EFdC4B1+qvPDqtm09WtVJrHtYZ27AjLTkXUYHfTzQeEfQ5AJVaNhBQ3UVFqtlcOztiqUnM0C8qky35SdPLMLgYaSN5bCPFJEDELuKb6Cy0v6rfbtyG/YSr2aek= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dyxyl.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=937dJOmXp6JuFwRJpJKFeqzi7PV5qoGMaKpN4fH2sg0=; b=IZwwOu210Y/Gm6Wdb/nWuQCozO Y+pvLiVj3ppQ3BLPCFYLkz4zHTSFa7w4zH9rbW/96LUC5Ts4Y5cd1n5Hii2uyHDLpyl8E81DHzX/d 8kLxXzWfuYPeJ0YaG2X1zABHFDP6B7Vam6MQ54vFdhwwuOSphwpIibyMQq6Q7FySI+2k4IrFHBBrn fXDuUVOLSEMIbYy8iPvclJo6PF2Zc/yP++xuQEWLV8lqzERR7dbNl8PyWqBvDIccJjd/TDComhSXn 7fUGadMZBKbaONTBRLB7Z3PpbLAgJ4QDpS/9S2e1Ah9xDh1ifq+YPHKP0/zsZqxwU3u71oNSDe6U1 a9DVtq0g==; Received: from cmbg-19-b2-v4wan-170160-cust2145.vm17.cable.virginm.net ([94.175.88.98]:35792 helo=localhost.localdomain) by cp165172.hpdns.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1t5X1x-00000002Rzv-1zS1; Mon, 28 Oct 2024 21:12:04 +0000 Received: by localhost.localdomain (Postfix, from userid 597) id 05895E089C; Mon, 28 Oct 2024 21:12:04 +0000 (GMT) From: Martin Simmons To: "Ijaz, Abdul B" Cc: gdb@sourceware.org, tankut.baris.aktemur@intel.com, christina.schimpe@intel.com, markus.t.metzger@intel.com Subject: Re: [RFC] New command "thread filter" in GDB In-Reply-To: (gdb@sourceware.org) References: Date: Mon, 28 Oct 2024 21:12:03 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-YourOrg-MailScanner-Information: Please contact the ISP for more information X-YourOrg-MailScanner-ID: 1t5X1x-00000002Rzv-1zS1 X-YourOrg-MailScanner: Found to be clean X-YourOrg-MailScanner-SpamCheck: X-YourOrg-MailScanner-From: qqxnjvamvxwx@dyxyl.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp165172.hpdns.net X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dyxyl.com X-Get-Message-Sender-Via: cp165172.hpdns.net: authenticated_id: dyxyl/from_h X-Authenticated-Sender: cp165172.hpdns.net: qqxnjvamvxwx@dyxyl.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" >>>>> On Wed, 2 Oct 2024 07:24:21 +0000, Ijaz, Abdul B via Gdb said: >=20 > Hi All, >=20 > I am writing to collect your feedback for the new command =E2=80=9Cthread= filter=E2=80=9D, we would like to introduce. This new command will proce= ss the input list of threads and then try to filter them if there is any ex= pression in the input. So it print only filtered thread ids from the input = list where the input expression evaluates to true. Here are some examples= for the usage of this command: >=20 >=20 > * thread filter 1-9 > * Outputs the ids of threads with single digit > * thread filter all x > 10 > * Outputs the ids of threads in whose context the variable =E2=80= =9Cx=E2=80=9D is greater than 10. > * thread filter 10-99 $_thread % 2 =3D=3D 0 > * Outputs the ids of threads whose id is a two-digit even number. > * thread filter all predicate() > * Outputs the ids of thread for which the function =E2=80=9Cpredic= ate=E2=80=9D evaluates to true. > * thread filter all workitem =3D=3D 1234 > * Find the thread(s) for which the =E2=80=9Cworkitem=E2=80=9D vari= able has a specific value. >=20 > Output of all these commands will be string type list of thread ids which= may be used later for other commands like thread apply, info thread or fur= ther filtering. For example >=20 > * thread filter all $_thread<5 >=20 > Filtered threads: >=20 > $1 =3D =E2=80=9C1 2 3 4=E2=80=9D >=20 >=20 > Examples of output usage in other command like =E2=80=9Cinfo thread=E2= =80=9D or =E2=80=9Cthread apply=E2=80=9D: >=20 > * info threads 1 2 3 4 > * =E2=80=9Cinfo thread=E2=80=9D command print thread info for thre= ad ids =E2=80=9C1 2 3 4 5=E2=80=9D Are you also proposing an extension to "info threads" and "threads apply"? Otherwise, I don't see how a script can use the result of "thread filter" in those commands. Maybe some extension to allow a string type list from a variable like in the following (currently, you get an error "History value must have integer type.")? info threads $1 thread apply $1 p workitem __Martin