This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] print message when TUI not configured


Oops. I forgot to attach the patch. Here it is:

2007-05-09  Bob Wilson  <bob.wilson@acm.org>
	
	* main.c (captured_main): Recognize -tui option and print an error
	message when the TUI is not configured.

Index: main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.62
diff -u -r1.62 main.c
--- main.c	9 Jan 2007 21:34:29 -0000	1.62
+++ main.c	9 May 2007 21:21:33 -0000
@@ -298,9 +298,7 @@
     };
     static struct option long_options[] =
     {
-#if defined(TUI)
       {"tui", no_argument, 0, OPT_TUI},
-#endif
       {"xdb", no_argument, &xdb_commands, 1},
       {"dbx", no_argument, &dbx_commands, 1},
       {"readnow", no_argument, &readnow_symbol_files, 1},
@@ -398,8 +396,15 @@
 	    break;
 	  case OPT_TUI:
 	    /* --tui is equivalent to -i=tui.  */
+#ifdef TUI
 	    xfree (interpreter_p);
 	    interpreter_p = xstrdup (INTERP_TUI);
+#else
+	    fprintf_unfiltered (gdb_stderr,
+				_("%s: TUI mode is not supported\n"),
+				argv[0]);
+	    exit (1);
+#endif
 	    break;
 	  case OPT_WINDOWS:
 	    /* FIXME: cagney/2003-03-01: Not sure if this option is

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]