2 * Written by Cort Dougan to replace the version originally used
3 * by Paul Mackerras, which came from NetBSD and thus had copyright
4 * conflicts with Linux.
6 * This file makes liberal use of the standard linux utility
7 * routines to reduce the size of the binary. We assume we can
8 * trust some parts of Linux inside the debugger.
9 * -- Cort (cort@cs.nmt.edu)
11 * Copyright (C) 1999 Cort Dougan.
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version
16 * 2 of the License, or (at your option) any later version.
19 #include <linux/kernel.h>
20 #include <linux/string.h>
21 #include <linux/module.h>
25 extern int xmon_write(void *, void *, int);
27 void xmon_vfprintf(void *f
, const char *fmt
, va_list ap
)
29 static char xmon_buf
[2048];
32 n
= vsprintf(xmon_buf
, fmt
, ap
);
33 xmon_write(f
, xmon_buf
, n
);
36 void xmon_printf(const char *fmt
, ...)
41 xmon_vfprintf(stdout
, fmt
, ap
);
44 EXPORT_SYMBOL(xmon_printf
);
46 void xmon_fprintf(void *f
, const char *fmt
, ...)
51 xmon_vfprintf(f
, fmt
, ap
);