public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [commit] Fix -nw option, alias for -i=console
@ 2003-03-02 15:38 Andrew Cagney
  0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2003-03-02 15:38 UTC (permalink / raw)
  To: gdb-patches, insight

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Hello,

This should fix the -nw option.  If specified, it forces the interpreter 
to "console".  As for the -w option, that still doesn't do much useful 
(but is cleaned up a little).

committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1902 bytes --]

2003-03-01  Andrew Cagney  <cagney@redhat.com>

	* main.c (captured_main): Add OPT_WINDOWS and OPT_NOWINDOWS to
	option enum and switch.  When no windows, set the interpreter to
	INTERP_CONSOLE.
	
Index: main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.30
diff -u -r1.30 main.c
--- main.c	2 Mar 2003 01:22:18 -0000	1.30
+++ main.c	2 Mar 2003 02:02:33 -0000
@@ -242,7 +242,9 @@
       OPT_CD,
       OPT_ANNOTATE,
       OPT_STATISTICS,
-      OPT_TUI
+      OPT_TUI,
+      OPT_NOWINDOWS,
+      OPT_WINDOWS
     };
     static struct option long_options[] =
     {
@@ -299,10 +301,10 @@
       {"tty", required_argument, 0, 't'},
       {"baud", required_argument, 0, 'b'},
       {"b", required_argument, 0, 'b'},
-      {"nw", no_argument, &use_windows, 0},
-      {"nowindows", no_argument, &use_windows, 0},
-      {"w", no_argument, &use_windows, 1},
-      {"windows", no_argument, &use_windows, 1},
+      {"nw", no_argument, NULL, OPT_NOWINDOWS},
+      {"nowindows", no_argument, NULL, OPT_NOWINDOWS},
+      {"w", no_argument, NULL, OPT_WINDOWS},
+      {"windows", no_argument, NULL, OPT_WINDOWS},
       {"statistics", no_argument, 0, OPT_STATISTICS},
       {"write", no_argument, &write_files, 1},
       {"args", no_argument, &set_args, 1},
@@ -347,6 +349,17 @@
 	    /* --tui is equivalent to -i=tui.  */
 	    xfree (interpreter_p);
 	    interpreter_p = xstrdup ("tui");
+	    break;
+	  case OPT_WINDOWS:
+	    /* FIXME: cagney/2003-03-01: Not sure if this option is
+               actually useful, and if it is, what it should do.  */
+	    use_windows = 1;
+	    break;
+	  case OPT_NOWINDOWS:
+	    /* -nw is equivalent to -i=console.  */
+	    xfree (interpreter_p);
+	    interpreter_p = xstrdup (INTERP_CONSOLE);
+	    use_windows = 0;
 	    break;
 	  case 'f':
 	    annotation_level = 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-02  2:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-02 15:38 [commit] Fix -nw option, alias for -i=console Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).