[PATCH 0/2] Suppress printing of superfluous BFD error messages

Kevin Buettner kevinb@redhat.com
Sat Sep 3 00:47:57 GMT 2022


Tools which use the BFD library will output error messages of the
form "BFD: some messsage" when a problem with the file upon which it
operating is found.  E.g. an actual message (modulo some shortening
of the pathname) from the test case in this series is:

BFD: bfd-errors-lib.so: invalid string offset 1154 >= 154 for section `.dynstr'

For some problems with executable files or libraries, BFD will
attempt to output many identical messages.  The first patch in this
series adds code to GDB to suppress messages which are identical to
earlier messages that have already been printed.

(The above blurb was adapted from a comment in the test case.)

Kevin Buettner (2):
  Suppress printing of superfluous BFD error messages
  BFD error message suppression test case

 gdb/gdb_bfd.c                            |  71 ++++++++
 gdb/testsuite/gdb.base/bfd-errors-lib.c  |  44 +++++
 gdb/testsuite/gdb.base/bfd-errors-main.c |  31 ++++
 gdb/testsuite/gdb.base/bfd-errors.exp    | 211 +++++++++++++++++++++++
 4 files changed, 357 insertions(+)
 create mode 100644 gdb/testsuite/gdb.base/bfd-errors-lib.c
 create mode 100644 gdb/testsuite/gdb.base/bfd-errors-main.c
 create mode 100644 gdb/testsuite/gdb.base/bfd-errors.exp

-- 
2.37.2



More information about the Gdb-patches mailing list