Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Guinevere Larsen <guinevere@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3 3/3] gdb: extend the [[N]]::foo syntax for files
Date: Thu, 10 Jul 2025 14:56:20 -0700	[thread overview]
Message-ID: <20250710145620.1549db70@f41-zbm-amd> (raw)
In-Reply-To: <021778bb-0e9e-43f4-a462-d3b2bc3415dd@redhat.com>

On Thu, 10 Jul 2025 12:07:48 -0300
Guinevere Larsen <guinevere@redhat.com> wrote:

> On 7/9/25 11:27 PM, Kevin Buettner wrote:
> > On Thu, 19 Jun 2025 15:05:40 -0300
> > Guinevere Larsen <guinevere@redhat.com> wrote:
> >  
> >> +    gdb_test "print ${ns0}::'${::srcfile_lib}'::gdb_dlmopen_glob" \
> >> +	"No function .${::srcfile_lib}. in specified context."  
> > I'm wondering about this test.  ${::srcfile_lib} refers to a file,
> > right? If so, why does the message say "function"?  
> 
> This is an annoying case to work with... The error "No function %s in 
> specified context" comes from the "block: block COLONCOLON name" rule, 
> around line 1105 in my tree.
> 
> The issue here is that the function "classify_name" couldn't find a file 
> named ${::srcfile_lib} in the specified namespace, and so it classified 
> that string as a generic name, rather than a file name. It's not even a 
> factor of not having enough information to differentiate, the issue is 
> that the name is miscategorized it would be impossible for us to even 
> know when it was meant as a file or a function.
> 
> At present, this error can only refer to a file if the user is searching 
> for something in a namespace, so I could make that error checking 
> slightly more thorough, and keep the current message when no namespace 
> ID was used, and have a new "No function or file %s in specified 
> context" message. Would that be better, in your opinion?

While it would be nice to use "file" to refer to files and "function"
for functions, if we really can't differentiate, then I think using
"No function or file %s..." is better than the current situation.

Kevin


  reply	other threads:[~2025-07-10 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-07-07 19:01 ` [PING][PATCH v3 0/3] Introduce syntax for linker-namespace specific symbols Guinevere Larsen

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=20250710145620.1549db70@f41-zbm-amd \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=guinevere@redhat.com \
    /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