GDB (xrefs)
errors.c
Go to the documentation of this file.
1 /* Error reporting facilities.
2 
3  Copyright (C) 1986-2015 Free Software Foundation, Inc.
4 
5  This file is part of GDB.
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 #include "common-defs.h"
21 #include "errors.h"
22 
23 /* See common/errors.h. */
24 
25 void
26 warning (const char *fmt, ...)
27 {
28  va_list ap;
29 
30  va_start (ap, fmt);
31  vwarning (fmt, ap);
32  va_end (ap);
33 }
34 
35 /* See common/errors.h. */
36 
37 void
38 error (const char *fmt, ...)
39 {
40  va_list ap;
41 
42  va_start (ap, fmt);
43  verror (fmt, ap);
44  va_end (ap);
45 }
46 
47 /* See common/errors.h. */
48 
49 void
50 internal_error (const char *file, int line, const char *fmt, ...)
51 {
52  va_list ap;
53 
54  va_start (ap, fmt);
55  internal_verror (file, line, fmt, ap);
56  va_end (ap);
57 }
58 
59 /* See common/errors.h. */
60 
61 void
62 internal_warning (const char *file, int line, const char *fmt, ...)
63 {
64  va_list ap;
65 
66  va_start (ap, fmt);
67  internal_vwarning (file, line, fmt, ap);
68  va_end (ap);
69 }
void warning(const char *fmt,...)
Definition: errors.c:26
void void void void void void internal_verror(const char *file, int line, const char *fmt, va_list args) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(3
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
void void void void void void void void internal_vwarning(const char *file, int line, const char *fmt, va_list args) ATTRIBUTE_PRINTF(3
void void void void verror(const char *fmt, va_list args) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF(1
int line
Definition: symtab.h:1570
void void vwarning(const char *fmt, va_list args) ATTRIBUTE_PRINTF(1
void internal_warning(const char *file, int line, const char *fmt,...)
Definition: errors.c:62
void error(const char *fmt,...)
Definition: errors.c:38