Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: Re: [PATCH] Do not write negative PID or TID in remote protocol
Date: Thu, 12 Mar 2026 12:42:03 -0700	[thread overview]
Message-ID: <20260312124203.14b9e893@f42-zbm-amd> (raw)
In-Reply-To: <20260311202152.2704410-1-tromey@adacore.com>

On Wed, 11 Mar 2026 14:21:52 -0600
Tom Tromey <tromey@adacore.com> wrote:

> From: Tom Tromey <tromey@adacore.com>
> To: gdb-patches@sourceware.org
> Cc: Tom Tromey <tromey@adacore.com>
> 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 <kevinb@redhat.com>


      reply	other threads:[~2026-03-12 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 20:21 Tom Tromey
2026-03-12 19:42 ` Kevin Buettner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260312124203.14b9e893@f42-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox