diff options
author | Keith Seitz <keiths@redhat.com> | 2001-11-20 16:54:39 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2001-11-20 16:54:39 +0000 |
commit | 1ad24239ce0af556836897b96f29c7475042c009 (patch) | |
tree | cf64816b01808872bac97bce73b7b5511b765c03 /gdb/top.c | |
parent | 4cb0dbef42b8246ddb2c4a354206c717811dd053 (diff) | |
download | gdb-1ad24239ce0af556836897b96f29c7475042c009.zip gdb-1ad24239ce0af556836897b96f29c7475042c009.tar.gz gdb-1ad24239ce0af556836897b96f29c7475042c009.tar.bz2 |
* top.c (gdb_init): Call init_ui_hook before initializing
the default UI.
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -182,7 +182,10 @@ static void stop_sig (int); /* Hooks for alternate command interfaces. */ /* Called after most modules have been initialized, but before taking users - command file. */ + command file. + + If the UI fails to initialize and it wants GDB to continue + using the default UI, then it should clear this hook before returning. */ void (*init_ui_hook) (char *argv0); @@ -2034,6 +2037,11 @@ gdb_init (char *argv0) set_language (language_c); expected_language = current_language; /* don't warn about the change. */ + /* Allow another UI to initialize. If the UI fails to initialize, and + it wants GDB to revert to the CLI, it should clear init_ui_hook. */ + if (init_ui_hook) + init_ui_hook (argv0); + #ifdef UI_OUT /* Install the default UI */ if (!init_ui_hook) @@ -2050,7 +2058,4 @@ gdb_init (char *argv0) } } #endif - - if (init_ui_hook) - init_ui_hook (argv0); } |