From d6e144bcfb19638d016f544da1c41463f9dbc1e9 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 26 Apr 2012 13:49:49 +0000 Subject: Provide a way for programs to recognize BFD_ASSERT calls. * bfd.c (bfd_assert_handler_type): New API type. (bfd_set_assert_handler, bfd_get_assert_handler): New API functions. (_bfd_assert_handler): New variable. (_bfd_default_assert_handler): New function. (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler. * libbfd-in.h (_bfd_assert_handler): Declare. * libbfd.h, bfd-in2.h: Regenerate. --- bfd/bfd-in2.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bfd/bfd-in2.h') diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index c5d19dce6e..17dbbe1353 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -5637,6 +5637,15 @@ void bfd_set_error_program_name (const char *); bfd_error_handler_type bfd_get_error_handler (void); +typedef void (*bfd_assert_handler_type) (const char *bfd_formatmsg, + const char *bfd_version, + const char *bfd_file, + int bfd_line); + +bfd_assert_handler_type bfd_set_assert_handler (bfd_assert_handler_type); + +bfd_assert_handler_type bfd_get_assert_handler (void); + long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect); long bfd_canonicalize_reloc -- cgit v1.2.1