(line_completion_function): If we are completing on locations,
back up the start of word pointer past all characters which can
appear in a location spec.
(location_completer): New function.
* completer.h: Add prototype for location_completer.
* symtab.c (make_source_files_completion_list)
(add_filename_to_list, not_interesting_fname): New functions.
(filename_seen): New function, body extracted from
output_source_filename.
(output_source_filename): Call filename_seen to check if the file
was already printed.
(make_symbol_completion_list): If TEXT includes a
double-quoted string, return an empty list, not NULL.
(make_file_symbol_completion_list): New function, similar to
make_symbol_completion_list but with an additional argument
SRCFILE.
* symtab.h (make_file_symbol_completion_list)
(make_source_files_completion_list): Add prototypes.
* breakpoint.c (_initialize_breakpoint): Make location_completer
be the completion function for all commands which set breakpoints
and watchpoints.
(top-level): #include "completer.h".
* tracepoint.c (_initialize_tracepoint): Make location_completer
be the completion function for the "trace" command.
(top-level): #include "completer.h".
* printcmd.c (_initialize_printcmd): Make location_completer be
the completion function for the "print", "inspect", "call", and
"disassemble" commands.
(top-level): #include "completer.h".
* infcmd.c (_initialize_infcmd): Make location_completer be the
completion function for the "go", "jump", and "until" commands.
(top-level): #include "completer.h".
instead of system-specific define's like _WIN32 and __MSDOS__.
Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH instead of SLASH_P and
ROOTED_P.
(top-level): #include "filenames.h".
* solib.c (solib_open): Use IS_DIR_SEPARATOR and IS_ABSOLUTE_PATH
instead of SLASH_CHAR, ROOTED_P and SLASH_P.
(top-level): #include "filenames.h".
* defs.h (SLASH_P, SLASH_CHAR, ROOTED_P): Remove definitions.
(SLASH_STRING): Define only for _WIN32.
* completer.c: Use HAVE_DOS_BASED_FILE_SYSTEM instead of
__MSDOS_.
* cli/cli-cmds.c (cd_command): Use IS_DIR_SEPARATOR and
IS_ABSOLUTE_PATH instead of SLASH_P and ROOTED_P. Replace
system-specific ifdefs with HAVE_DOS_BASED_FILE_SYSTEM.
(top-level): #include "filenames.h".
slash from file-name break characters.
[__MSDOS__]: Special definition for DOS/Windows file names.
(line_completion_function): When completing on file names, bump
`p' to the first file-name constituent character of `word', before
invoking the completer.
* linespec.h: New file. Declarations for linespec.c.
* linespec.c, alpha-tdep.c, breakpoint.c, parse.c, source.c,
symtab.c, tracepoint.c: Include the above.
* completer.c: New file. Line completion stuff for GDB.
(get_gdb_completer_word_break_characters,
get_gdb_completer_quote_characters): New functions. Accessors for
useful completer internal data.
(filename_completer, line_completion_function, skip_quoted): Moved
here from top.c.
* completer.h: New file. Declarations for the above.
* linespec.c (decode_line_1): Use
get_gdb_completer_word_break_characters and
get_gdb_completer_quote_characters.
* top.c: Include completer.h.
(filename_completer, line_completion_function, skip_quoted):
Moved to completer.c.
* corefile.c, exec.c, source.c, symfile.c, linespec.c: Include
completer.h.
* Makefile.in (SFILES): Add completer.c.
(COMMON_OBS): Add completer.o.
(completer.o): New target.
(linespec.o, alpha-tdep.o, breakpoint.o, parse.o, source.o,
symtab.o, tracepoint.o): Add linespec.h to dependencies list.
(corefile.o, exec.o, source.o, symfile.o, linespec.o): Add completer.h
to dependencies list.