diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-08-13 06:49:03 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-13 06:49:03 -0400 |
commit | bf61ad1f870be88676a07bfef69acd59ce10172e (patch) | |
tree | 2fb8817fb76386b3d543d8d02f2cbe5877088e18 /arch/sh/include/asm/unwinder.h | |
parent | 4e14dfc722b8e9e07a355f97aa60a3d9f0739071 (diff) |
sh: Allow multiple stack unwinders to be setup
Provide an interface for registering stack unwinders, where each
unwinder is given a rating that describes its accuracy and
complexity. The more accurate an unwinder is, the more complex it is.
If a the current stack unwinder faults, then the stack unwinder with the
next highest accuracy will be used in its place (provided one is
available). For example, this allows unwinders, such as the DWARF
unwinder, to liberally sprinkle BUG()s to catch badly formed DWARF debug
info.
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/unwinder.h')
-rw-r--r-- | arch/sh/include/asm/unwinder.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sh/include/asm/unwinder.h b/arch/sh/include/asm/unwinder.h new file mode 100644 index 000000000000..3dc551453e28 --- /dev/null +++ b/arch/sh/include/asm/unwinder.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _LINUX_UNWINDER_H | ||
2 | #define _LINUX_UNWINDER_H | ||
3 | |||
4 | #include <asm/stacktrace.h> | ||
5 | |||
6 | struct unwinder { | ||
7 | const char *name; | ||
8 | struct list_head list; | ||
9 | int rating; | ||
10 | void (*dump)(struct task_struct *, struct pt_regs *, | ||
11 | unsigned long *, const struct stacktrace_ops *, void *); | ||
12 | }; | ||
13 | |||
14 | extern int unwinder_init(void); | ||
15 | extern int unwinder_register(struct unwinder *); | ||
16 | |||
17 | extern void unwind_stack(struct task_struct *, struct pt_regs *, | ||
18 | unsigned long *, const struct stacktrace_ops *, | ||
19 | void *); | ||
20 | |||
21 | extern void stack_reader_dump(struct task_struct *, struct pt_regs *, | ||
22 | unsigned long *, const struct stacktrace_ops *, | ||
23 | void *); | ||
24 | |||
25 | #endif /* _LINUX_UNWINDER_H */ | ||