]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Rewrite gdb_bfd_error_handler
authorTom Tromey <tom@tromey.com>
Tue, 13 Feb 2024 01:38:36 +0000 (18:38 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 9 Apr 2024 15:39:15 +0000 (09:39 -0600)
commite8cd90f039c33726af3441ccf56eea7b69ed0de1
tree3d6c51482f19d41966cb64dad6052559feeb7756
parent6f3cf71845e68409724aef1cfef3b5a44beecf53
Rewrite gdb_bfd_error_handler

This patch rewrites gdb_bfd_error_handler to use 'bfd_print_error' to
generate the text of the warning, and then emits it using 'warning'.
The current code in the tree is a bit wrong because it may do the
wrong thing when BFD uses ones of its printf extensions.

This also adds locking to increment_bfd_error_count.  This is
important now that some BFD operations can be done on worker threads.

This approach makes it simpler for worker threads to intercept any
messages.

Regression tested on x86-64 Fedora 38.
gdb/gdb_bfd.c