Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] Suppress printing of superfluous BFD error messages
Date: Fri,  2 Sep 2022 17:47:57 -0700	[thread overview]
Message-ID: <20220903004759.2082950-1-kevinb@redhat.com> (raw)

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


             reply	other threads:[~2022-09-03  0:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03  0:47 Kevin Buettner via Gdb-patches [this message]
2022-09-03  0:47 ` [PATCH 1/2] " Kevin Buettner via Gdb-patches
2022-09-06 10:09   ` Lancelot SIX via Gdb-patches
2022-09-03  0:47 ` [PATCH 2/2] BFD error message suppression test case Kevin Buettner via Gdb-patches
2022-09-06 10:29   ` Lancelot SIX via Gdb-patches
2022-09-06 23:21     ` Kevin Buettner via Gdb-patches

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=20220903004759.2082950-1-kevinb@redhat.com \
    --to=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.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