summaryrefslogtreecommitdiff
path: root/gdb/completer.c
Commit message (Collapse)AuthorAgeFilesLines
* * command.h: Update copyright.Andrew Cagney2002-03-241-0/+2
| | | | | | | | | | | | | | | | | | | (struct cmd_list_element): Replace definition with opaque declaration. (enum cmd_types): Document that it will eventually be moved to cli/cli-decode.h (CMD_DEPRECATED, DEPRECATED_WARN_USER): Delete macros. (MALLOCED_REPLACEMENT): Delete macro. * Makefile.in (cli_decode_h): Add $(command_h). (top.o, completer.o, maint.o): Add dependency on $(cli_decode_h). * top.c: Include "cli/cli-decode.h". * completer.c: Include "cli/cli-decode.h". * maint.c: Include "cli/cli-decode.h". * cli/cli-decode.h: Include "command.h". (enum command_class): Delete. (enum cmd_types): Comment out. (enum cmd_auto_boolean): Delete. (enum var_types): Delete.
* * cli/cli-cmds.c (compare_strings): New function.Tom Tromey2002-02-181-194/+212
| | | | | | | (complete_command): Only print each unique item once. * completer.h (complete_line): Declare. * completer.c (complete_line): New function. (line_completion_function): Use it.
* * completer.c (command_completer): New function.Eli Zaretskii2002-01-101-0/+8
| | | | | | | * completer.h <command_completer>: Add prototype. * cli/cli-cmds.c (init_cli_cmds): Make command_completer be the completer for the "help" command.
* 2001-07-15 Elena Zannoni <ezannoni@redhat.com>Elena Zannoni2001-07-151-0/+18
| | | | | | | | | | | | | | | * top.c (readline_line_completion_function, noop_completer): Move from here... * completer.c (readline_line_completion_function, noop_completer): ...to here. * gdbcmd.h (readline_line_completion_function, noop_completer): Move declarations from here... * completer.h (readline_line_completion_function, noop_completer): ...to here. * corefile.c: Include completer.h. * source.c: Ditto. * symfile.c: Ditto. * Makefile.in: Update dependencies.
* * completer.c (gdb_completer_loc_break_characters): New variable.Eli Zaretskii2001-06-111-4/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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".
* * source.c (mod_path, openp): Use #ifdef HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii2001-06-061-1/+1
| | | | | | instead of #if HAVE_DOS_BASED_FILE_SYSTEM. * completer.c: Ditto. * cli/cli-cmds.c (cd_command): Ditto.
* * source.c (mod_path, openp): Use HAVE_DOS_BASED_FILE_SYSTEMEli Zaretskii2001-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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".
* Update/correct copyright notices.Kevin Buettner2001-03-061-1/+1
|
* * completer.c (gdb_completer_file_name_break_characters): RemoveEli Zaretskii2001-02-181-7/+37
| | | | | | | | 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.
* Replace free() with xfree().Kevin Buettner2000-12-151-3/+3
|
* 2000-11-30 Fernando Nasser <fnasser@redhat.com>Fernando Nasser2000-12-011-0/+470
* 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.