aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorMatt Fleming <matt@console-pimps.org>2009-08-07 11:11:19 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-08-12 22:50:08 -0400
commit4e14dfc722b8e9e07a355f97aa60a3d9f0739071 (patch)
tree0d5b9f6ecb99a050e2ddb839aead6a1d235c26cb /arch/sh/include/asm/stacktrace.h
parent922b0dc59bb43f7ff3bb8b9558ffeb3ad6af528e (diff)
sh: Use the generalized stacktrace ops
Copy the stacktrace ops code from x86 and provide a central function for use by functions that need to dump a callstack. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/stacktrace.h')
-rw-r--r--arch/sh/include/asm/stacktrace.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sh/include/asm/stacktrace.h b/arch/sh/include/asm/stacktrace.h
new file mode 100644
index 000000000000..797018213718
--- /dev/null
+++ b/arch/sh/include/asm/stacktrace.h
@@ -0,0 +1,25 @@
1/*
2 * Copyright (C) 2009 Matt Fleming
3 *
4 * Based on:
5 * The x86 implementation - arch/x86/include/asm/stacktrace.h
6 */
7#ifndef _ASM_SH_STACKTRACE_H
8#define _ASM_SH_STACKTRACE_H
9
10/* Generic stack tracer with callbacks */
11
12struct stacktrace_ops {
13 void (*warning)(void *data, char *msg);
14 /* msg must contain %s for the symbol */
15 void (*warning_symbol)(void *data, char *msg, unsigned long symbol);
16 void (*address)(void *data, unsigned long address, int reliable);
17 /* On negative return stop dumping */
18 int (*stack)(void *data, char *name);
19};
20
21void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
22 unsigned long *stack,
23 const struct stacktrace_ops *ops, void *data);
24
25#endif /* _ASM_SH_STACKTRACE_H */