aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-11 21:51:55 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-11 21:51:55 +0000
commitc0bed66d0947bee6d6e71ac26cba4707464d5922 (patch)
tree52aebfde2f30e98da7f91503ed6e8cc162ca74b4 /bfd/bfd.c
parenta50f8417d5e6969db1193da0a056a7033a922bd1 (diff)
downloadfsf-binutils-gdb-c0bed66d0947bee6d6e71ac26cba4707464d5922.zip
fsf-binutils-gdb-c0bed66d0947bee6d6e71ac26cba4707464d5922.tar.gz
fsf-binutils-gdb-c0bed66d0947bee6d6e71ac26cba4707464d5922.tar.bz2
1999-09-11 Donn Terry <donn@interix.com>
* libbfd-in.h (_bfd_abort): Declare. (abort): Define. * bfd.c (_bfd_abort): New function. * libbfd.h: Rebuild.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index c6809d7..e04172f 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -679,6 +679,30 @@ bfd_assert (file, line)
(*_bfd_error_handler) (_("bfd assertion fail %s:%d"), file, line);
}
+/* A more or less friendly abort message. In libbfd.h abort is
+ defined to call this function. */
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
+void
+_bfd_abort (file, line, fn)
+ const char *file;
+ int line;
+ const char *fn;
+{
+ if (fn != NULL)
+ (*_bfd_error_handler)
+ (_("BFD internal error, aborting at %s line %d in %s\n"),
+ file, line, fn);
+ else
+ (*_bfd_error_handler)
+ (_("BFD internal error, aborting at %s line %d\n"),
+ file, line);
+ (*_bfd_error_handler) (_("Please report this bug.\n"));
+ xexit (EXIT_FAILURE);
+}
/*
FUNCTION