diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 23:35:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 23:35:12 -0400 |
commit | 8814011679d1a47d8b0158fc991727a5859471a0 (patch) | |
tree | f5d84ea8dba4fb7e18312deb04ff51ba35f9b901 /include/linux | |
parent | 5cc103506289de7ee0a0b526ae0381541990cad4 (diff) | |
parent | 495363d380b4f4745bd8677912688654afc44020 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
kdb,debug_core: adjust master cpu switch logic against new debug_core locking
debug_core: refactor locking for master/slave cpus
x86,kgdb: remove unnecessary call to kgdb_correct_hw_break()
debug_core: disable hw_breakpoints on all cores in kgdb_cpu_enter()
kdb,kgdb: fix sparse fixups
kdb: Fix oops in kdb_unregister
kdb,ftdump: Remove reference to internal kdb include
kdb: Allow kernel loadable modules to add kdb shell functions
debug_core: stop rcu warnings on kernel resume
debug_core: move all watch dog syncs to a single function
x86,kgdb: fix debugger hw breakpoint test regression in 2.6.35
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kdb.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index ea6e5244ed3f..aadff7cc2b84 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
@@ -28,6 +28,41 @@ extern int kdb_poll_idx; | |||
28 | extern int kdb_initial_cpu; | 28 | extern int kdb_initial_cpu; |
29 | extern atomic_t kdb_event; | 29 | extern atomic_t kdb_event; |
30 | 30 | ||
31 | /* Types and messages used for dynamically added kdb shell commands */ | ||
32 | |||
33 | #define KDB_MAXARGS 16 /* Maximum number of arguments to a function */ | ||
34 | |||
35 | typedef enum { | ||
36 | KDB_REPEAT_NONE = 0, /* Do not repeat this command */ | ||
37 | KDB_REPEAT_NO_ARGS, /* Repeat the command without arguments */ | ||
38 | KDB_REPEAT_WITH_ARGS, /* Repeat the command including its arguments */ | ||
39 | } kdb_repeat_t; | ||
40 | |||
41 | typedef int (*kdb_func_t)(int, const char **); | ||
42 | |||
43 | /* KDB return codes from a command or internal kdb function */ | ||
44 | #define KDB_NOTFOUND (-1) | ||
45 | #define KDB_ARGCOUNT (-2) | ||
46 | #define KDB_BADWIDTH (-3) | ||
47 | #define KDB_BADRADIX (-4) | ||
48 | #define KDB_NOTENV (-5) | ||
49 | #define KDB_NOENVVALUE (-6) | ||
50 | #define KDB_NOTIMP (-7) | ||
51 | #define KDB_ENVFULL (-8) | ||
52 | #define KDB_ENVBUFFULL (-9) | ||
53 | #define KDB_TOOMANYBPT (-10) | ||
54 | #define KDB_TOOMANYDBREGS (-11) | ||
55 | #define KDB_DUPBPT (-12) | ||
56 | #define KDB_BPTNOTFOUND (-13) | ||
57 | #define KDB_BADMODE (-14) | ||
58 | #define KDB_BADINT (-15) | ||
59 | #define KDB_INVADDRFMT (-16) | ||
60 | #define KDB_BADREG (-17) | ||
61 | #define KDB_BADCPUNUM (-18) | ||
62 | #define KDB_BADLENGTH (-19) | ||
63 | #define KDB_NOBP (-20) | ||
64 | #define KDB_BADADDR (-21) | ||
65 | |||
31 | /* | 66 | /* |
32 | * kdb_diemsg | 67 | * kdb_diemsg |
33 | * | 68 | * |
@@ -104,10 +139,26 @@ int kdb_process_cpu(const struct task_struct *p) | |||
104 | 139 | ||
105 | /* kdb access to register set for stack dumping */ | 140 | /* kdb access to register set for stack dumping */ |
106 | extern struct pt_regs *kdb_current_regs; | 141 | extern struct pt_regs *kdb_current_regs; |
142 | #ifdef CONFIG_KALLSYMS | ||
143 | extern const char *kdb_walk_kallsyms(loff_t *pos); | ||
144 | #else /* ! CONFIG_KALLSYMS */ | ||
145 | static inline const char *kdb_walk_kallsyms(loff_t *pos) | ||
146 | { | ||
147 | return NULL; | ||
148 | } | ||
149 | #endif /* ! CONFIG_KALLSYMS */ | ||
107 | 150 | ||
151 | /* Dynamic kdb shell command registration */ | ||
152 | extern int kdb_register(char *, kdb_func_t, char *, char *, short); | ||
153 | extern int kdb_register_repeat(char *, kdb_func_t, char *, char *, | ||
154 | short, kdb_repeat_t); | ||
155 | extern int kdb_unregister(char *); | ||
108 | #else /* ! CONFIG_KGDB_KDB */ | 156 | #else /* ! CONFIG_KGDB_KDB */ |
109 | #define kdb_printf(...) | 157 | #define kdb_printf(...) |
110 | #define kdb_init(x) | 158 | #define kdb_init(x) |
159 | #define kdb_register(...) | ||
160 | #define kdb_register_repeat(...) | ||
161 | #define kdb_uregister(x) | ||
111 | #endif /* CONFIG_KGDB_KDB */ | 162 | #endif /* CONFIG_KGDB_KDB */ |
112 | enum { | 163 | enum { |
113 | KDB_NOT_INITIALIZED, | 164 | KDB_NOT_INITIALIZED, |