This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Word break characters are language dependent
- From: "Eli Zaretskii" <eliz at elta dot co dot il>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 21 Sep 2003 15:28:44 +0200
- Subject: Re: [RFC] Word break characters are language dependent
- References: <20030918191641.GY15984@gnat.com>
- Reply-to: Eli Zaretskii <eliz at elta dot co dot il>
> 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.