aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-16 23:10:51 -0600
committerTom Tromey <tom@tromey.com>2018-05-23 09:17:02 -0600
commitde54e1a5d231c5857e870acc788f9b843ff5f050 (patch)
tree7753852352a0749d9195b5bb1fc5d1681cbcc44b
parent2ac237e52beb08e09037ff917924319246b5ea6d (diff)
downloadgdb-de54e1a5d231c5857e870acc788f9b843ff5f050.zip
gdb-de54e1a5d231c5857e870acc788f9b843ff5f050.tar.gz
gdb-de54e1a5d231c5857e870acc788f9b843ff5f050.tar.bz2
Remove vcomplaint
vcomplaint now has a single caller, so merge it with that caller. gdb/ChangeLog 2018-05-23 Tom Tromey <tom@tromey.com> * complaints.c (vcomplaint): Remove. (complaint_internal) Merge in contents of vcomplaint.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/complaints.c25
2 files changed, 13 insertions, 17 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 350e085..08b5f23 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-05-23 Tom Tromey <tom@tromey.com>
+ * complaints.c (vcomplaint): Remove.
+ (complaint_internal) Merge in contents of vcomplaint.
+
+2018-05-23 Tom Tromey <tom@tromey.com>
+
* complaints.c (struct complaints) <explanation>: Remove.
(symfile_explanations): Remove.
(symfile_complaint_book): Update.
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 80b9595..4b75325 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -100,22 +100,22 @@ find_complaint (struct complaints *complaints, const char *file,
int stop_whining = 0;
-/* Print a complaint, and link the complaint block into a chain for
- later handling. */
+/* See complaints.h. */
-static void ATTRIBUTE_PRINTF (3, 0)
-vcomplaint (const char *file,
- int line, const char *fmt,
- va_list args)
+void
+complaint_internal (const char *fmt, ...)
{
- struct complain *complaint = find_complaint (&symfile_complaint_book, file,
- line, fmt);
+ va_list args;
+
+ struct complain *complaint = find_complaint (&symfile_complaint_book, NULL,
+ 0, fmt);
enum complaint_series series;
complaint->counter++;
if (complaint->counter > stop_whining)
return;
+ va_start (args, fmt);
series = symfile_complaint_book.series;
/* Pass 'fmt' instead of 'complaint->fmt' to printf-like callees
@@ -146,15 +146,6 @@ vcomplaint (const char *file,
becomes a performance hog. */
gdb_flush (gdb_stderr);
-}
-
-void
-complaint_internal (const char *fmt, ...)
-{
- va_list args;
-
- va_start (args, fmt);
- vcomplaint (NULL/*file*/, 0/*line*/, fmt, args);
va_end (args);
}