Lines Matching defs:stack
1 /* Provide basic stack dumping functions
35 void show_stack(struct task_struct *task, unsigned long *stack)
44 * If we have been passed a specific stack, use that one otherwise
46 * use the stack of where the variable "stack" exists
49 if (stack == NULL) {
51 /* We know this is a kernel stack, so this is the start/end */
52 stack = (unsigned long *)task->thread.ksp;
53 endstack = (unsigned int *)(((unsigned int)(stack) & ~(THREAD_SIZE - 1)) + THREAD_SIZE);
55 /* print out the existing stack info */
56 stack = (unsigned long *)&stack;
57 endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack);
60 endstack = (unsigned int *)PAGE_ALIGN((unsigned int)stack);
63 decode_address(buf, (unsigned int)stack);
64 printk(KERN_NOTICE " SP: [0x%p] %s\n", stack, buf);
66 if (!access_ok(VERIFY_READ, stack, (unsigned int)endstack - (unsigned int)stack)) {
67 printk(KERN_NOTICE "Invalid stack pointer\n");
72 for (addr = (unsigned int *)((unsigned int)stack & ~0xF); addr < endstack; addr++) {
100 * walk the stack again, this time printing things out
108 printk(KERN_NOTICE "Return addresses in stack:\n");
110 printk(KERN_NOTICE " Memory from 0x%08lx to %p", ((long unsigned int)stack & ~0xF), endstack);
115 for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0;
132 if (!j && stack == (unsigned long *)addr)
165 unsigned long stack;
171 show_stack(current, &stack);