xref: /dflybsd-src/contrib/gdb-7/gdb/complaints.h (revision de8e141f24382815c10a4012d209bbbf7abf1112)
15796c8dcSSimon Schubert /* Definitions for complaint handling during symbol reading in GDB.
25796c8dcSSimon Schubert 
3*ef5ccd6cSJohn Marino    Copyright (C) 1990-2013 Free Software Foundation, Inc.
45796c8dcSSimon Schubert 
55796c8dcSSimon Schubert    This file is part of GDB.
65796c8dcSSimon Schubert 
75796c8dcSSimon Schubert    This program is free software; you can redistribute it and/or modify
85796c8dcSSimon Schubert    it under the terms of the GNU General Public License as published by
95796c8dcSSimon Schubert    the Free Software Foundation; either version 3 of the License, or
105796c8dcSSimon Schubert    (at your option) any later version.
115796c8dcSSimon Schubert 
125796c8dcSSimon Schubert    This program is distributed in the hope that it will be useful,
135796c8dcSSimon Schubert    but WITHOUT ANY WARRANTY; without even the implied warranty of
145796c8dcSSimon Schubert    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
155796c8dcSSimon Schubert    GNU General Public License for more details.
165796c8dcSSimon Schubert 
175796c8dcSSimon Schubert    You should have received a copy of the GNU General Public License
185796c8dcSSimon Schubert    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
195796c8dcSSimon Schubert 
205796c8dcSSimon Schubert 
215796c8dcSSimon Schubert #if !defined (COMPLAINTS_H)
225796c8dcSSimon Schubert #define COMPLAINTS_H
235796c8dcSSimon Schubert 
245796c8dcSSimon Schubert /* Opaque object used to track the number of complaints of a
255796c8dcSSimon Schubert    particular category.  */
265796c8dcSSimon Schubert struct complaints;
275796c8dcSSimon Schubert 
285796c8dcSSimon Schubert /* Predefined categories.  */
295796c8dcSSimon Schubert extern struct complaints *symfile_complaints;
305796c8dcSSimon Schubert 
315796c8dcSSimon Schubert /* Register a complaint.  */
32c50c785cSJohn Marino extern void complaint (struct complaints **complaints,
33c50c785cSJohn Marino 		       const char *fmt,
34cf7f2e2dSJohn Marino 		       ...) ATTRIBUTE_PRINTF (2, 3);
355796c8dcSSimon Schubert extern void internal_complaint (struct complaints **complaints,
36c50c785cSJohn Marino 				const char *file, int line,
37c50c785cSJohn Marino 				const char *fmt,
38cf7f2e2dSJohn Marino 				...) ATTRIBUTE_PRINTF (4, 5);
395796c8dcSSimon Schubert 
405796c8dcSSimon Schubert /* Clear out / initialize all complaint counters that have ever been
415796c8dcSSimon Schubert    incremented.  If LESS_VERBOSE is 1, be less verbose about
425796c8dcSSimon Schubert    successive complaints, since the messages are appearing all
435796c8dcSSimon Schubert    together during a command that is reporting a contiguous block of
445796c8dcSSimon Schubert    complaints (rather than being interleaved with other messages).  If
455796c8dcSSimon Schubert    noisy is 1, we are in a noisy command, and our caller will print
465796c8dcSSimon Schubert    enough context for the user to figure it out.  */
475796c8dcSSimon Schubert 
485796c8dcSSimon Schubert extern void clear_complaints (struct complaints **complaints,
495796c8dcSSimon Schubert 			      int less_verbose, int noisy);
505796c8dcSSimon Schubert 
515796c8dcSSimon Schubert 
525796c8dcSSimon Schubert #endif /* !defined (COMPLAINTS_H) */
53