12 #include <linux/ctype.h>
13 #include <linux/string.h>
14 #include <linux/kernel.h>
15 #include <linux/sched.h>
81 int argcount,
int btaprompt)
89 kdb_printf(
"Stack traceback for pid %d\n", p->pid);
91 kdb_show_stack(p,
NULL);
94 "Enter <q> to end, <cr> to continue:");
95 if (buffer[0] ==
'q') {
117 if (
strcmp(argv[0],
"bta") == 0) {
127 if (kdb_bt1(p, mask, argcount, btaprompt))
131 kdb_do_each_thread(g, p) {
136 if (kdb_bt1(p, mask, argcount, btaprompt))
138 } kdb_while_each_thread(g, p);
139 }
else if (
strcmp(argv[0],
"btp") == 0) {
150 return kdb_bt1(p, ~0
UL, argcount, 0);
152 kdb_printf(
"No process with pid == %ld found\n", pid);
154 }
else if (
strcmp(argv[0],
"btt") == 0) {
161 return kdb_bt1((
struct task_struct *)addr, ~0
UL, argcount, 0);
162 }
else if (
strcmp(argv[0],
"btc") == 0) {
163 unsigned long cpu = ~0;
181 sprintf(buf,
"btt 0x%p\n", KDB_TSK(cpu));
188 sprintf(buf,
"btt 0x%p\n", KDB_TSK(cpu));