[PATCH 3/3] Introduce bfd_print_error function
Nick Clifton
nickc@redhat.com
Mon Feb 12 15:04:33 GMT 2024
Hi Tom,
> gdb likes to control its own output; for example, this is important
> for gdb's pager, and for logging. While BFD provides a way to
> intercept error output, via bfd_set_error_handler, it turns out to be
> difficult for this function to truly generate the desired output in a
> gdb-friendly way -- the error handler is expected to implement some
> BFD printf format extensions.
>
> This patch introduces a new function that an error handler can use to
> format the text. This way, gdb can set the error handler and arrange
> for the output to be displayed as it likes.
>
> bfd/ChangeLog
> 2024-01-29 Tom Tromey <tom@tromey.com>
>
> * bfd.c (bfd_print_callback): Rename from print_func. Move into
> comment.
> (_bfd_doprnt): Update.
> (bfd_print_error): New function.
> (error_handler_fprintf, error_handler_sprintf): Use
> bfd_print_error.
> * bfd-in2.h: Rebuild.
Approved - please apply.
Cheers
Nick
More information about the Binutils
mailing list