lkml.org 
[lkml]   [2003]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] M68k show_stack() portability and cleanup patch
M68k: show_stack() portability and cleanup patch:
- Add a task pointer argument to show_stack() and pass NULL as the first
argument where needed
- Remove show_trace_task()

--- linux-2.6.x/arch/m68k/kernel/traps.c Tue Mar 25 10:06:08 2003
+++ linux-m68k-2.6.x/arch/m68k/kernel/traps.c Thu Jun 26 11:22:53 2003
@@ -852,11 +852,6 @@
printk("\n");
}

-void show_trace_task(struct task_struct *tsk)
-{
- show_trace((unsigned long *)tsk->thread.esp0);
-}
-
void show_registers(struct pt_regs *regs)
{
struct frame *fp = (struct frame *)regs;
@@ -915,7 +910,7 @@
default:
printk("\n");
}
- show_stack((unsigned long *)addr);
+ show_stack(NULL, (unsigned long *)addr);

printk("Code: ");
for (i = 0; i < 10; i++)
@@ -923,13 +918,17 @@
printk ("\n");
}

-extern void show_stack(unsigned long *stack)
+extern void show_stack(struct task_struct *task, unsigned long *stack)
{
unsigned long *endstack;
int i;

- if (!stack)
- stack = (unsigned long *)&stack;
+ if (!stack) {
+ if (task)
+ stack = (unsigned long *)task->thread.esp0;
+ else
+ stack = (unsigned long *)&stack;
+ }
endstack = (unsigned long *)(((unsigned long)stack + THREAD_SIZE - 1) & -THREAD_SIZE);

printk("Stack from %08lx:", (unsigned long)stack);
@@ -1124,7 +1123,7 @@

printk("Process %s (pid: %d, stackpage=%08lx)\n",
current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
- show_stack((unsigned long *)fp);
+ show_stack(NULL, (unsigned long *)fp);
do_exit(SIGSEGV);
}

Gr{oetje,eeting}s,
Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.019 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site