* defs.h (init_last_source_visited): New prototype.
(add_path): Ditto.
* source.c (add_path): New function that adds to a specified path.
(mod_path): Change to call add_path.
(init_last_source_visited): New function to allow interfaces to
initialize static variable: last_source_visited. Part of fix
for PR gdb/741.
* Makefile.in: Add support for mi/mi-cmd-env.c.
More cleanup from import of readline 4.3.
* completer.h (complete_line, readline_line_completion_function):
Update prototypes.
(line_completion_function): Removed, not used outside of completer.c.
* completer.c (readline_line_completion_function,
complete_function, line_completion_function): Use const for first
parameter.
(line_completion_function): Make static.
(filename_completer): filename_completion_function is now called
rl_filename_completion_function
* corelow.c: Include <readline/readline.h>.
* exec.c: Ditto.
* solib.c: Ditto.
* source.c: Ditto.
* symfile.c: Ditto.
* symmisc.c: Ditto.
* top.c (init_main): No need to coerce
readline_line_completion_function anymore.
* cli/cli-dump.c: Include <readline/readline.h>.
function.
(set_default_source_symtab_and_line): New function. Attempts to
determine a source file to list lines from if one is not currently
defined.
(get_current_source_symtab_and_line): Initialize sal.pc and
sal.end fields.
(set_current_source_symtab_and_line): Mark argument as const.
* source.h: Update declarations and comments.
* linespec.c (decode_line_1): Replace call to removed routine above.
* stack.c (print_frame_info_base): Ditto.
* cli/cli-cmds.c (edit_command): Ditto.
(list_command): Ditto.
sal.end fields.
(get_current_or_default_source_symtab_and_line): Ditto.
* breakpoint.c (parse_breakpoint_sals): Use correct accessor function
so we do not cause a new source symtab to be searched for (reverting an
unintentional change from the 2002-09-20 patch).
* scm-lang.c (scm_unpac): Ditto.
current_source_line static.
(list_command): Moved to cli/cli-cmds.c.
(ambiguous_line_spec): Moved to cli/cli-cmds.c.
(get_first_line_listed): New accessor function.
(get_lines_to_list): New accessor function.
(get_current_source_symtab_and_line): New function. Retrieves the
position in the source code that we consider current.
(get_current_or_default_source_symtab_and_line): New function.
Like the above but attempts to determine a default position if one
is not currently defined.
(set_current_source_symtab_and_line): New function. Sets the source
code position considered current and returns the previously set one.
(clear_current_source_symtab_and_line): Reset stored information about
a current source line.
(_initialize_source): Remove registration for the "list" command and
its alias.
* source.h: Add declarations for the new functions above.
* symtab.h: Remove declarations for the global variables mentioned
above.
* breakpoint.c (parse_breakpoint_sals): Use accessor functions to
obtain current source line.
* linespec.c (decode_line_1): Ditto.
* macroscope.c (default_macro_scope): Ditto.
* scm-lang.c (scm_unpac): Ditto.
* stack.c (print_frame_info_base): Ditto.
* symfile.c (clear_symtab_users): Ditto.
* symtab.c (decode_line_spec): Ditto.
* cli/cli-cmds.c (list_command): Moved here from source.c.
(ambiguous_line_spec): Moved here from source.c.
(_init_cli_cmds): Add definition for "list" and its alias.
* Makefile.in: Update dependencies.
information about preprocessor macros.
* gdb/testsuite/lib/gdb.exp (get_debug_format): Tolerate message
saying whether preprocessor macro information is present.
* gdb/doc/gdb.texinfo (Symbols): Update documentation for `info
source' command.
basename part of filenames when the associated file is a symbolic link.
This fixes a potential inconsistency between the filenames known to GDB
and the filenames it prints in the annotations.
* configure.in: Check for realpath.
* defs.h (gdb_realpath): Declare.
* symtab.h (partial_symtab): Added fullname field.
* source.c (openp): Use gdb_realpath.
(forget_cached_source_info): Clear full name of each partial
symtab.
* utils.c (gdb_realpath): New function.
* symtab.c (lookup_symtab): Removed.
(lookup_symtab_1): Renamed to lookup_symtab.
(lookup_symtab): Look for real path.
(lookup_partial_symtab): Likewise.
by appropriate warning hook.
(print_source_lines): Remove tui hacks, must be replaced by cli.
(forward_search_command): Remove tui hacks, can be replaced by
appropriate calls to identify_source_line when tui scrolls.
(reverse_search_command): Likewise.
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".
(gdbtk_test): Use PATH_MAX for home var calculation.
* remote-e7000.c (e7000_parse_device): Accomodate Cygwin as well as Win32 in
test.
* ser-tcp.c: Use modern __CYGWIN__ conditional.
* source.c (mod_path): Add __CYGWIN__ conditional to WIN32 test.
(openp): Ditto.
* symfile.c (symfile_bfd_open): Ditto.
* gdbtk/generic/gdbtk.c: Ditto.
* 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.