mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
2002-06-19 Pierre Muller <muller@ics.u-strasbg.fr>
* parse.c (parse_fprintf): New function used to avoid calls to fprintf in bison parser generated debug code. * parser-defs.h: Declaration of new parse_fprintf function. * ada-exp.y, c-exp.y, f-exp.y, jv-exp.y, m2-exp.y, p-exp.y: Set YYDEBUG to 1 by default. Set YYFPRINTF as parse_fprintf.
This commit is contained in:
17
gdb/parse.c
17
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user