Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH v5 0/3] [gdb/exp] Fix some namespace issues
@ 2026-04-19  8:12 Tom de Vries
  2026-04-19  8:12 ` [PATCH v5 1/3] [gdb] Break up complex assignment in cp_lookup_symbol_via_imports Tom de Vries
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tom de Vries @ 2026-04-19  8:12 UTC (permalink / raw)
  To: gdb-patches

Hafiz Abid Qadeer reported PR34034, a problem with namespace handling using a
Fortran program.  I wrote an equivalent program in C++, and reproduced the
reported problem with both.  While investigating the problem, I ran into
another problem, for which I filed PR34051.

This series contains three patches.

The first patch refactors a complex assignment in
cp_lookup_symbol_via_imports.

The second patch fixes PR34051, in that same assignment.

The third patch fixes PR34034.

Tested on aarch64-linux.

A v1 was submitted here [1].

Changes in v2 [2]:
- updated type of directive_match to bool

Changes in v3 [3]:
- fixed top-level "return -1" in test-case
- fixed typo in test-case

Changes in v4 [4]:
- don't use 1 to set bool
- added approval tag to first patch
- replaced "block->function () != nullptr" with
  "block->function_block () != nullptr" to handle the case that current block
  is not a function block, but nested in one
- extended test-case to exercise nested block scenario

Changes in v5:
- add third patch to fix PR34034
- update description subject to reflect that we're fixing two PRs

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34034
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34051

[1] v1 https://sourceware.org/pipermail/gdb-patches/2026-April/226370.html
[2] v2 https://sourceware.org/pipermail/gdb-patches/2026-April/226375.html
[3] v3 https://sourceware.org/pipermail/gdb-patches/2026-April/226433.html
[4] v4 https://sourceware.org/pipermail/gdb-patches/2026-April/226488.html

Tom de Vries (3):
  [gdb] Break up complex assignment in cp_lookup_symbol_via_imports
  [gdb/exp] Fix ignoring of incorrect namespace prefix
  [gdb/exp] Handle recursive namespace import

 gdb/cp-namespace.c                 | 36 +++++++++++----
 gdb/testsuite/gdb.cp/nsusing-2.cc  | 62 +++++++++++++++++++++++++
 gdb/testsuite/gdb.cp/nsusing-2.exp | 74 ++++++++++++++++++++++++++++++
 3 files changed, 162 insertions(+), 10 deletions(-)
 create mode 100644 gdb/testsuite/gdb.cp/nsusing-2.cc
 create mode 100644 gdb/testsuite/gdb.cp/nsusing-2.exp


base-commit: 748464badd66456a014aa306501acf17bd73f485
-- 
2.51.0


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

end of thread, other threads:[~2026-05-12 10:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-19  8:12 [PATCH v5 0/3] [gdb/exp] Fix some namespace issues Tom de Vries
2026-04-19  8:12 ` [PATCH v5 1/3] [gdb] Break up complex assignment in cp_lookup_symbol_via_imports Tom de Vries
2026-04-19  8:12 ` [PATCH v5 2/3] [gdb/exp] Fix ignoring of incorrect namespace prefix Tom de Vries
2026-05-01 19:44   ` Tom Tromey
2026-05-12 10:15     ` Tom de Vries
2026-05-12 10:24       ` Tom de Vries
2026-04-19  8:12 ` [PATCH v5 3/3] [gdb/exp] Handle recursive namespace import Tom de Vries
2026-05-01 19:37   ` Tom Tromey
2026-05-12 10:22     ` Tom de Vries

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