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


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

Yes :).

What I actually did while waiting for the opinion of the maintainers
and developpers was to make our Ada version of this string non-static,
and changed gdb_get_completer_word_break_character() return the ada
string if the current_language was ada. I then used that function
in place of the string itself in the one location where I detected
the problem.

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

Right! :-) That reminds me of a collegue in my previous job that often
came to the chif software architect with grand designs, some of them
almost extravagant. And this architect will always smile while asking
the same question after the presentation: "Are you sure it works?".
And this collegue would smile back and always say the same: "Yes,
because I implemented it" :-).

In this particular case, I didn't actually implement what I am
suggesting. I just did a hack, a prototype if you like, that proves
that it should work well.

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

Thanks for your input, it is much appreciated. I'll wait for another
week to see if I can get more feedback, and then will try to work on
a patch.

-- 
Joel


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