/* Line completion stuff for GDB, the GNU debugger.
- Copyright (C) 2000, 2001, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This file is part of GDB.
static char *gdb_completer_file_name_break_characters = " \t\n*|\"';:?><";
#endif
-/* These are used when completing on locations, which can mix file
- names and symbol names separated by a colon. */
-static char *gdb_completer_loc_break_characters = " \t\n*|\"';:?><,";
-
/* Characters that can be used to quote completion strings. Note that we
can't include '"' because the gdb C parser treats such quoted sequences
as strings. */
while (1)
{
char *p, *q;
+
p = rl_filename_completion_function (text, subsequent_name);
if (return_val_used >= return_val_alloced)
{
for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
{
char *name = TYPE_FN_FIELDLIST_NAME (type, i);
+
if (name && ! strncmp (name, fieldname, namelen))
{
if (!computed_type_name)
computed_type_name = 1;
}
/* Omit constructors from the completion list. */
- if (type_name && strcmp (type_name, name))
+ if (!type_name || strcmp (type_name, name))
{
output[*nextp] = xstrdup (name);
++*nextp;
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
}
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars && c->completer != NULL)
list = (*c->completer) (c, p, word);
}
}
char *
gdb_completion_word_break_characters (void)
{
- char ** list;
+ char **list;
+
list = complete_line_internal (rl_line_buffer, rl_line_buffer, rl_point,
handle_brkchars);
gdb_assert (list == NULL);