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.
14 #include <linux/kernel.h>
15 #include <linux/string.h>
19 extern int xmon_write(void *, void *, int);
22 xmon_vfprintf(void *f, const char *fmt, va_list ap)
24 static char xmon_buf[2048];
27 n = vsprintf(xmon_buf, fmt, ap);
28 xmon_write(f, xmon_buf, n);
32 xmon_printf(const char *fmt, ...)
37 xmon_vfprintf(stdout, fmt, ap);
42 xmon_fprintf(void *f, const char *fmt, ...)
47 xmon_vfprintf(f, fmt, ap);
54 xmon_write(stdout, s, strlen(s));