From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YaFON4AkLGo0XgMAWB0awg (envelope-from ) for ; Fri, 12 Jun 2026 11:23:44 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=YD43IpWk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id DD7A01E098; Fri, 12 Jun 2026 11:23:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2 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 3BFA71E070 for ; Fri, 12 Jun 2026 11:23:44 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE14A4B920CA for ; Fri, 12 Jun 2026 15:23:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE14A4B920CA Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=YD43IpWk Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 374A04B99F4D for ; Fri, 12 Jun 2026 15:23:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 374A04B99F4D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 374A04B99F4D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781277798; cv=none; b=H3czL3b/n6VAug1tEaO63GkF2Xl+B6hlPAn323OQ6De4+VtUrdIg5NoF1mLdMYWUqDcRqOsw7ls8o0WHN3H+1Q3xRSKJXSwcHoZiUeUwM+bjOw1CIjDT1e7x2hJITiaSini1Zw37i0tnQWwq6Zy0X9tga8Z5hVJ78p8RJzIc5uc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781277798; c=relaxed/simple; bh=sSudheitUW56c0RK+OHJQAlMnYOS0DSQew0/hkVtUiU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=fLHX+lUSw8+Tz6lfFdQw8m3vcZ45tFE+7/mGtYPqm9IukigSOHh6tqDfQlpENVisaw+FBgzFBiNggfoCrYH+zXxpQF4eSFFYJfcHe2sFZJZuyKPL67f5en45uwpEU+QWgnpJ4GGF7bBlYWFha6K9OeQN3/SXm/19+Z4ue3VAcWw= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=YD43IpWk reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 374A04B99F4D Received: from eig-obgw-6003b.ext.cloudfilter.net ([10.0.30.175]) by cmsmtp with ESMTPS id XlQ0wCc22gwLnY3j3wq20i; Fri, 12 Jun 2026 15:23:17 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Y3j2wnE3m3HCDY3j2wyidd; Fri, 12 Jun 2026 15:23:16 +0000 X-Authority-Analysis: v=2.4 cv=TOdFS0la c=1 sm=1 tr=0 ts=6a2c2464 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=FelO9ux0wxsA:10 a=ItBw4LHWJt0A:10 a=A8oJy8mYAAAA:8 a=R5MB0JCztXBYScgMnrAA:9 a=MasS0_dV9q-jaWZIey9J:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: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=9RvtRYt90u1TRSQiw4s08+nBdANthIKnmawr9IAbW/Y=; b=YD43IpWkhbaOkw1SwMiNVdv7zw BqvceTtmvfgimT+EG9+ifEYKGuZcZCG2VbVzEJR6iLL0/MpBzJJ0cflThbRJHPAj7a05oIw+Uiumt yJELxT8SxExUSxZvdhgTca5GK; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:60298 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wY3j2-00000002ZJI-1O8o; Fri, 12 Jun 2026 09:23:16 -0600 From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Do not write negative PID or TID in remote protocol In-Reply-To: <20260430175904.1342455-1-tromey@adacore.com> (Tom Tromey's message of "Thu, 30 Apr 2026 11:59:04 -0600") References: <20260430175904.1342455-1-tromey@adacore.com> X-Attribution: Tom Date: Fri, 12 Jun 2026 09:23:15 -0600 Message-ID: <87v7bndbq4.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wY3j2-00000002ZJI-1O8o X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:60298 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfOOJzcPh/a1gOLkx0r76FCep9mOcPJctp9zcgKJ4lJRy/XP4S4+riG1c5oGQsIvHP8cttuNfScKpUGFoaLiaAOga9NMmMiYlkwp0ViTRX8+d4pfyd2dv OmX2lklf53D/PcY8BlFwYLS2D4RoGDtdJsUrgCghpoFdY8UTc8rgT2tZ5jLZ43xXMvGMYmNrZPewMxa1oen9EC/2nhk+sLX3H1w= 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 >>>>> "Tom" == Tom Tromey writes: Ping for this patch. I guess at some point I'll just put it in. Note below... Tom> Currently both gdb and gdbserver can write a negative number for the Tom> PID or TID. However, the only negative value that really makes sense Tom> is the special case of "-1" -- in other cases if the PID or TID has Tom> the high bit set, it should still be written as a positive number. Tom> This patch attempts to fix the bug. Tom> v2 of this patch combines the implementations and moves them to Tom> gdbsupport. I tried making these standalone functions in rsp-low.cc, Tom> but that runs afoul of libipa. So, I made them methods of ptid_t. Tom> The new unit tests pointed out that round-tripping a sign-extended Tom> number didn't really work, because the checks were done via ULONGEST. Tom> It's kind of unfortunate that the PID and LWP are host-dependent Tom> types. This should probably be fixed, but I haven't done so here. Maybe this should be done. Also at some point I should update the RSP docs, though the exact update depends on the outcome of whether or not we decide to widen the types. Tom