diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/completer.c | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9be08dda1fe..c76158faf2a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-06-29 Pedro Alves <palves@redhat.com> + + * completer.c (expression_completer): Remove code that recomputes + 'text' from 'word'. + 2017-06-29 Yao Qi <yao.qi@linaro.org> * regformats/regdat.sh: Generate code with diff --git a/gdb/completer.c b/gdb/completer.c index 6acf115164f..f152dd5fadc 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -587,7 +587,6 @@ expression_completer (struct cmd_list_element *ignore, { struct type *type = NULL; char *fieldname; - const char *p; enum type_code code = TYPE_CODE_UNDEF; /* Perform a tentative parse of the expression, to see whether a @@ -635,15 +634,8 @@ expression_completer (struct cmd_list_element *ignore, } xfree (fieldname); - /* Commands which complete on locations want to see the entire - argument. */ - for (p = word; - p > text && p[-1] != ' ' && p[-1] != '\t'; - p--) - ; - /* Not ideal but it is what we used to do before... */ - return location_completer (ignore, p, word); + return location_completer (ignore, text, word); } /* See definition in completer.h. */ |