From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 25LIHWWkEmPqHjIAWB0awg (envelope-from ) for ; Fri, 02 Sep 2022 20:48:37 -0400 Received: by simark.ca (Postfix, from userid 112) id 6C3B81E4A7; Fri, 2 Sep 2022 20:48:37 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=xsbg6N7T; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2268F1E13B for ; Fri, 2 Sep 2022 20:48:37 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B4613858286 for ; Sat, 3 Sep 2022 00:48:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B4613858286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1662166116; bh=Bca61wlazNbPP+28K4bAdyf0IJE6lWgKeu3VJ9qVFgo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xsbg6N7TvxQCYERjtjGvlHi8w6DWM5Kois7RIgiLKaB+pX5gebCXfMfMTnJT9chiW a2LBVyhXxq6JD7d/0o/9RA4uedByKqC15r3VjyFQ0iA9cab0cFQWNFt4skgHPH2Vmg 2DOG8DmOrc01eNN9GyNdYocTQT92tyC7lKlTSXh4= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7FF863858D39 for ; Sat, 3 Sep 2022 00:48:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7FF863858D39 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-548-cGBZcPTtNgy041LiEup3AQ-1; Fri, 02 Sep 2022 20:48:12 -0400 X-MC-Unique: cGBZcPTtNgy041LiEup3AQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AC98A811E80 for ; Sat, 3 Sep 2022 00:48:12 +0000 (UTC) Received: from f36-1.lan (unknown [10.2.16.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 550611121314; Sat, 3 Sep 2022 00:48:12 +0000 (UTC) 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 Message-Id: <20220903004759.2082950-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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