Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 00/11] Multiple solib_ops in a program_space
@ 2025-12-09 19:32 Simon Marchi
  2025-12-09 19:32 ` [PATCH 01/11] gdb/solib-rocm: assert that host ops isn't rocm_solib_ops Simon Marchi
                   ` (11 more replies)
  0 siblings, 12 replies; 35+ messages in thread
From: Simon Marchi @ 2025-12-09 19:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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 (11):
  gdb/solib-rocm: assert that host ops isn't rocm_solib_ops
  gdb/solib: use early return in solib_read_symbols
  gdb/solib-rocm: pass reference to cache to
    rocm_code_object_stream_file
  gdb/solib-rocm: add cached_fd to manage cached fd lifetime
  gdb: de-constify some methods of solib_ops
  gdb/solib-rocm: move per-inferior data to rocm_solib_ops
  gdb/solib-rocm: save inferior in rocm_solib_ops
  gdb/solib: add remove_solib function
  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                           |  23 ++
 gdb/observable.h                         |   8 +-
 gdb/progspace.c                          |  91 +++++-
 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                         | 348 +++++++++-----------
 gdb/solib-svr4.c                         |  60 ++--
 gdb/solib-svr4.h                         |  20 +-
 gdb/solib-target.c                       |   4 +-
 gdb/solib-target.h                       |   2 +-
 gdb/solib.c                              | 393 +++++++++++++----------
 gdb/solib.h                              |  50 ++-
 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, 1221 insertions(+), 526 deletions(-)
 create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.cpp
 create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.exp


base-commit: bfc430c99b66ab12643a65388c4ace925ebd68b2
-- 
2.52.0


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

end of thread, other threads:[~2026-06-08 18:36 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09 19:32 [PATCH 00/11] Multiple solib_ops in a program_space Simon Marchi
2025-12-09 19:32 ` [PATCH 01/11] gdb/solib-rocm: assert that host ops isn't rocm_solib_ops Simon Marchi
2026-05-07 17:56   ` [PATCH 1/11] " Lancelot SIX
2026-05-08  1:37     ` Simon Marchi
2026-05-08 10:36       ` Lancelot SIX
2026-06-08 18:36         ` Simon Marchi
2025-12-09 19:32 ` [PATCH 02/11] gdb/solib: use early return in solib_read_symbols Simon Marchi
2026-04-28 16:16   ` Tom Tromey
2026-05-08  1:44     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 03/11] gdb/solib-rocm: pass reference to cache to rocm_code_object_stream_file Simon Marchi
2026-05-07 18:20   ` [PATCH 3/11] " Lancelot SIX
2026-05-08  1:48     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 04/11] gdb/solib-rocm: add cached_fd to manage cached fd lifetime Simon Marchi
2026-05-07 20:17   ` [PATCH 4/11] " Lancelot SIX
2026-05-08  1:52     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 05/11] gdb: de-constify some methods of solib_ops Simon Marchi
2025-12-09 19:32 ` [PATCH 06/11] gdb/solib-rocm: move per-inferior data to rocm_solib_ops Simon Marchi
2026-04-28 16:19   ` Tom Tromey
2026-05-08  2:02     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 07/11] gdb/solib-rocm: save inferior in rocm_solib_ops Simon Marchi
     [not found]   ` <87a4unm59w.fsf@tromey.com>
2026-05-08  2:10     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 08/11] gdb/solib: add remove_solib function Simon Marchi
2026-04-28 16:23   ` Tom Tromey
2025-12-09 19:32 ` [PATCH 09/11] gdb: add objfile -> solib backlink Simon Marchi
2026-04-28 16:28   ` Tom Tromey
2026-05-08  2:25     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 10/11] gdb: change default objfile iteration order to start with current objfile Simon Marchi
2026-04-28 16:42   ` Tom Tromey
2026-05-08  2:40     ` Simon Marchi
2025-12-09 19:32 ` [PATCH 11/11] gdb: multiple solib_ops per program space Simon Marchi
2026-04-28 17:27   ` Tom Tromey
2026-05-08  2:52     ` Simon Marchi
2026-04-28 16:00 ` [PATCH 00/11] Multiple solib_ops in a program_space Simon Marchi
2026-04-28 17:28   ` Tom Tromey
2026-05-08  2:40     ` Simon Marchi

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