mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 10:11:36 +00:00
bf61ad1f87
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>
26 lines
668 B
C
26 lines
668 B
C
#ifndef _LINUX_UNWINDER_H
|
|
#define _LINUX_UNWINDER_H
|
|
|
|
#include <asm/stacktrace.h>
|
|
|
|
struct unwinder {
|
|
const char *name;
|
|
struct list_head list;
|
|
int rating;
|
|
void (*dump)(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *, void *);
|
|
};
|
|
|
|
extern int unwinder_init(void);
|
|
extern int unwinder_register(struct unwinder *);
|
|
|
|
extern void unwind_stack(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *,
|
|
void *);
|
|
|
|
extern void stack_reader_dump(struct task_struct *, struct pt_regs *,
|
|
unsigned long *, const struct stacktrace_ops *,
|
|
void *);
|
|
|
|
#endif /* _LINUX_UNWINDER_H */
|