This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC/RFA] Add handling for unqualified Ada operators in linespecs
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 16 Dec 2011 12:29:01 -0700
- Subject: Re: [RFC/RFA] Add handling for unqualified Ada operators in linespecs
- References: <1323810763-5563-1-git-send-email-brobecker@adacore.com>
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> This patch enhances the linespec parser to recognize unqualified
Joel> operator names in linespecs. This allows the user to insert a breakpoint
Joel> on operator "+" as follow, for instance:
Joel> (gdb) break "+"
I think it is fine to allow this.
I wonder whether this requires a documentation change.
Joel> Not the most elegant solution, but relatively self contained. So
Joel> I thought I'd submit it, after all. It's still not completely
Joel> functional because, for it to work, it needs the symtabs to be
Joel> already read-in (or, in other words, the partial symbol search is
Joel> still not working). But that's actually another, much more general
Joel> problem, which is related to breakpoints using unqualified function
Joel> names in general. I will try to think about that on its own.
I think we should continue trying to look at solutions to linespec and
symbol table problems in as language-independent a way as possible.
And, if we can't be language-independent, we should endeavor to have
clean code; the current stuff is still a big mess.
I think Keith's changes will help some here...
Joel> + p = *argptr;
Joel> + if (p[0] == '"'
Why only double quotes?
I don't even mind that as a temporary measure. But I think (or hope)
Keith's plan is for single- and double-quotes to be considered
identically, and uniformly, throughout linespec.
Tom