From: Tom Tromey <tromey@adacore.com>
To: Mark Wielaard <mark@klomp.org>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Do not write negative PID or TID in remote protocol
Date: Thu, 02 Jul 2026 12:29:49 -0600 [thread overview]
Message-ID: <87ik6xfdnm.fsf@tromey.com> (raw)
In-Reply-To: <20260702101855.GI4673@gnu.wildebeest.org> (Mark Wielaard's message of "Thu, 2 Jul 2026 12:18:55 +0200")
Mark> It looks like there is still something wrong on 32bit arches.
Mark> At least after this patch the i386 debian buildbot fails:
Mark> https://builder.sourceware.org/buildbot/#/builders/105/builds/12989
I'm sorry about that. This patch turned out to be kind of bad.
I built a -m32 gdb to reproduce this and I'll send the fix shortly.
>> + hex = hex_or_minus_one (p, &pp, for_remote);
>> + if (pp == p)
>> + error (_("invalid remote ptid: %s"), buf);
>> +
>> + lwp = (ptid_t::lwp_type) hex;
>> + if (hex != ((unsigned_lwp_type) lwp))
>> + error (_("invalid remote ptid: %s"), buf);
Mark> Are the types/castes here correct? hex is an ULONGEST that is being
Mark> cast to an ptid_t::lwp_type and then an unsigned_lwp_type. Then this
Mark> sanity check seems to fail (on i386 at least). I think this is because
Mark> ULONGEST on i386 is unsigned long long, while unsigned_lwp_type is
Mark> unsigned long.
Yes, I agree; and I think the fix is to special-case the "-1" value
here.
Tom
next prev parent reply other threads:[~2026-07-02 18:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 17:59 Tom Tromey
2026-06-12 15:23 ` Tom Tromey
2026-07-01 17:47 ` Tom Tromey
2026-07-02 10:18 ` Mark Wielaard
2026-07-02 18:29 ` Tom Tromey [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-11 20:21 Tom Tromey
2026-03-12 19:42 ` Kevin Buettner
2026-04-30 17:33 ` 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=87ik6xfdnm.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mark@klomp.org \
/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