From 973817a31359035221fb443a623830cdaab31de5 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 18 Jan 2010 06:25:22 +0000 Subject: Allow "source" to load python scripts. * exceptions.h (enum errors): Add UNSUPPORTED_ERROR. * python/python.c (source_python_script): New function. * python/python.h (source_python_script): Add declaration. * cli/cli-cmds.c: #include exceptions.h and python/python.h. (script_ext_off, script_ext_soft, script_ext_strict) (script_ext_enums, script_ext_mode): New static constants. (show_script_ext_mode, find_and_open_script): New functions. (source_script): Enhance to handle Python scripts. (init_cli_cmds): Add set/show script-extension commands. --- gdb/python/python.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/python/python.h') diff --git a/gdb/python/python.h b/gdb/python/python.h index f35827b..5d93f67 100644 --- a/gdb/python/python.h +++ b/gdb/python/python.h @@ -24,6 +24,8 @@ void eval_python_from_control_command (struct command_line *); +void source_python_script (FILE *stream, char *file); + int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, -- cgit v1.1