Re: RFC: add completion for "set gnutarget"

Yao Qi
2013-01-04T10:59:41Z

On 01/04/2013 12:25 AM, Tom Tromey wrote:
> +/* A completion function for "set gnutarget". */
> +
> +static VEC (char_ptr) *
> +complete_set_gnutarget (struct cmd_list_element *cmd, char *text, char *word)
> +{
> + const char **bfd_targets = bfd_target_list ();

I am wondering whether bfd_target_list returns an invariant. If so, we
don't have to call bfd_target_list every time on completion. We can
compute 'bfd_targets' at beginning and use it in completion.

I may be wrong because my bfd knowledge is very limited. After reading
bfd source for a while, I am still not sure bfd_target_list returns an
invariant for a gdb of a given configuration.

--
Yao (é½å°§)