From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92802 invoked by alias); 22 May 2018 05:09:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 16344 invoked by uid 89); 22 May 2018 05:07:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=frameless X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.46.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 May 2018 05:07:45 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 1009F400D745F for ; Tue, 22 May 2018 00:07:08 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id KzVrfU7SQlAdrKzVrfzFvD; Tue, 22 May 2018 00:07:08 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:36532 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fKzVr-003pV7-Ls; Tue, 22 May 2018 00:07:07 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 3/9] Remove "noisy" parameter from clear_complaints Date: Tue, 22 May 2018 05:50:00 -0000 Message-Id: <20180522050704.10845-4-tom@tromey.com> In-Reply-To: <20180522050704.10845-1-tom@tromey.com> References: <20180522050704.10845-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fKzVr-003pV7-Ls X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya.Home) [174.29.44.154]:36532 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-05/txt/msg00531.txt.bz2 After the previous patch, the "noisy" parameter to clear_complaints is no longer used, so this patch removes it. gdb/ChangeLog 2018-05-21 Tom Tromey * complaints.c (clear_complaints): Remove "noisy" parameter. * complaints.h (clear_complaints): Update. * symfile.c (syms_from_objfile_1, finish_new_objfile) (reread_symbols): Update. gdb/testsuite/ChangeLog 2018-05-21 Tom Tromey * gdb.gdb/complaints.exp (test_empty_complaints): Update. --- gdb/ChangeLog | 7 +++++++ gdb/complaints.c | 6 ++---- gdb/complaints.h | 2 +- gdb/symfile.c | 8 ++++---- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.gdb/complaints.exp | 14 +++++--------- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/gdb/complaints.c b/gdb/complaints.c index 71d36e6326..d29b3c7830 100644 --- a/gdb/complaints.c +++ b/gdb/complaints.c @@ -220,12 +220,10 @@ complaint_internal (struct complaints **complaints, const char *fmt, ...) incremented. If LESS_VERBOSE is 1, be less verbose about successive complaints, since the messages are appearing all together during a command that is reporting a contiguous block of - complaints (rather than being interleaved with other messages). If - noisy is 1, we are in a noisy command, and our caller will print - enough context for the user to figure it out. */ + complaints (rather than being interleaved with other messages). */ void -clear_complaints (struct complaints **c, int less_verbose, int noisy) +clear_complaints (struct complaints **c, int less_verbose) { struct complaints *complaints = get_complaints (c); struct complain *p; diff --git a/gdb/complaints.h b/gdb/complaints.h index 37648fb525..652827e47b 100644 --- a/gdb/complaints.h +++ b/gdb/complaints.h @@ -56,7 +56,7 @@ extern void complaint_internal (struct complaints **complaints, enough context for the user to figure it out. */ extern void clear_complaints (struct complaints **complaints, - int less_verbose, int noisy); + int less_verbose); #endif /* !defined (COMPLAINTS_H) */ diff --git a/gdb/symfile.c b/gdb/symfile.c index 7bc03fbb8f..e48089a130 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -986,7 +986,7 @@ syms_from_objfile_1 (struct objfile *objfile, initial symbol reading for this file. */ (*objfile->sf->sym_init) (objfile); - clear_complaints (&symfile_complaints, 1, add_flags & SYMFILE_VERBOSE); + clear_complaints (&symfile_complaints, 1); (*objfile->sf->sym_offsets) (objfile, *addrs); @@ -1033,7 +1033,7 @@ finish_new_objfile (struct objfile *objfile, symfile_add_flags add_flags) } /* We're done reading the symbol file; finish off complaints. */ - clear_complaints (&symfile_complaints, 0, add_flags & SYMFILE_VERBOSE); + clear_complaints (&symfile_complaints, 0); } /* Process a symbol file, as either the main file or as a dynamically @@ -2457,7 +2457,7 @@ reread_symbols (void) } (*objfile->sf->sym_init) (objfile); - clear_complaints (&symfile_complaints, 1, 1); + clear_complaints (&symfile_complaints, 1); objfile->flags &= ~OBJF_PSYMTABS_READ; @@ -2487,7 +2487,7 @@ reread_symbols (void) } /* We're done reading the symbol file; finish off complaints. */ - clear_complaints (&symfile_complaints, 0, 1); + clear_complaints (&symfile_complaints, 0); /* Getting new symbols may change our opinion about what is frameless. */ diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp index 1d532b7fd6..774ff89ae6 100644 --- a/gdb/testsuite/gdb.gdb/complaints.exp +++ b/gdb/testsuite/gdb.gdb/complaints.exp @@ -88,7 +88,7 @@ proc test_initial_complaints { } { # For short complaints, all are the same proc test_short_complaints { } { - gdb_test_exact "call clear_complaints (&symfile_complaints, 1, 1)" "" "short start" + gdb_test_exact "call clear_complaints (&symfile_complaints, 1)" "" "short start" # Prime the system test_complaint \ @@ -131,14 +131,10 @@ proc test_empty_complaint { cmd msg } { proc test_empty_complaints { } { - test_empty_complaint "call clear_complaints(&symfile_complaints,0,0)" \ - "empty non-verbose non-noisy clear" - test_empty_complaint "call clear_complaints(&symfile_complaints,1,0)" \ - "empty verbose non-noisy clear" - test_empty_complaint "call clear_complaints(&symfile_complaints,1,1)" \ - "empty verbose noisy clear" - test_empty_complaint "call clear_complaints(&symfile_complaints,0,1)" \ - "empty non-verbose noisy clear" + test_empty_complaint "call clear_complaints(&symfile_complaints,0)" \ + "empty non-verbose clear" + test_empty_complaint "call clear_complaints(&symfile_complaints,1)" \ + "empty verbose clear" return 0 } -- 2.13.6