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]
Other format: [Raw text]

Re: [RFC] Word break characters are language dependent


> Date: Thu, 18 Sep 2003 12:16:41 -0700
> From: Joel Brobecker <brobecker@gnat.com>
> 
> I was working on implementing proper completion for Ada in GDB, and
> ended up reading this part of the code (completer.c:localtion_completer()):
> 
>       else if (strchr (gdb_completer_word_break_characters, *p))
>         symbol_start = p + 1;
> 
> Unfortunately, the word-break characters for Ada are not exactly the
> same as the ones used by default.  As a consequence, the current
> completer does not always find the correct starting location of the
> symbol name.  So I think we should make them language-dependent by
> adding a new field to the language vector.

Did you actually try to replace the hard-coded string with a different
one that is good for Ada, and see if that solves your problem?

I'm asking because I have a vague memory of things being
not-quite-that-simple in that part of the code, since readline's
interface with customized completers is--how should I put it?--less
than optimal.

So I think before we discuss the design of a possible solution, we
should be sure that it is in fact a solution ;-)

Other than that, I think your general idea is correct and the proposed
direction is reasonable.


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