Remove old stale expression_completer hack
authorPedro Alves <palves@redhat.com>
Thu, 29 Jun 2017 14:52:37 +0000 (15:52 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 29 Jun 2017 14:52:37 +0000 (15:52 +0100)
commit195bcdd5183f2c137399db23a68a26a4e4193f8f
tree3651bb5b2e4170b2d8b0da259c9c7b2cd59efe36
parent2e74f9dd8ae79ddfe7f0f84b890c962016fc8f15
Remove old stale expression_completer hack

The code in question was introduced by:

 https://sourceware.com/ml/gdb-patches/2008-06/msg00143.html

"The fix is to make sure that the entire expression is passed to
expression_completer, then duplicate some logic there in the case
where location_completer is called."

The logic that was duplicated was much later on removed by the
original explicit locations patch:

 commit 87f0e7204722a986f79f245eee716f0870832d47
 Author:     Keith Seitz <keiths@redhat.com>
 AuthorDate: Tue Aug 11 17:09:36 2015 -0700
 Commit:     Keith Seitz <keiths@redhat.com>
 CommitDate: Tue Aug 11 17:09:36 2015 -0700

     Explicit locations: add UI features for CLI

 @@ -688,16 +880,6 @@ complete_line_internal (const char *text,
       rl_completer_word_break_characters =
 gdb_completer_file_name_break_characters;
     }
 -                 else if (c->completer == location_completer)
 -                   {
 -                     /* Commands which complete on locations want to
 -                        see the entire argument.  */
 -                     for (p = word;
 -                          p > tmp_command
 -                            && p[-1] != ' ' && p[-1] != '\t';
 -                          p--)
 -                       ;
 -                   }

However this case in expression_completer was left behind.

I couldn't come up with a test where this currently makes any
difference.

gdb/ChangeLog:
2017-06-29  Pedro Alves  <palves@redhat.com>

* completer.c (expression_completer): Remove code that recomputes
'text' from 'word'.
gdb/ChangeLog
gdb/completer.c
This page took 0.036883 seconds and 4 git commands to generate.