From 3f7b2faa4bb3f35f6c88687b6943cdbe6003b615 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 15 Apr 2010 17:45:57 +0000 Subject: Add -s option to source command. * NEWS: Document new option. * cli/cli-cmds.c (find_and_open_script): Add function comment. Delete from_tty and cleanupp args. Split filep arg into file and full_pathp. New arg search_path. (source_script_from_stream): New function. (source_script_with_search): New function. (source_script): Rewrite. (source_command): Parse "-s" option. (init_cli_cmds): Add "-s" docs to source command help, and reformat. * python/python.c (source_python_script): Make file arg a const char *. Don't call fclose, leave for caller. * python/python.h (source_python_script): Update. testsuite/ * gdb.base/source-test.gdb: New file. * gdb.base/source.exp: Add tests for "source -s". doc/ * gdb.texinfo (Command Files): Add docs for new "source -s" option. --- gdb/python/python.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/python.h') diff --git a/gdb/python/python.h b/gdb/python/python.h index 5d93f67..b2a9631 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h @@ -24,7 +24,7 @@ void eval_python_from_control_command (struct command_line *); -void source_python_script (FILE *stream, char *file); +void source_python_script (FILE *stream, const char *file); int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, -- cgit v1.1