aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-04 14:08:46 +0100
committerGary Benson <gbenson@redhat.com>2014-08-29 10:12:02 +0100
commitfd0ef3dda9fa7af181d059e4b3e26c17c1385c0d (patch)
tree846b3b36ff35b757231e90a99bd176ec0eac7349 /gdb/main.c
parente0e6bcab5971ea4ad7c4f2efa5c8164c8383caf6 (diff)
downloadgdb-fd0ef3dda9fa7af181d059e4b3e26c17c1385c0d.zip
gdb-fd0ef3dda9fa7af181d059e4b3e26c17c1385c0d.tar.gz
gdb-fd0ef3dda9fa7af181d059e4b3e26c17c1385c0d.tar.bz2
Replace hardwired error handler in captured_main
If the requested interpreter cannot be set captured_main reports the error with a hardwired fprintf/exit pair. A fprintf/exit pair on the previous line was replaced with a call to error in March 2003 (https://sourceware.org/ml/gdb-patches/2003-03/msg00444.html) but I found no documentation as to why this particular hardwired handler was left untouched. I was also unable to come up with a situation where error would not be suitable, so I have replaced it with a call to error. gdb/ChangeLog: * main.c (captured_main): Replace a fprintf/exit pair with a call to error. Wrap the message with _().
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gdb/main.c b/gdb/main.c
index ed2187a..415b900 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -984,12 +984,7 @@ captured_main (void *data)
error (_("Interpreter `%s' unrecognized"), interpreter_p);
/* Install it. */
if (!interp_set (interp, 1))
- {
- fprintf_unfiltered (gdb_stderr,
- "Interpreter `%s' failed to initialize.\n",
- interpreter_p);
- exit (1);
- }
+ error (_("Interpreter `%s' failed to initialize."), interpreter_p);
}
/* FIXME: cagney/2003-02-03: The big hack (part 2 of 2) that lets