summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-02 02:07:12 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-02 02:07:12 +0000
commitd42854ab8bfa64ace442469e97b2762653987db8 (patch)
treeea151aed17cde7394c0a902b74eb09fd6cbcd8d1
parentbfa419bf712c097020a2d967e1d037dc2d3c93b0 (diff)
downloadgdb-d42854ab8bfa64ace442469e97b2762653987db8.tar.gz
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/main.c23
2 files changed, 24 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e717c2685b9..ec67fe3b89c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2003-03-01 Andrew Cagney <cagney@redhat.com>
+
* main.c (captured_main): Replace magic option characters with an
enum.
diff --git a/gdb/main.c b/gdb/main.c
index fa976ea14a5..559c521c947 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -242,7 +242,9 @@ captured_main (void *data)
OPT_CD,
OPT_ANNOTATE,
OPT_STATISTICS,
- OPT_TUI
+ OPT_TUI,
+ OPT_NOWINDOWS,
+ OPT_WINDOWS
};
static struct option long_options[] =
{
@@ -299,10 +301,10 @@ captured_main (void *data)
{"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},
@@ -348,6 +350,17 @@ captured_main (void *data)
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;
/* We have probably been invoked from emacs. Disable window interface. */