Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Lancelot SIX <Lancelot.Six@amd.com>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Windows/rocm-solib: Don't hardcode namespaces support
Date: Fri, 3 Jul 2026 11:46:59 +0100	[thread overview]
Message-ID: <73856a87-1dbe-4311-be05-ac20f045a936@amd.com> (raw)
In-Reply-To: <20260702111521.320404-1-pedro@palves.net>

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
> 


      reply	other threads:[~2026-07-03 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 11:15 Pedro Alves
2026-07-03 10:46 ` Lancelot SIX [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73856a87-1dbe-4311-be05-ac20f045a936@amd.com \
    --to=lancelot.six@amd.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox