blob: 7760860fa170fa89a3bc5ead3509037bee727e45 [file] [log] [blame]
Jan Beulich4552d5d2006-06-26 13:57:28 +02001#ifndef _LINUX_UNWIND_H
2#define _LINUX_UNWIND_H
3
4/*
5 * Copyright (C) 2002-2006 Novell, Inc.
6 * Jan Beulich <jbeulich@novell.com>
7 * This code is released under version 2 of the GNU GPL.
8 *
9 * A simple API for unwinding kernel stacks. This is used for
10 * debugging and error reporting purposes. The kernel doesn't need
11 * full-blown stack unwinding with all the bells and whistles, so there
12 * is not much point in implementing the full Dwarf2 unwind API.
13 */
14
Jan Beulich4552d5d2006-06-26 13:57:28 +020015struct module;
16
Jan Beulich4552d5d2006-06-26 13:57:28 +020017struct unwind_frame_info {};
18
19static inline void unwind_init(void) {}
Jan Beulich690a9732006-10-21 18:37:01 +020020static inline void unwind_setup(void) {}
Jan Beulich4552d5d2006-06-26 13:57:28 +020021
Jan Beulich83f4fcc2006-06-26 13:57:50 +020022#ifdef CONFIG_MODULES
23
Jan Beulich4552d5d2006-06-26 13:57:28 +020024static inline void *unwind_add_table(struct module *mod,
25 const void *table_start,
26 unsigned long table_size)
27{
28 return NULL;
29}
30
31static inline void unwind_remove_table(void *handle, int init_only)
32{
33}
34
Linus Torvaldsd1526e22006-12-15 08:43:13 -080035#endif
36
Jan Beulich4552d5d2006-06-26 13:57:28 +020037static inline int unwind_init_frame_info(struct unwind_frame_info *info,
38 struct task_struct *tsk,
39 const struct pt_regs *regs)
40{
41 return -ENOSYS;
42}
43
44static inline int unwind_init_blocked(struct unwind_frame_info *info,
45 struct task_struct *tsk)
46{
47 return -ENOSYS;
48}
49
50static inline int unwind_init_running(struct unwind_frame_info *info,
Jan Beulichc33bd9a2006-06-26 13:57:47 +020051 asmlinkage int (*cb)(struct unwind_frame_info *,
52 void *arg),
Jan Beulich4552d5d2006-06-26 13:57:28 +020053 void *arg)
54{
55 return -ENOSYS;
56}
57
58static inline int unwind(struct unwind_frame_info *info)
59{
60 return -ENOSYS;
61}
62
63static inline int unwind_to_user(struct unwind_frame_info *info)
64{
65 return -ENOSYS;
66}
67
Jan Beulich4552d5d2006-06-26 13:57:28 +020068#endif /* _LINUX_UNWIND_H */