diff options
author | Eli Zaretskii <eliz@gnu.org> | 2000-04-06 15:24:36 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2000-04-06 15:24:36 +0000 |
commit | bcea15ac193d7dfb5827826bf878224a6ad9b10a (patch) | |
tree | 4be0f626444cfce1d90b1c19935ffb6190cc011d /gdb/top.c | |
parent | afe36a788b035d8f582e69c2727385f33589004e (diff) | |
download | gdb-bcea15ac193d7dfb5827826bf878224a6ad9b10a.zip gdb-bcea15ac193d7dfb5827826bf878224a6ad9b10a.tar.gz gdb-bcea15ac193d7dfb5827826bf878224a6ad9b10a.tar.bz2 |
* top.c (filename_completer): Set subsequent_name to 1 early on,
to prevent an infinite loop if the first file in the directory is
a backup file.
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1887,6 +1887,11 @@ filename_completer (text, word) return_val[return_val_used++] = p; break; } + /* We need to set subsequent_name to a non-zero value before the + continue line below, because otherwise, if the first file seen + by GDB is a backup file whose name ends in a `~', we will loop + indefinitely. */ + subsequent_name = 1; /* Like emacs, don't complete on old versions. Especially useful in the "source" command. */ if (p[strlen (p) - 1] == '~') @@ -1916,7 +1921,6 @@ filename_completer (text, word) free (p); } } - subsequent_name = 1; } #if 0 /* There is no way to do this just long enough to affect quote inserting |