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".
/* 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))
{
{
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;
}