From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Nw4pKSsXs2nOYSYAWB0awg (envelope-from ) for ; Thu, 12 Mar 2026 15:42:35 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YOdovshd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8FD661E089; Thu, 12 Mar 2026 15:42:35 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 AFE431E089 for ; Thu, 12 Mar 2026 15:42:34 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C00FF4BC7EFF for ; Thu, 12 Mar 2026 19:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C00FF4BC7EFF Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=YOdovshd Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id D97164BBC0F8 for ; Thu, 12 Mar 2026 19:42:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D97164BBC0F8 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D97164BBC0F8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773344529; cv=none; b=moX6QilHlxWDcfTpNgloOQOG3LNbSgL04F9Q/wmdaqLbpAyOO6jEqYxlSDMJQqREe2gZTDWY8mgc0Dkj+WQXRUfrLWqONwwIpK5QNF3dDKbXbxzP1JEm/j41akVmLb74zFUFwBydxWDfZvExUDGeHmcPa3zoY8mSKS2FoUVM2uM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773344529; c=relaxed/simple; bh=Meuwv+flD41bHG7UO0rm+rB2B8fb1dsKlcSV06MhpVY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=YnjLU2bl6QQ8zEPGEDLLP0C020XJOZ0Fa8tNRRC1UswUfc3twJZDtrPnrvRs71N6/TKIlU2PNAbMvKoBSIyatw05DMtP7o6YHxVN+dvmpLbMzfTZ+qmOPPrKHpUqvvx2w1BQDIfjLQYB8g51TYQ/RSMXJEx3IwTsy6ESnjcW+wg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D97164BBC0F8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773344528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t2WYALEfyHWQ5jlQ5VgBPdBJ5pHu9RWNhtPmhzEuuG4=; b=YOdovshdbn0Hrj7m7K2TO7/Sytoi1qtyNEZVEDGrDL4E52NDMZ6y3Y95VNdoOvTEBgMePi g+IBSWGg6vHfrD32DKWmtFn5PC98umiWq4tcLnSrdKxqQXnDlRWJ/1AoQlCD1gspDY3rSg 9biV50GfJfNA83DDdqtlAYiBD49Kkuc= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-93kpRfxvP4eNFSdrXY7xcQ-1; Thu, 12 Mar 2026 15:42:07 -0400 X-MC-Unique: 93kpRfxvP4eNFSdrXY7xcQ-1 X-Mimecast-MFC-AGG-ID: 93kpRfxvP4eNFSdrXY7xcQ_1773344526 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 447391956095; Thu, 12 Mar 2026 19:42:06 +0000 (UTC) Received: from f42-zbm-amd (unknown [10.22.88.47]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 894CE19560B7; Thu, 12 Mar 2026 19:42:05 +0000 (UTC) Date: Thu, 12 Mar 2026 12:42:03 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: Re: [PATCH] Do not write negative PID or TID in remote protocol Message-ID: <20260312124203.14b9e893@f42-zbm-amd> In-Reply-To: <20260311202152.2704410-1-tromey@adacore.com> References: <20260311202152.2704410-1-tromey@adacore.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WRVjt6EwtuzUYTvMN8zDvCD1Z0RgEhJS7VR193xaZVA_1773344526 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On Wed, 11 Mar 2026 14:21:52 -0600 Tom Tromey wrote: > From: Tom Tromey > To: gdb-patches@sourceware.org > Cc: Tom Tromey > Subject: [PATCH] Do not write negative PID or TID in remote protocol > Date: Wed, 11 Mar 2026 14:21:52 -0600 > > Currently both gdb and gdbserver can write a negative number for the > PID or TID. However, the only negative value that really makes sense > is the special case of "-1" -- in other cases if the PID or TID has > the high bit set, it should still be written as a positive number. > > This patch attempts to fix the bug. I am not really sure how to test > it. > > As an aside there seems to be more low-level RSP code that could be > shared here. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25111 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33979 LGTM. FWIW, Claude Opus 4.6 suggested that unit test might be employed for testing these changes. I'm not sure that's necessary, but I thought I'd mention it. Approved-by: Kevin Buettner