Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v1 0/8] gdb: various refactoring in linux-tdep
@ 2026-07-03 18:58 Matthieu Longo
  2026-07-03 18:58 ` [PATCH v1 1/8] gdb/linux-tdep: use pid_t consistently for process IDs Matthieu Longo
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Matthieu Longo @ 2026-07-03 18:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: Luis Machado, Luis Machado, Andrew Burgess, Matthieu Longo

This patch series contains a number of refactorings and preparatory changes for upcoming AArch64 features support (POE, a.k.a Memory Protection Keys [1] and POE2) in GDB.

Patch 1 makes the use of pid_t for process IDs consistent throughout the relevant code in gdb/linux-tdep.c.
Patch 2 is an obvious fix changing the return type of linux_fill_prpsinfo from an integer to a boolean.
Patch 3 adds an optional length parameter to target_fileio_read_stralloc.
Patch 4 is a cosmetic change to gdb::array_view, but improving documentation.
Patch 5 adds gdb::replace algorithm for iterators and ranges.
Patch 6 simplifies the boiler plates required to read data from files in /proc, while also providing convenient typed views.
Patch 7 adds support for parsing the "ProtectionKey" field, when present, from /proc/PID/smaps.
Patch 8 adds helpers to read AT_HWCAP3, which exposes Linux kernel's capability bits needed for upcoming GDB features.

All changes were tested by building GDB on x86_64 and AArch64 and running the existing GDB testsuite.

[1]: https://docs.kernel.org/core-api/protection-keys.html

Regards,
Matthieu


Matthieu Longo (8):
  gdb/linux-tdep: use pid_t consistently for process IDs
  gdb/linux-tdep: change linux_fill_prpsinfo to return bool
  target_fileio_read_stralloc: add an optional length parameter
  gdb support: add index_type to array_view for documentation purpose
  gdb support: add gdb::replace algorithm for iterators and ranges
  gdb: introduce helper class file_reader_t
  gdb/linux-tdep: parse ProtectionKey in /proc/PID/smaps
  gdb/linux: add helpers to read AT_HWCAP3

 gdb/amd64-linux-tdep.c  |  12 +-
 gdb/inferior.h          |   2 +-
 gdb/linux-tdep.c        | 329 +++++++++++++++++++++-------------------
 gdb/linux-tdep.h        |  11 ++
 gdb/sparc64-tdep.c      |  12 +-
 gdb/target.c            |  10 +-
 gdb/target.h            |  67 +++++++-
 gdbserver/linux-low.cc  |  10 ++
 gdbserver/linux-low.h   |   4 +
 gdbsupport/array-view.h |  37 ++++-
 10 files changed, 314 insertions(+), 180 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-07-07 15:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox