From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Document remote protocol pid and thread id sizes
Date: Fri, 03 Jul 2026 08:42:19 +0300 [thread overview]
Message-ID: <86fr20bpdw.fsf@gnu.org> (raw)
In-Reply-To: <20260702193556.2668618-1-tromey@adacore.com> (message from Tom Tromey on Thu, 2 Jul 2026 13:35:56 -0600)
> From: Tom Tromey <tromey@adacore.com>
> Cc: Tom Tromey <tromey@adacore.com>
> Date: Thu, 2 Jul 2026 13:35:56 -0600
>
> The recent ptid work came from a bug where a problem was observed due
> to sign extension. That bug also suggested documenting the guaranteed
> range of thread- and process-ids in the remote protocol.
>
> This patch documents these as being 32-bit values at minimum. I also
> added static asserts to ensure this is true -- note that although
> 'int' may be 16 bit per the C standard, I doubt gdb would build on
> such a host.
>
> I didn't specify a maximum because it is host-dependent. This is
> perhaps something to change, and while I do have some work in this
> area, it's quite invasive. Also, while widening the range here would
> be good, it would also be incompatible in a sense, where a newer
> protocol implementation may end up using values not supported by older
> versions of gdb. Perhaps one idea would be to simply change these
> both to int32_t and move on.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33979
> ---
> gdb/doc/gdb.texinfo | 11 +++++++----
> gdbsupport/ptid.h | 4 ++++
> 2 files changed, 11 insertions(+), 4 deletions(-)
Thanks, the documentation part is okay.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2026-07-03 5:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 19:35 Tom Tromey
2026-07-03 5:42 ` Eli Zaretskii [this message]
2026-07-16 18:49 ` Tom Tromey
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=86fr20bpdw.fsf@gnu.org \
--to=eliz@gnu.org \
--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