Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/3] Introduce syntax for linker-namespace specific symbols
@ 2025-06-19 18:05 Guinevere Larsen
  2025-06-19 18:05 ` [PATCH v3 1/3] gdb: make lookup_minimal_symbol_linkage work with linker namespaces Guinevere Larsen
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Guinevere Larsen @ 2025-06-19 18:05 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 one preparatory
patch and 2 patches actually implementing this feature

Patch 1 is an essential fix, updating how we calculate a variable's copy
relocation to take linker namespaces into account.

Patches 2 and 3 implement the new syntax, adding the necessary
supporting code and updating error messages when symbols can't be found
- where it made sense.

Do note that this series is built on top Simon's recent C++ification of
the solib_ops class, since it has better solutions to some problems than
my old versions.  It should be reviewed with that series in mind.

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 (3):
  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/NEWS                                     |   6 +
 gdb/c-exp.y                                  |  82 ++++++++---
 gdb/doc/gdb.texinfo                          |   6 +
 gdb/dwarf2/ada-imported.c                    |   8 +-
 gdb/linespec.c                               |   4 +-
 gdb/minsyms.c                                | 135 ++++++++++++-------
 gdb/minsyms.h                                |  17 ++-
 gdb/parse.c                                  |   3 +-
 gdb/parser-defs.h                            |  37 ++++-
 gdb/rust-parse.c                             |   3 +-
 gdb/solib-svr4.c                             |  20 ---
 gdb/solib.c                                  |  82 ++++++++++-
 gdb/solib.h                                  |  19 +++
 gdb/symtab.c                                 |  74 +++++++++-
 gdb/symtab.h                                 |  15 ++-
 gdb/testsuite/gdb.base/dlmopen-ns-ids-lib.c  |  14 ++
 gdb/testsuite/gdb.base/dlmopen-ns-ids-main.c |   3 +
 gdb/testsuite/gdb.base/dlmopen-ns-ids.exp    |  54 ++++++++
 18 files changed, 473 insertions(+), 109 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-07-10 21:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-19 18:05 [PATCH v3 0/3] Introduce syntax for linker-namespace specific symbols Guinevere Larsen
2025-06-19 18:05 ` [PATCH v3 1/3] gdb: make lookup_minimal_symbol_linkage work with linker namespaces Guinevere Larsen
2025-06-19 18:05 ` [PATCH v3 2/3] gdb: Make the parser recognize the [[N]] syntax for variables Guinevere Larsen
2025-06-20  6:57   ` Eli Zaretskii
2025-07-07 19:18     ` Guinevere Larsen
2025-06-19 18:05 ` [PATCH v3 3/3] gdb: extend the [[N]]::foo syntax for files Guinevere Larsen
2025-07-10  2:02   ` Kevin Buettner
2025-07-10 14:47     ` Guinevere Larsen
2025-07-10  2:27   ` Kevin Buettner
2025-07-10 15:07     ` Guinevere Larsen
2025-07-10 21:56       ` Kevin Buettner
2025-07-07 19:01 ` [PING][PATCH v3 0/3] 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