public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug remote/25111] [Zephyr/thread aware debugging] remote: write_ptid returns negative tid. Date: Thu, 15 Feb 2024 16:59:11 +0000 [thread overview] Message-ID: <bug-25111-4717-FaRvLD9vjO@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-25111-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=25111 --- Comment #8 from Tom Tromey <tromey at sourceware dot org> --- I looked a little. Changing ptid_t::pid_type to be unsigned is probably a colossal change, bordering on the impossible. However, it does seem that negative values aren't really intended -- except for the special case of -1. The manual says: The PID (process) and TID (thread) components each have the format described above: a positive number with target-specific interpretation formatted as a big-endian hex string, literal ‘-1’ to indicate all processes or threads (respectively), or ‘0’ to indicate an arbitrary process or thread. So in remote_target::write_ptid, I wonder if it's sufficient to change the "pid < 0" check to "pid == -1" (and likewise for tid). -- You are receiving this mail because: You are on the CC list for the bug.
prev parent reply other threads:[~2024-02-15 16:59 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-25111-4717@http.sourceware.org/bugzilla/> 2021-11-07 8:04 ` fredrik.hederstierna@securitas-direct.com 2021-11-07 8:06 ` fredrik.hederstierna@securitas-direct.com 2021-11-07 12:44 ` simark at simark dot ca 2022-01-07 21:11 ` tromey at sourceware dot org 2022-01-07 21:11 ` tromey at sourceware dot org 2023-08-03 17:07 ` tromey at sourceware dot org 2023-08-04 7:32 ` fredrik.hederstierna@securitas-direct.com 2024-02-15 16:59 ` tromey at sourceware dot org [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=bug-25111-4717-FaRvLD9vjO@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).