2 * Kernel debug stuff to use the Watch registers.
3 * Useful to find stack overflows, dangling pointers etc.
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
9 * Copyright (C) 1995, 1996 by Ralf Baechle
12 #include <asm/mipsregs.h>
13 #include <asm/regdef.h>
17 * Parameter: a0 - logic address to watch
18 * Currently only KSEG0 addresses are allowed!
19 * a1 - set bit #1 to trap on load references
20 * bit #0 to trap on store references
49 LEAF(__watch_reenable)
57 * Saved value of the c0_watchlo register for watch_reenable()
64 * The stuff below are just some kernel debugging gadgets. It is only here
65 * because it had to be somewhere and will go away.
99 NESTED(print_sp, ((5*SZREG)+ALSZ)&ALMASK, sp)
100 .mask 0x80000000,4*SZREG
101 PTR_SUBU sp,((5*SZREG)+ALSZ)&ALMASK
104 PRINT("$sp == %08lx\n")
108 PTR_ADDU sp,((5*SZREG)+ALSZ)&ALMASK
115 NESTED(print_st, ((5*SZREG)+ALSZ)&ALMASK, sp)
116 .mask 0x80000000,4*SZREG
117 PTR_SUBU sp,((5*SZREG)+ALSZ)&ALMASK
120 PRINT("cp0_status == %08lx\n")
124 PTR_ADDU sp,((5*SZREG)+ALSZ)&ALMASK