* [PATCH] Windows/rocm-solib: Don't hardcode namespaces support
@ 2026-07-02 11:15 Pedro Alves
2026-07-03 10:46 ` Lancelot SIX
0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2026-07-02 11:15 UTC (permalink / raw)
To: gdb-patches; +Cc: Lancelot SIX
rocm_solib_ops currently unconditionally returns true to
solib_ops::supports_namespaces. That works OK on Linux where the
underlying solib ops is svr4. But on Windows, the underlying solib
ops is solib-target, which does not support namespaces. The result
is:
(gdb) info shared
/home/pedro/rocm/gdb/build/gdb/solib.h:270: internal-error: num_active_namespaces: namespaces not supported
A problem internal to GDB has been detected,
further debugging may prove unreliable.
...
Thread 1 hit Breakpoint 1, internal_verror (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported", ap=0xfff1a8 "\270\374'", <incomplete sequence \367\177>)
at /home/pedro/rocm/gdb/build/gdb/utils.c:514
514 internal_vproblem (&internal_error_problem, file, line, fmt, ap);
(gdb) bt
#0 internal_verror (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported", ap=0xfff1a8 "\270\374'", <incomplete sequence \367\177>)
at /home/pedro/rocm/gdb/build/gdb/utils.c:514
#1 0x00007ff719c75cf4 in internal_error_loc (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported") at /home/pedro/rocm/gdb/build/gdbsupport/errors.cc:57
#2 0x00007ff719f0aafe in solib_ops::num_active_namespaces (this=0xbb3a0b0) at /home/pedro/rocm/gdb/build/gdb/solib.h:270
#3 0x00007ff719eca99e in rocm_solib_ops::num_active_namespaces (this=0xc9388a0) at /home/pedro/rocm/gdb/build/gdb/solib-rocm.c:211
#4 0x00007ff719a14d33 in print_solib_list_table (solib_list=..., print_namespace=true) at /home/pedro/rocm/gdb/build/gdb/solib.c:1011
#5 0x00007ff719a15833 in info_sharedlibrary_command (pattern=0x0, from_tty=1) at /home/pedro/rocm/gdb/build/gdb/solib.c:1115
rocm_solib_ops will stop sitting on top of another solib
implementation once the multi solib provider work lands, but
meanwhile, it'd be helpful to not crash.
Fix this by making rocm_solib_ops::supports_namespaces() delegate to
the underlying host solib ops like other methods do.
Change-Id: I1627c6e2f1b1c171c013c8457e9bfca92d5f4dc5
---
gdb/solib-rocm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c
index 3a58a46d886..73797801d6c 100644
--- a/gdb/solib-rocm.c
+++ b/gdb/solib-rocm.c
@@ -202,7 +202,7 @@ struct rocm_solib_ops : public solib_ops
{ return m_host_ops->find_solib_addr (so); }
bool supports_namespaces () const override
- { return true; }
+ { return m_host_ops->supports_namespaces (); }
int find_solib_ns (const solib &so) const override
{ return m_host_ops->find_solib_ns (so); }
base-commit: 18ca02157d9cc245f035452e397a07a3787034d0
--
2.54.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Windows/rocm-solib: Don't hardcode namespaces support
2026-07-02 11:15 [PATCH] Windows/rocm-solib: Don't hardcode namespaces support Pedro Alves
@ 2026-07-03 10:46 ` Lancelot SIX
0 siblings, 0 replies; 2+ messages in thread
From: Lancelot SIX @ 2026-07-03 10:46 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 02/07/2026 12:15, Pedro Alves wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> rocm_solib_ops currently unconditionally returns true to
> solib_ops::supports_namespaces. That works OK on Linux where the
> underlying solib ops is svr4. But on Windows, the underlying solib
> ops is solib-target, which does not support namespaces. The result
> is:
>
> (gdb) info shared
> /home/pedro/rocm/gdb/build/gdb/solib.h:270: internal-error: num_active_namespaces: namespaces not supported
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> ...
> Thread 1 hit Breakpoint 1, internal_verror (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
> fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported", ap=0xfff1a8 "\270\374'", <incomplete sequence \367\177>)
> at /home/pedro/rocm/gdb/build/gdb/utils.c:514
> 514 internal_vproblem (&internal_error_problem, file, line, fmt, ap);
> (gdb) bt
> #0 internal_verror (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
> fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported", ap=0xfff1a8 "\270\374'", <incomplete sequence \367\177>)
> at /home/pedro/rocm/gdb/build/gdb/utils.c:514
> #1 0x00007ff719c75cf4 in internal_error_loc (file=0x7ff71a27fc80 <SCRIPTING_SEARCH_FLAG+52> "/home/pedro/rocm/gdb/build/gdb/solib.h", line=270,
> fmt=0x7ff71a27fc5e <SCRIPTING_SEARCH_FLAG+18> "%s: namespaces not supported") at /home/pedro/rocm/gdb/build/gdbsupport/errors.cc:57
> #2 0x00007ff719f0aafe in solib_ops::num_active_namespaces (this=0xbb3a0b0) at /home/pedro/rocm/gdb/build/gdb/solib.h:270
> #3 0x00007ff719eca99e in rocm_solib_ops::num_active_namespaces (this=0xc9388a0) at /home/pedro/rocm/gdb/build/gdb/solib-rocm.c:211
> #4 0x00007ff719a14d33 in print_solib_list_table (solib_list=..., print_namespace=true) at /home/pedro/rocm/gdb/build/gdb/solib.c:1011
> #5 0x00007ff719a15833 in info_sharedlibrary_command (pattern=0x0, from_tty=1) at /home/pedro/rocm/gdb/build/gdb/solib.c:1115
>
> rocm_solib_ops will stop sitting on top of another solib
> implementation once the multi solib provider work lands, but
> meanwhile, it'd be helpful to not crash.
>
> Fix this by making rocm_solib_ops::supports_namespaces() delegate to
> the underlying host solib ops like other methods do.
>
> Change-Id: I1627c6e2f1b1c171c013c8457e9bfca92d5f4dc5
Hi Pedro,
This looks good to me, thanks.
Approved-by: Lancelot Six <lancelot.six@amd.com> (amdgpu)
Best,
Lancelot.
> ---
> gdb/solib-rocm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/solib-rocm.c b/gdb/solib-rocm.c
> index 3a58a46d886..73797801d6c 100644
> --- a/gdb/solib-rocm.c
> +++ b/gdb/solib-rocm.c
> @@ -202,7 +202,7 @@ struct rocm_solib_ops : public solib_ops
> { return m_host_ops->find_solib_addr (so); }
>
> bool supports_namespaces () const override
> - { return true; }
> + { return m_host_ops->supports_namespaces (); }
>
> int find_solib_ns (const solib &so) const override
> { return m_host_ops->find_solib_ns (so); }
>
> base-commit: 18ca02157d9cc245f035452e397a07a3787034d0
> --
> 2.54.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-03 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 11:15 [PATCH] Windows/rocm-solib: Don't hardcode namespaces support Pedro Alves
2026-07-03 10:46 ` Lancelot SIX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox