This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Improve completion of locations
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: [RFA] Improve completion of locations
- From: Daniel Berlin <dan at www dot cgsoftware dot com>
- Date: Sun, 6 May 2001 03:10:16 -0400 (EDT)
- cc: <gdb-patches at sources dot redhat dot com>
>
> I actually tested this, and it seemed to work, but perhaps I didn't
> test enough. Could you please post a test program where this should
> be an issue? I'm afraid my C++ talents are virtually non-existent.
I can make it fail miserably with a simple example (IE my first
try).
Try the following:
#include <stdio.h>
class fred
{
public:
int bob();
};
int fred::bob()
{
return 5;
}
int main(void)
{
fred test;
test.bob();
}
Complete on 'fred
It'll list fred and fred::bob(void)
Hit enter (you need to clear the completion status to make it redo the
list)
Complete on 'fred:
It'll list every symbol around (Or at least, 3792 of them, i would
imagine this is every single one, i never checked)
Complete on 'fred::
It'll complete to fred::bob(void)
The first is fine
The third is fine
The second is what your patch breaks right now.
It'll also break completion without quotes when i get around to rewriting
those amazingly complex parsing routines.
Would anyone really object if i just started a flex based lexer to parse
the specs, to replace all this silly ad-hoc parsing.
It seems pretty easy to do using the state based stuff in flex.
(It makes more sense to do it that way for our purposes, than using
lex+yacc.)
>
> And thanks for reviewing the patch.
>