aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 8823c82..531a2c3 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -321,6 +321,7 @@ captured_main (void *data)
initializer. */
static int print_help;
static int print_version;
+ static int print_configuration;
/* Pointers to all arguments of --command option. */
VEC (cmdarg_s) *cmdarg_vec = NULL;
@@ -483,6 +484,7 @@ captured_main (void *data)
{"command", required_argument, 0, 'x'},
{"eval-command", required_argument, 0, 'X'},
{"version", no_argument, &print_version, 1},
+ {"configuration", no_argument, &print_configuration, 1},
{"x", required_argument, 0, 'x'},
{"ex", required_argument, 0, 'X'},
{"init-command", required_argument, 0, OPT_IX},
@@ -726,8 +728,9 @@ captured_main (void *data)
}
}
- /* If --help or --version, disable window interface. */
- if (print_help || print_version)
+ /* If --help or --version or --configuration, disable window
+ interface. */
+ if (print_help || print_version || print_configuration)
{
use_windows = 0;
}
@@ -818,6 +821,14 @@ captured_main (void *data)
exit (0);
}
+ if (print_configuration)
+ {
+ print_gdb_configuration (gdb_stdout);
+ wrap_here ("");
+ printf_filtered ("\n");
+ exit (0);
+ }
+
/* FIXME: cagney/2003-02-03: The big hack (part 1 of 2) that lets
GDB retain the old MI1 interpreter startup behavior. Output the
copyright message before the interpreter is installed. That way
@@ -1129,6 +1140,7 @@ Options:\n\n\
#endif
fputs_unfiltered (_("\
--version Print version information and then exit.\n\
+ --configuration Print details about GDB configuration and then exit.\n\
-w Use a window interface.\n\
--write Set writing into executable and core files.\n\
--xdb XDB compatibility mode.\n\