Skip to contentSkip to conversation

dump_stack missing on sparc32

DISCUSSION Applied William Lee Irwin III 2 participants 4 messages Jan 14, 2005 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Bob Breuer

The sparc32 specific dump_stack function is missing, but there is a show_stack in arch/sparc/kernel/process.c. Should it be easy enough to connect these together, or are there known bugs that prevent the use of dump_stack?

dump_stack() just calls show_stack() with hardcoded arguments on most architectures.

-- wli

#1 lore raw

The sparc32 specific dump_stack function is missing, but there is a show_stack in arch/sparc/kernel/process.c. Should it be easy enough to connect these together, or are there known bugs that prevent the use of dump_stack?

Bob

#2 lore raw
In reply to William Lee Irwin III

This adds a sparc32 specific dump_stack() to 2.6, based off of the sparc64 version.

Bob

arch/sparc/kernel/process.c +11 -0
@@ -333,6 +333,17 @@ void show_stack(struct task_struct *tsk,
  	printk("\n");
  }
 
+void dump_stack(void)
+{
+	unsigned long *ksp;
+
+	__asm__ __volatile__("mov	%%fp, %0"
+			     : "=r" (ksp));
+	show_stack(current, ksp);
+}
+
+EXPORT_SYMBOL(dump_stack);
+
  /*
   * Note: sparc64 has a pretty intricated thread_saved_pc, check it out.
   */