From 9ff2bb22c20ce605e1d70a24221d0850fe748648 Mon Sep 17 00:00:00 2001 From: David Daney Date: Tue, 3 Aug 2010 11:22:21 -0700 Subject: [PATCH] --- yaml --- r: 204603 b: refs/heads/master c: 8a1492370b493cf680b86885286f07cb9b967716 h: refs/heads/master i: 204601: 5e9d9b25dd13487b03608943689bed7e9f91faad 204599: 3ac8873c0d62e67c6e4bd55f99446eb5dff8f7d9 v: v3 --- [refs] | 2 +- trunk/samples/kprobes/kprobe_example.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4b34501b28b5..15cd4393487e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c1bf207d6ee1eb72e9c10365edbdc7c9ff7fb9b0 +refs/heads/master: 8a1492370b493cf680b86885286f07cb9b967716 diff --git a/trunk/samples/kprobes/kprobe_example.c b/trunk/samples/kprobes/kprobe_example.c index a681998a871c..ebf5e0c368ea 100644 --- a/trunk/samples/kprobes/kprobe_example.c +++ b/trunk/samples/kprobes/kprobe_example.c @@ -32,6 +32,11 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " msr = 0x%lx\n", p->addr, regs->nip, regs->msr); #endif +#ifdef CONFIG_MIPS + printk(KERN_INFO "pre_handler: p->addr = 0x%p, epc = 0x%lx," + " status = 0x%lx\n", + p->addr, regs->cp0_epc, regs->cp0_status); +#endif /* A dump_stack() here will give a stack backtrace */ return 0; @@ -49,6 +54,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, printk(KERN_INFO "post_handler: p->addr = 0x%p, msr = 0x%lx\n", p->addr, regs->msr); #endif +#ifdef CONFIG_MIPS + printk(KERN_INFO "post_handler: p->addr = 0x%p, status = 0x%lx\n", + p->addr, regs->cp0_status); +#endif } /*