This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] Improve completion of locations


>
> 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.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]