projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb/testsuite/
[binutils-gdb.git]
/
gdb
/
completer.c
diff --git
a/gdb/completer.c
b/gdb/completer.c
index 02e95110114d87c9fe475062189d5a736bee8314..3ba481ee52c4f75ac69584c8f64e7eec68001d97 100644
(file)
--- a/
gdb/completer.c
+++ b/
gdb/completer.c
@@
-1,5
+1,6
@@
/* Line completion stuff for GDB, the GNU debugger.
/* 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.
This file is part of GDB.
@@
-78,10
+79,6
@@
static char *gdb_completer_file_name_break_characters = " \t\n*|\"';?><@";
static char *gdb_completer_file_name_break_characters = " \t\n*|\"';:?><";
#endif
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. */
/* 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. */
@@
-129,6
+126,7
@@
filename_completer (struct cmd_list_element *ignore, char *text, char *word)
while (1)
{
char *p, *q;
while (1)
{
char *p, *q;
+
p = rl_filename_completion_function (text, subsequent_name);
if (return_val_used >= return_val_alloced)
{
p = rl_filename_completion_function (text, subsequent_name);
if (return_val_used >= return_val_alloced)
{
@@
-392,6
+390,7
@@
add_struct_fields (struct type *type, int *nextp, char **output,
for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
{
char *name = TYPE_FN_FIELDLIST_NAME (type, i);
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)
if (name && ! strncmp (name, fieldname, namelen))
{
if (!computed_type_name)
@@
-400,7
+399,7
@@
add_struct_fields (struct type *type, int *nextp, char **output,
computed_type_name = 1;
}
/* Omit constructors from the completion list. */
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;
{
output[*nextp] = xstrdup (name);
++*nextp;
@@
-676,7
+675,7
@@
complete_line_internal (const char *text, char *line_buffer, int point,
p--)
;
}
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars
&& c->completer != NULL
)
list = (*c->completer) (c, p, word);
}
}
list = (*c->completer) (c, p, word);
}
}
@@
-747,7
+746,7
@@
complete_line_internal (const char *text, char *line_buffer, int point,
p--)
;
}
p--)
;
}
- if (reason != handle_brkchars)
+ if (reason != handle_brkchars
&& c->completer != NULL
)
list = (*c->completer) (c, p, word);
}
}
list = (*c->completer) (c, p, word);
}
}
@@
-786,7
+785,8
@@
command_completer (struct cmd_list_element *ignore, char *text, char *word)
char *
gdb_completion_word_break_characters (void)
{
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);
list = complete_line_internal (rl_line_buffer, rl_line_buffer, rl_point,
handle_brkchars);
gdb_assert (list == NULL);