-/* A callback function for usage with macro_for_each and friends.
- If USER_DATA is null all macros will be printed.
- Otherwise USER_DATA is considered to be a string, printing
- only macros who's NAME matches USER_DATA. Other arguments are
- routed to print_macro_definition. */
-static void
-print_macro_callback (const char *name, const struct macro_definition *macro,
- struct macro_source_file *source, int line,
- void *user_data)
-{
- if (! user_data || strcmp (user_data, name) == 0)
- print_macro_definition (name, macro, source, line);
+ fputs_filtered ("(", gdb_stdout);
+ for (i = 0; i < d->argc; i++)
+ {
+ fputs_filtered (d->argv[i], gdb_stdout);
+ if (i + 1 < d->argc)
+ fputs_filtered (", ", gdb_stdout);
+ }
+ fputs_filtered (")", gdb_stdout);
+ }
+
+ if (line != 0)
+ fprintf_filtered (gdb_stdout, " %s\n", d->replacement);
+ else
+ fprintf_filtered (gdb_stdout, "=%s\n", d->replacement);