From: Nick Clifton <nickc@redhat.com>
To: Tom Tromey <tom@tromey.com>, binutils@sourceware.org
Subject: Re: [PATCH 3/3] Introduce bfd_print_error function
Date: Mon, 12 Feb 2024 15:04:33 +0000 [thread overview]
Message-ID: <6f9baf65-10cf-4977-87e5-fe9c654b4ee4@redhat.com> (raw)
In-Reply-To: <20240130010540.1754740-4-tom@tromey.com>
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
prev parent reply other threads:[~2024-02-12 15:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 1:03 [PATCH 0/3] Fix some error-printing issues Tom Tromey
2024-01-30 1:03 ` [PATCH 1/3] Make several more BFD globals thread-local Tom Tromey
2024-02-12 15:28 ` Nick Clifton
2024-02-12 23:52 ` Tom Tromey
2024-02-13 0:35 ` Tom Tromey
2024-02-13 1:20 ` Tom Tromey
2024-03-09 1:12 ` Tom Tromey
2024-03-09 4:11 ` Alan Modra
2024-03-09 10:31 ` Alan Modra
2024-03-15 0:12 ` Tom Tromey
2024-03-19 20:17 ` Tom Tromey
2024-03-15 1:15 ` Tom Tromey
2024-01-30 1:03 ` [PATCH 2/3] Do not call fputc from _bfd_doprnt Tom Tromey
2024-02-12 15:04 ` Nick Clifton
2024-01-30 1:03 ` [PATCH 3/3] Introduce bfd_print_error function Tom Tromey
2024-02-12 15:04 ` Nick Clifton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f9baf65-10cf-4977-87e5-fe9c654b4ee4@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).