aboutsummaryrefslogtreecommitdiff
path: root/gdb/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/parse.c')
-rw-r--r--gdb/parse.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/parse.c b/gdb/parse.c
index bc81f22..c5de0af 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -1366,6 +1366,23 @@ build_parse (void)
NULL);
}
+/* This function avoids direct calls to fprintf
+ in the parser generated debug code. */
+void
+parser_fprintf (FILE *x, const char *y, ...)
+{
+ va_list args;
+ va_start (args, y);
+ if (x == stderr)
+ vfprintf_unfiltered (gdb_stderr, y, args);
+ else
+ {
+ fprintf_unfiltered (gdb_stderr, " Unknown FILE used.\n");
+ vfprintf_unfiltered (gdb_stderr, y, args);
+ }
+ va_end (args);
+}
+
void
_initialize_parse (void)
{