[v1,0/6] gdb: introduce file_reader_t to read procfs files

Message ID 20260728151700.253720-1-matthieu.longo@arm.com
Headers
Series gdb: introduce file_reader_t to read procfs files |

Message

Matthieu Longo July 28, 2026, 3:16 p.m. UTC
  Those patches were extracted from a previous patch series [1].
Patches 1 and 2 are prerequisites to the next patches.
Patch 3 introduces class file_reader_t, and patches 4, 5, and 5 migrates existing code to use this new class.

Changes diff against [1]:
- remove reimplementation of std::replace, and use std::replace for gdb::ranges::replace.
- addressed comments from Christina Schimpe and Chirstina Joos regarding the interface of class file_reader_t.
- fix the implementation of extract_string_view_from_buffer after Luis found bugs in the previous implementation.

This patch series depends on [2].

[1]: https://inbox.sourceware.org/gdb-patches/20260707154900.94542-1-matthieu.longo@arm.com/
[2]: https://inbox.sourceware.org/gdb-patches/20260728143317.245389-1-matthieu.longo@arm.com/

Regards,
Matthieu

Matthieu Longo (6):
  target_fileio_read_stralloc: add an optional length parameter
  gdb support: add gdb::ranges::replace algorithm
  gdb: introduce helper class file_reader_t
  gdb/linux-tdep: migrate linux_info_proc to file_reader_t
  gdb/linux-tdep: migrate linux_find_memory_regions_full to file_reader_t
  gdb/linux-tdep: remove legacy parse_smaps_data overload

 gdb/amd64-linux-tdep.c  |  12 +-
 gdb/linux-tdep.c        | 285 +++++++++++++++++++++-------------------
 gdb/sparc64-tdep.c      |  13 +-
 gdb/target.c            |  11 +-
 gdb/target.h            |  99 ++++++++++++--
 gdbsupport/array-view.h |  16 +++
 6 files changed, 273 insertions(+), 163 deletions(-)
  

Comments

Joos, Christina July 28, 2026, 3:43 p.m. UTC | #1
> -----Original Message-----
> From: Matthieu Longo <matthieu.longo@arm.com>
> Sent: Dienstag, 28. Juli 2026 17:17
> To: gdb-patches@sourceware.org
> Cc: Luis Machado <luis.machado@amd.com>; Luis Machado
> <luis.machado.foss@gmail.com>; Thiago Jung Bauermann
> <thiago.bauermann@linaro.org>; Simon Marchi <simark@simark.ca>; Kevin
> Buettner <kevinb@redhat.com>; Joos, Christina <christina.joos@intel.com>;
> Joos, Christina <christina.joos@intel.com>; Matthieu Longo
> <matthieu.longo@arm.com>
> Subject: [PATCH v1 0/6] gdb: introduce file_reader_t to read procfs files
> 
> Those patches were extracted from a previous patch series [1].
> Patches 1 and 2 are prerequisites to the next patches.
> Patch 3 introduces class file_reader_t, and patches 4, 5, and 5 migrates existing
> code to use this new class.
> 
> Changes diff against [1]:
> - remove reimplementation of std::replace, and use std::replace for
> gdb::ranges::replace.
> - addressed comments from Christina Schimpe and Chirstina Joos regarding the
> interface of class file_reader_t.

Hi Matthieu, 

Just to avoid confusion: 
Christina Schimpe and Christina Joos is the same person. My name changed recently:
https://sourceware.org/pipermail/gdb-patches/2026-July/228900.html

Christina

Intel Deutschland GmbH

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928