a thread. Normally these are positive numbers with a target-specific
interpretation, formatted as big-endian hex strings. A @var{thread-id}
can also be a literal @samp{-1} to indicate all threads, or @samp{0} to
-pick any thread.
+pick any thread. @value{GDBN} guarantees that values of up to 32 bits
+will work here.
In addition, the remote protocol supports a multiprocess feature in
which the @var{thread-id} syntax is extended to optionally include both
indicate an arbitrary process or thread. Specifying just a process, as
@samp{p@var{pid}}, is equivalent to @samp{p@var{pid}.-1}. It is an
error to specify all processes but a specific thread, such as
-@samp{p-1.@var{tid}}. Note that the @samp{p} prefix is @emph{not} used
-for those packets and replies explicitly documented to include a process
-ID, rather than a @var{thread-id}.
+@samp{p-1.@var{tid}}. @value{GDBN} guarantees that values of up to 32
+bits will work for both @var{pid} and @var{tid}. Note that the
+@samp{p} prefix is @emph{not} used for those packets and replies
+explicitly documented to include a process ID, rather than a
+@var{thread-id}.
The multiprocess @var{thread-id} syntax extensions are only used if both
@value{GDBN} and the stub report support for the @samp{multiprocess}
using lwp_type = long;
using tid_type = ULONGEST;
+ /* These limits are documented in the manual. */
+ static_assert (sizeof (pid_type) >= 4);
+ static_assert (sizeof (lwp_type) >= 4);
+
/* Must have a trivial defaulted default constructor so that the
type remains POD. */
ptid_t () noexcept = default;