Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Matthieu Longo <matthieu.longo@arm.com>
Cc: <gdb-patches@sourceware.org>,
	 Luis Machado <luis.machado@amd.com>,
	Luis Machado <luis.machado.foss@gmail.com>,
	 Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH v1 1/8] gdb/linux-tdep: use pid_t consistently for process IDs
Date: Sun, 05 Jul 2026 15:22:15 -0600	[thread overview]
Message-ID: <87se5xgmig.fsf@tromey.com> (raw)
In-Reply-To: <20260703185853.450440-2-matthieu.longo@arm.com> (Matthieu Longo's message of "Fri, 3 Jul 2026 19:58:46 +0100")

>>>>> "Matthieu" == Matthieu Longo <matthieu.longo@arm.com> writes:

Matthieu> Also change inferior::pid to `pid_t' so that the inferior's process ID
Matthieu> uses the appropriate type throughout GDB.

I don't think this is desirable as pid_t is a host type, but the
inferior's process ID has to possibly represent a target scalar.

Probably the current use of 'int' here is also wrong, see those recent
patches I sent and the corresponding bugs.

Instead it should be ptid_t::pid_type.

... and then, ptid_t::pid_type should be LONGEST or, even better, a new
enum with LONGEST as the base type, to avoid doing any arithmetic on it.

I started work on this a while ago but it's a long slog & I haven't
finished.

Tom

  reply	other threads:[~2026-07-05 21:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03 18:58 [PATCH v1 0/8] gdb: various refactoring in linux-tdep Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 1/8] gdb/linux-tdep: use pid_t consistently for process IDs Matthieu Longo
2026-07-05 21:22   ` Tom Tromey [this message]
2026-07-06  9:30     ` Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 2/8] gdb/linux-tdep: change linux_fill_prpsinfo to return bool Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 3/8] target_fileio_read_stralloc: add an optional length parameter Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 4/8] gdb support: add index_type to array_view for documentation purpose Matthieu Longo
2026-07-03 19:55   ` Pedro Alves
2026-07-06 10:51     ` Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 5/8] gdb support: add gdb::replace algorithm for iterators and ranges Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 6/8] gdb: introduce helper class file_reader_t Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 7/8] gdb/linux-tdep: parse ProtectionKey in /proc/PID/smaps Matthieu Longo
2026-07-03 18:58 ` [PATCH v1 8/8] gdb/linux: add helpers to read AT_HWCAP3 Matthieu Longo
2026-07-07 10:39   ` Yury Khrustalev
2026-07-07 15:51     ` Matthieu Longo

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=87se5xgmig.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=luis.machado@amd.com \
    --cc=matthieu.longo@arm.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