This is the mail archive of the gdb-patches@sourceware.org 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: add completion for "set gnutarget"


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 (éå)


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