diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-03-20 22:25:16 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-03-20 22:25:16 +0000 |
commit | 864dbc904ea24ac07192a947c32cdd48ee5a6a6f (patch) | |
tree | 335d8743ddd47e3968299f715567130a12fbc16d | |
parent | 4c2e239184b254506983640985528115d93aa297 (diff) | |
download | gdb-864dbc904ea24ac07192a947c32cdd48ee5a6a6f.zip gdb-864dbc904ea24ac07192a947c32cdd48ee5a6a6f.tar.gz gdb-864dbc904ea24ac07192a947c32cdd48ee5a6a6f.tar.bz2 |
2003-03-20 Andrew Cagney <cagney@redhat.com>
* main.c (gdb_main): Return 1.
(captured_main): Call error to report an invalid interpreter.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/main.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c3d617e..0d3ba3f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2003-03-20 Andrew Cagney <cagney@redhat.com> + * main.c (gdb_main): Return 1. + (captured_main): Call error to report an invalid interpreter. + * Makefile.in (alpha-osf1-tdep.o): Update dependencies. * alpha-osf1-tdep.c: Include "gdb_string.h". @@ -570,11 +570,7 @@ extern int gdbtk_test (char *); /* Find it. */ struct interp *interp = interp_lookup (interpreter_p); if (interp == NULL) - { - fprintf_unfiltered (gdb_stderr, "Interpreter `%s' unrecognized.\n", - interpreter_p); - exit (1); - } + error ("Interpreter `%s' unrecognized", interpreter_p); /* Install it. */ if (!interp_set (interp)) { @@ -815,7 +811,9 @@ gdb_main (struct captured_main_args *args) { use_windows = args->use_windows; catch_errors (captured_main, args, "", RETURN_MASK_ALL); - return 0; + /* The only way to end up here is by an error (normal exit is + handled by quit_force()), hence always return an error status. */ + return 1; } |