diff options
author | Doug Evans <dje@google.com> | 2010-11-02 16:48:43 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2010-11-02 16:48:43 +0000 |
commit | 9dea9163560f26f9adddd13254ad32f4aea3b1d6 (patch) | |
tree | 524bda94e28e26bc3ae3bc014c9b499887c70b7f /gdb/top.c | |
parent | ffa54e5c48223b42840f93e56a5eff69998ab4e1 (diff) | |
download | gdb-9dea9163560f26f9adddd13254ad32f4aea3b1d6.zip gdb-9dea9163560f26f9adddd13254ad32f4aea3b1d6.tar.gz gdb-9dea9163560f26f9adddd13254ad32f4aea3b1d6.tar.bz2 |
* top.c: #include "python/python.h".
(gdb_init): Add a comment regarding initialize_all_files.
Call finish_python_initialization at the end.
* python/python.h (finish_python_initialization): Declare.
* python/python.c (finish_python_initialization): New function.
(_initialize_python): Move python-implemented initialization there
and call it.
(GdbMethods): Use #ifdef HAVE_PYTHON for consistency.
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -47,6 +47,7 @@ #include "main.h" #include "event-loop.h" #include "gdbthread.h" +#include "python/python.h" /* readline include files */ #include "readline/readline.h" @@ -1657,7 +1658,10 @@ gdb_init (char *argv0) init_cmd_lists (); /* This needs to be done first */ initialize_targets (); /* Setup target_terminal macros for utils.c */ initialize_utils (); /* Make errors and warnings possible */ + + /* Here is where we call all the _initialize_foo routines. */ initialize_all_files (); + /* This creates the current_program_space. Do this after all the _initialize_foo routines have had a chance to install their per-sspace data keys. Also do this before @@ -1684,4 +1688,12 @@ gdb_init (char *argv0) deprecated_init_ui_hook. */ if (deprecated_init_ui_hook) deprecated_init_ui_hook (argv0); + +#ifdef HAVE_PYTHON + /* Python initialization can require various commands to be installed. + For example "info pretty-printer" needs the "info" prefix to be + installed. Keep things simple and just do final python initialization + here. */ + finish_python_initialization (); +#endif } |