aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/debug.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-mips/debug.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-mips/debug.h')
-rw-r--r--include/asm-mips/debug.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/asm-mips/debug.h b/include/asm-mips/debug.h
new file mode 100644
index 000000000000..930f2b75e766
--- /dev/null
+++ b/include/asm-mips/debug.h
@@ -0,0 +1,49 @@
1/*
2 * Debug macros for run-time debugging.
3 * Turned on/off with CONFIG_RUNTIME_DEBUG option.
4 *
5 * Copyright (C) 2001 MontaVista Software Inc.
6 * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifndef _ASM_DEBUG_H
16#define _ASM_DEBUG_H
17
18#include <linux/config.h>
19
20/*
21 * run-time macros for catching spurious errors. Eable CONFIG_RUNTIME_DEBUG in
22 * kernel hacking config menu to use them.
23 *
24 * Use them as run-time debugging aid. NEVER USE THEM AS ERROR HANDLING CODE!!!
25 */
26
27#ifdef CONFIG_RUNTIME_DEBUG
28
29#include <linux/kernel.h>
30
31#define db_assert(x) if (!(x)) { \
32 panic("assertion failed at %s:%d: %s", __FILE__, __LINE__, #x); }
33#define db_warn(x) if (!(x)) { \
34 printk(KERN_WARNING "warning at %s:%d: %s", __FILE__, __LINE__, #x); }
35#define db_verify(x, y) db_assert(x y)
36#define db_verify_warn(x, y) db_warn(x y)
37#define db_run(x) do { x; } while (0)
38
39#else
40
41#define db_assert(x)
42#define db_warn(x)
43#define db_verify(x, y) x
44#define db_verify_warn(x, y) x
45#define db_run(x)
46
47#endif
48
49#endif /* _ASM_DEBUG_H */