* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / complaints.c
index b8ab240724371a04111d725fbcf3d686e8dd1fae..72a7d33b52bbc881a7744a943d745d4cc7ee74fc 100644 (file)
@@ -20,7 +20,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "defs.h"
 #include "complaints.h"
 #include "gdbcmd.h"
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 
 /* Structure to manage complaints about symbol file contents.  */
 
@@ -59,15 +63,23 @@ extern int info_verbose;
 
 /* VARARGS */
 void
+#ifdef ANSI_PROTOTYPES
+complain (struct complaint *complaint, ...)
+#else
 complain (va_alist)
      va_dcl
+#endif
 {
   va_list args;
+#ifdef ANSI_PROTOTYPES
+  va_start (args, complaint);
+#else
   struct complaint *complaint;
-  char *val;
 
   va_start (args);
   complaint = va_arg (args, struct complaint *);
+#endif
+
   complaint -> counter++;
   if (complaint -> next == NULL)
     {
@@ -110,6 +122,10 @@ complain (va_alist)
        puts_filtered ("...");
        wrap_here ("");
     }
+  /* If GDB dumps core, we'd like to see the complaints first.  Presumably
+     GDB will not be sending so many complaints that this becomes a
+     performance hog.  */
+  gdb_flush (gdb_stdout);
   va_end (args);
 }
 
@@ -142,6 +158,7 @@ clear_complaints (sym_reading, noisy)
   complaint_series = sym_reading ? 1 + noisy : 0;
 }
 
+void
 _initialize_complaints ()
 {
   add_show_from_set
This page took 0.023785 seconds and 4 git commands to generate.