summaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-02-14 13:58:06 +0000
committerAndrew Cagney <cagney@redhat.com>2003-02-14 13:58:06 +0000
commit1aa0e8111b5c86242de83d20154e973603daf2d5 (patch)
tree24998d8500868b9803deed5d13b748c120387d10 /gdb/main.c
parent65a6fbe885f7749fa69226d8535aa23a40f3ba37 (diff)
downloadgdb-1aa0e8111b5c86242de83d20154e973603daf2d5.tar.gz
2003-02-14 Andrew Cagney <ac131313@redhat.com>
* main.c (tui_version): Delete variable. (captured_main): When --tui, set interpreter_p to "tui" instead of enabling tui_version. * printcmd.c (display_command) [TUI]: Test tui_active instead of tui_version. * cli/cli-decode.c (lookup_cmd_composition): Ditto. * cli/cli-cmds.c (disassemble_command): Ditto. * defs.h (tui_version): Delete declaration. * Makefile.in (SUBDIR_TUI_SRCS): Add "tui/tui-interp.c". (tui-interp.o): Add rules. (SUBDIR_TUI_OBS): Add "tui-interp.o". Index: tui/ChangeLog 2003-02-14 Andrew Cagney <ac131313@redhat.com> * tui.c (tui_enable, tui_disable): Don't modify tui_version. (tui_is_window_visible, tui_get_command_dimension): Test tui_active instead of tui_version. * tuiData.h (tui_version): Delete declaration. * tui-hooks.c (tui_init_hook, tui_event_loop): Delete function, moved to "tui-interp.c". (tui_exit, tui_command_loop): Ditto. (_initialize_tui): Don't initialize init_ui_hook. Initialize target_new_objfile_hook. * tui-interp.c: New file.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 656e7d52fdd..74208de753a 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -60,9 +60,6 @@ int event_loop_p = 1;
do_setshow_command will free it. */
char *interpreter_p;
-/* Whether this is the command line version or not */
-int tui_version = 0;
-
/* Whether xdb commands will be handled */
int xdb_commands = 0;
@@ -245,7 +242,7 @@ captured_main (void *data)
{"async", no_argument, &event_loop_p, 1},
{"noasync", no_argument, &event_loop_p, 0},
#if defined(TUI)
- {"tui", no_argument, &tui_version, 1},
+ {"tui", no_argument, 0, 14},
#endif
{"xdb", no_argument, &xdb_commands, 1},
{"dbx", no_argument, &dbx_commands, 1},
@@ -339,6 +336,11 @@ captured_main (void *data)
display_time = 1;
display_space = 1;
break;
+ case 14:
+ /* --tui is equivalent to -i=tui. */
+ xfree (interpreter_p);
+ interpreter_p = xstrdup ("tui");
+ break;
case 'f':
annotation_level = 1;
/* We have probably been invoked from emacs. Disable window interface. */
@@ -455,19 +457,8 @@ extern int gdbtk_test (char *);
if (print_help || print_version)
{
use_windows = 0;
-#ifdef TUI
- /* Disable the TUI as well. */
- tui_version = 0;
-#endif
}
-#ifdef TUI
- /* An explicit --tui flag overrides the default UI, which is the
- window system. */
- if (tui_version)
- use_windows = 0;
-#endif
-
if (set_args)
{
/* The remaining options are the command-line options for the