* configure.in (TARGET_SYSTEM_ROOT): Set default to
[deliverable/binutils-gdb.git] / gdb / main.c
index 73c17f573ccbc0256cfc0cbdfa3d20d99b554ff3..74208de753a7a92902309e5a6b9252d07da9bad6 100644 (file)
@@ -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;
 
@@ -229,10 +226,10 @@ captured_main (void *data)
 #endif
 
   /* There will always be an interpreter.  Either the one passed into
-     this captured main (not yet implemented), or one specified by the
-     user at start up, or the console.  Make life easier by always
-     initializing the interpreter to something.  */
-  interpreter_p = xstrdup (INTERP_CONSOLE);
+     this captured main, or one specified by the user at start up, or
+     the console.  Initialize the interpreter to the one requested by 
+     the application.  */
+  interpreter_p = xstrdup (context->interpreter_p);
 
   /* Parse arguments and options.  */
   {
@@ -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
@@ -638,7 +629,7 @@ extern int gdbtk_test (char *);
 
   if (execarg != NULL
       && symarg != NULL
-      && STREQ (execarg, symarg))
+      && strcmp (execarg, symarg) == 0)
     {
       /* The exec file and the symbol-file are the same.  If we can't
          open it, better only print one error message.
This page took 0.025934 seconds and 4 git commands to generate.