Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v4 00/10] Multiple solib_ops in a program_space
@ 2026-08-07 13:52 Simon Marchi
  2026-08-07 13:52 ` [PATCH v4 01/10] gdb/solib-rocm: assert that host ops isn't rocm_solib_ops Simon Marchi
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Simon Marchi @ 2026-08-07 13:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

This is v4 of

  https://inbox.sourceware.org/gdb-patches/20260708215145.93134-1-simon.marchi@polymtl.ca/

This version has a minor change in patch 8 ("gdb: add objfile -> solib
backlink"), which consists of removing the objfile::solibs() method and
add an objfile::first_solib() one.  Patch 10 was adjusted to use it.

The patches without explicit approvals are still:

 - [06/10] gdb/solib-rocm: move per-inferior data to rocm_solib_ops
 - [08/10] gdb: add objfile -> solib backlink

Below is the original cover letter, which still applies.

This series adds support for having multiple solib_ops instances
providing solibs for a given program_space.  The main use case to
justify this change is to make rocm_solib_ops less clunky.

When debugging ROCm programs, we need to have an instance of
svr4_solib_ops providing solibs for host shared libraries, and
an instance of rocm_solib_ops providing solibs for device code objects.
Since there can only be one solib_ops in a program, rocm_solib_ops has
to wrap and replce the svr4_solib_ops instance previously installed.

By allowing multiple solib_ops in the same program_space, the two
solib_ops instances can co-exist without knowing each other.

The main change is contained in the last patch.  The patches before that
are cleanup or preparatory patches.

Simon Marchi (10):
  gdb/solib-rocm: assert that host ops isn't rocm_solib_ops
  gdb/solib-rocm: pass reference to cache to
    rocm_code_object_stream_file
  gdb/solib-rocm: add cached_target_fd to manage cached fd lifetime
  gdb: de-constify some methods of solib_ops
  gdb/solib: add remove_solib function
  gdb/solib-rocm: move per-inferior data to rocm_solib_ops
  gdb/solib-rocm: save inferior in rocm_solib_ops
  gdb: add objfile -> solib backlink
  gdb: change default objfile iteration order to start with current
    objfile
  gdb: multiple solib_ops per program space

 gdb/amd-dbgapi-target.c                  |   3 +-
 gdb/infcmd.c                             |  16 +-
 gdb/inferior.h                           |   6 +-
 gdb/infrun.c                             |   7 +-
 gdb/objfiles.h                           |  25 ++
 gdb/observable.h                         |   8 +-
 gdb/progspace.c                          |  92 +++++-
 gdb/progspace.h                          |  57 ++--
 gdb/solib-aix.c                          |  14 +-
 gdb/solib-darwin.c                       |  14 +-
 gdb/solib-dsbt.c                         |  10 +-
 gdb/solib-frv.c                          |  10 +-
 gdb/solib-rocm.c                         | 342 ++++++++++-------------
 gdb/solib-svr4.c                         |  60 ++--
 gdb/solib-svr4.h                         |  20 +-
 gdb/solib-target.c                       |   4 +-
 gdb/solib-target.h                       |   2 +-
 gdb/solib.c                              | 322 ++++++++++++---------
 gdb/solib.h                              |  44 ++-
 gdb/target.c                             |   2 +-
 gdb/testsuite/gdb.rocm/symbol-lookup.cpp | 320 +++++++++++++++++++++
 gdb/testsuite/gdb.rocm/symbol-lookup.exp | 243 ++++++++++++++++
 gdb/windows-tdep.c                       |  46 +--
 23 files changed, 1184 insertions(+), 483 deletions(-)
 create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.cpp
 create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.exp


base-commit: 6e72ff251801b05ec10bed36130647985658d7c3
-- 
2.55.0


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

end of thread, other threads:[~2026-08-21 19:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 13:52 [PATCH v4 00/10] Multiple solib_ops in a program_space Simon Marchi
2026-08-07 13:52 ` [PATCH v4 01/10] gdb/solib-rocm: assert that host ops isn't rocm_solib_ops Simon Marchi
2026-08-07 13:52 ` [PATCH v4 02/10] gdb/solib-rocm: pass reference to cache to rocm_code_object_stream_file Simon Marchi
2026-08-07 13:52 ` [PATCH v4 03/10] gdb/solib-rocm: add cached_target_fd to manage cached fd lifetime Simon Marchi
2026-08-07 13:52 ` [PATCH v4 04/10] gdb: de-constify some methods of solib_ops Simon Marchi
2026-08-07 13:52 ` [PATCH v4 05/10] gdb/solib: add remove_solib function Simon Marchi
2026-08-07 13:52 ` [PATCH v4 06/10] gdb/solib-rocm: move per-inferior data to rocm_solib_ops Simon Marchi
2026-08-21 19:19   ` Tom Tromey
2026-08-07 13:52 ` [PATCH v4 07/10] gdb/solib-rocm: save inferior in rocm_solib_ops Simon Marchi
2026-08-07 13:52 ` [PATCH v4 08/10] gdb: add objfile -> solib backlink Simon Marchi
2026-08-21 19:24   ` Tom Tromey
2026-08-07 13:52 ` [PATCH v4 09/10] gdb: change default objfile iteration order to start with current objfile Simon Marchi
2026-08-07 13:52 ` [PATCH v4 10/10] gdb: multiple solib_ops per program space Simon Marchi

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