Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v7 0/5] Introduce syntax for linker-namespace specific symbols
@ 2026-06-01 19:22 Guinevere Larsen
  2026-06-01 19:22 ` [PATCH v7 1/5] gdb: Create helper function for the current namespace Guinevere Larsen
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Guinevere Larsen @ 2026-06-01 19:22 UTC (permalink / raw)
  To: gdb-patches; +Cc: Guinevere Larsen

This series adds support for the syntax [[N]]::foo to find symbols that
belong to specific namespaces, while also making GDB's behavior more
consistent when a namespace is not specified. This needs 2 preparatory
patches and 2 patches actually implementing this feature, and one final
patch to make symtab searching more consistent with the [[N]]::foo
syntax.

Patch 1 is a small refactor, creating a function to figure out the
current linker namespace. Patch 2 is an essential fix, updating how we
calculate a variable's copy relocation to take linker namespaces into
account.

Patches 3 and 4 implement the new syntax, adding the necessary
supporting code and updating error messages when symbols can't be found
- where it made sense. Patch 5 is a small change to the find_symtab
function, to prefer symtabs from the current linker namespace.

Changes for v7:
* Added 2 new patches to the series, one to solve Andrew's feedback and
  another to fix an inconsistency I found.
* Minor cosmetic fixes
* rebased on master

Changes for v6:
* Rebased on master
* Fixed a crash when using the [[N]]::foo syntax before starting the
  inferior

Changes for v5:
* fixed crash when getting the value of a variable before the inferior
  starts.
* Rebased on master

Changes for v4:
* Fixed final documentation feedback from Eli.
* Changed error message when [[N]]::foo::bar fails to find 'foo'.
* Fixed build breakage.

Changes for v3:
* Removed previous patches 1 and 2, as Simon's recently merged patches
  already did those in a better way.
* parser_state now also takes the current solib_ops, since that can't be
  obtained from gdbarch anymore.

Changes for v2:
* solib_supports_linker_namespaces now always expects a pointer.
* Previous patches 2 and 3 were dropped.
* lookup_minimal_symbol_linkage now takes an array_view.
* created new tokens for [[ and ]], to ensure that [[N]] looks like
  that.
* Fixed formatting nits from Eli.


Guinevere Larsen (5):
  gdb: Create helper function for the current namespace
  gdb: make lookup_minimal_symbol_linkage work with linker namespaces
  gdb: Make the parser recognize the [[N]] syntax for variables
  gdb: extend the [[N]]::foo syntax for files
  gdb: prefer symtabs for the current linker namespace

 gdb/NEWS                                     |   5 +
 gdb/c-exp.y                                  |  93 ++++++++++---
 gdb/doc/gdb.texinfo                          |   6 +
 gdb/dwarf2/ada-imported.c                    |   8 +-
 gdb/linespec.c                               |   4 +-
 gdb/minsyms.c                                | 137 ++++++++++++-------
 gdb/minsyms.h                                |  21 ++-
 gdb/parse.c                                  |   3 +-
 gdb/parser-defs.h                            |  50 ++++++-
 gdb/rust-parse.c                             |   3 +-
 gdb/solib-svr4.c                             |  20 ---
 gdb/solib.c                                  | 108 +++++++++++++--
 gdb/solib.h                                  |  29 ++++
 gdb/symtab.c                                 |  94 +++++++++++--
 gdb/symtab.h                                 |  12 +-
 gdb/testsuite/gdb.base/dlmopen-ns-ids-lib.c  |  14 ++
 gdb/testsuite/gdb.base/dlmopen-ns-ids-main.c |   8 ++
 gdb/testsuite/gdb.base/dlmopen-ns-ids.exp    |  83 +++++++++++
 18 files changed, 570 insertions(+), 128 deletions(-)


base-commit: 909db30adab1688870e978c85d014d4a36641f4e
-- 
2.54.0


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

end of thread, other threads:[~2026-06-22 20:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-01 19:22 [PATCH v7 0/5] Introduce syntax for linker-namespace specific symbols Guinevere Larsen
2026-06-01 19:22 ` [PATCH v7 1/5] gdb: Create helper function for the current namespace Guinevere Larsen
2026-06-01 19:22 ` [PATCH v7 2/5] gdb: make lookup_minimal_symbol_linkage work with linker namespaces Guinevere Larsen
2026-06-01 19:22 ` [PATCH v7 3/5] gdb: Make the parser recognize the [[N]] syntax for variables Guinevere Larsen
2026-06-01 19:22 ` [PATCH v7 4/5] gdb: extend the [[N]]::foo syntax for files Guinevere Larsen
2026-06-01 19:22 ` [PATCH v7 5/5] gdb: prefer symtabs for the current linker namespace Guinevere Larsen
2026-06-03 18:26   ` Guinevere Larsen
2026-06-03 19:16 ` [PATCH v7 5/5] Fixed " Guinevere Larsen
2026-06-22 20:35 ` [PING][PATCH v7 0/5] Introduce syntax for linker-namespace specific symbols Guinevere Larsen

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