RFC: add completion for "set gnutarget"
Yao Qi
yao@codesourcery.com
Fri Jan 4 10:59:00 GMT 2013
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 (é½å°§)
More information about the Gdb-patches
mailing list